Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. All extensions show online even if they are not

All extensions show online even if they are not

Scheduled Pinned Locked Moved Support
8 Posts 4 Posters 631 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    B
    b00gz
    wrote on last edited by
    #1

    We are using device and user mode with Freepbx and it shows all of the agents logged in all the time even if they do not have a device registered. How can I correct this? I need this solution for a call center deployment.

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      user_login_out.agi from FreePBX is broken on most versions of it.. it was corrected on latest releases. There are like, about, not sure, 50 posts in this forum talking about it and how to fix it. Here is one:

      http://forum.fop2.com/1056-device-and-user-mode-status-updating/0

      Perhaps you have that issue... cannot be sure as you are not specifying versions. Anyways, it works if the .agi from freepbx gets fixed and you use the login/logout feature codes (*11).

      1 Reply Last reply
      0
      • B
        B
        b00gz
        wrote on last edited by
        #3

        This doesn't appear to be the case. I am using asterisk 11.18.0 and the code references 1.8. I tried to add 11.18.0 and it still did not work. Any other ideas on what I can try we are running the latest stable version of FreePBX.

        $current_user = get_user($device);
        if ($current_user != '') {
        $current_devices = get_devices($current_user);
        $new_devices = remove_device($current_devices,$device);
        cli_debug("remove_user: Setting user $current_user to devices $new_devices",5);
        set_user_devices($current_user, $new_devices);
        set_hint($current_user, $new_devices);

                            if(version_compare(get_var("ASTVERSION"), "1.8.0", "ge")) {
                                    $user_event_body = "\"UserDeviceRemoved,Data: {$current_user}\\\\,{$device}\"";
                            } else if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {
                                    $user_event_body = "\"UserDeviceRemoved|Data: {$current_user}\\,{$device}\"";
                            } else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {
                                    $user_event_body = "UserDeviceRemoved,\"Data: {$current_user}\\\\,{$device}\"";
                            } else {
                                    $user_event_body = "\"UserDeviceRemoved|Data: {$current_user},{$device}\"";
                            }
        
        1 Reply Last reply
        0
        • N
          N
          nicolas
          wrote on last edited by
          #4

          The bug is not in Asterisk, but a FreePBX AGI script, so you can have a broken .agi even if you run Asterisk 13. As for fixing the broken .agi, the format for Asterisk 1.8 is the same as for any newer version. Now, we did not develop FreePBX, I do not know for sure what versions have the broken .agi or not. If you run fop2_server in debug mode, and look at the UserEvents generated by the .agi script the problem will jump out immediately as you will see the broken format/event.

          Again, I do not know if you have that problem/broken .agi or not. But I can tell you that the broken .agi result is not seeing the user login or logout state when you dial the feature code to login/out in FreePBX.

          To start fop2 in debug mode you can do this

          service fop2 stop
          cd /usr/local/fop2
          script capture.log
          ./fop2_server -X 1

          (then log into fop2, and try to login and logout a user in freepbx)

          ctrl-C
          exit
          service fop2 start

          At that point you will have a capture.log file you can open and search for the "UserEvent" string.

          1 Reply Last reply
          0
          • B
            B
            b00gz
            wrote on last edited by
            #5

            I see this but the button never goes grey.

            127.0.0.1 <- Event: PeerStatus
            127.0.0.1 <- Privilege: system,all
            127.0.0.1 <- ChannelType: SIP
            127.0.0.1 <- Peer: SIP/3018
            127.0.0.1 <- PeerStatus: Unregistered
            127.0.0.1 <- Cause: Expired

            127.0.0.1 <- Event: ExtensionStatus
            127.0.0.1 <- Privilege: call,all
            127.0.0.1 <- Exten: 3018
            127.0.0.1 <- Context: ext-local
            127.0.0.1 <- Hint: SIP/3018&Custom:DND3018,CustomPresence:3018
            127.0.0.1 <- Status: 4

            127.0.0.1 <- Event: ExtensionStatus
            127.0.0.1 <- Privilege: call,all
            127.0.0.1 <- Exten: *803018
            127.0.0.1 <- Context: ext-local
            127.0.0.1 <- Hint: SIP/3018&Custom:DND3018,CustomPresence:3018
            127.0.0.1 <- Status: 4

            1 Reply Last reply
            0
            • S
              S
              SolarW
              wrote on last edited by
              #6

              I'm use FreePBX Distro in Device & User mode with FOP2 ver. 2.29.
              All work fine, active only logged users.

              [attachment:55c896f97958a]

              1 Reply Last reply
              0
              • N
                N
                nicolas
                wrote on last edited by
                #7

                10747:@b00gz escribió:

                I see this but the button never goes grey.

                127.0.0.1 <- Event: PeerStatus
                127.0.0.1 <- Privilege: system,all
                127.0.0.1 <- ChannelType: SIP
                127.0.0.1 <- Peer: SIP/3018
                127.0.0.1 <- PeerStatus: Unregistered
                127.0.0.1 <- Cause: Expired

                127.0.0.1 <- Event: ExtensionStatus
                127.0.0.1 <- Privilege: call,all
                127.0.0.1 <- Exten: 3018
                127.0.0.1 <- Context: ext-local
                127.0.0.1 <- Hint: SIP/3018&Custom:DND3018,CustomPresence:3018
                127.0.0.1 <- Status: 4

                127.0.0.1 <- Event: ExtensionStatus
                127.0.0.1 <- Privilege: call,all
                127.0.0.1 <- Exten: *803018
                127.0.0.1 <- Context: ext-local
                127.0.0.1 <- Hint: SIP/3018&Custom:DND3018,CustomPresence:3018
                127.0.0.1 <- Status: 4

                In User & Device mode SIP Registration status is not monitored, only user login status in FreePBX system. FOP2 won't monitor sip registrations on that device and user mode, because it will return mixed states whenever you have more than one device associated to a user.

                1 Reply Last reply
                0
                • L
                  L
                  leemason
                  wrote on last edited by
                  #8

                  Is this still a problem now? I have the latest version of FreePBX 14 but am still getting the same problem as described here with extensions that are not online showing as online.

                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  Powered by NodeBB Contributors
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups