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. Asterisk not reacting to Presence statuses

Asterisk not reacting to Presence statuses

Scheduled Pinned Locked Moved Support
7 Posts 2 Posters 355 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.
  • R
    R
    rn_sr
    wrote on last edited by
    #1

    Hi!

    We are running the following setup:
    Asterisk 1.6.1.19
    Fop2 v2.29.01
    FreePBX 2.9.0.15

    We recently upgraded FOP2 from v2.11 to v2.29 (as you might recall from our chat earlier).

    For some reason, the Asterisk system has stopped reacting to Agents Presence status in FOP2. Earlier when a Presence was set an incoming call would be redirected to the users VM, and the caller would get a message about it.
    The Asterisk CLI command "database show fop2state" shows that the users presence is set.

    *CLI> database show fop2state
    /fop2state/USER/652                               : Do not Disturb           
    1 results found.
    

    I can also see using fop2_server in debug mode that events are created:

    x.x.x.x:65255  <= <msg data="5|setastdb|fop2state~652~RG8gbm90IERpc3R1cmI=|e5fee7f31b09970432e88bad2913663d" ></msg>
    
    127.0.0.1            <- Response: Follows
    127.0.0.1            <- Privilege: Command
    127.0.0.1            <- Updated database successfully
    --END COMMAND--
    
    127.0.0.1            <- Response: Success
    127.0.0.1            <- Message: Event Sent
    
    127.0.0.1            <- Event: UserEvent
    127.0.0.1            <- Privilege: user,all
    127.0.0.1            <- UserEvent: FOP2ASTDB
    127.0.0.1            <- Action: UserEvent
    127.0.0.1            <- Family: fop2state
    127.0.0.1            <- Key: USER/652
    127.0.0.1            <- Channel: USER/652
    127.0.0.1            <- Value: Do not Disturb
    

    This leads to my questions:

    1. What could cause this to not work anymore (it did work after the upgrade, but has stopped working for some reason)?
    2. How does Asterisk know if the user is available or not?
    3. Is it possible to change where the call is directed based on what Presence is used (ie. if a user is "On Vacation" could FOP2 redirect the call to the switchboard, instead of the VM)?

    Best Regards,

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

      Install the Prensece/DND plugin via FOP2 Manager / Plugins page, make it global. Then restart fop2.

      Best regards,

      1 Reply Last reply
      0
      • R
        R
        rn_sr
        wrote on last edited by
        #3

        Thank you, that did the trick! 🙂

        Is it possible to change the custom devstate that is set when using different Presences?
        It seems like no matter what is selected the devstate is "BUSY" (and by that the voicemail message say that the user is on the phone, "vm-isonphone"), but I would prefer to put the devstate in "NOT_AVAILABLE" mode (and getting the voicemail to respond with the "vm-isunavail" message.

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

          Edit the file:

          /var/www/html/fop2/admin/plugins/presencedndfpbx/presencedndfpbx.pl

          And change BUSY to NOT_AVAILABLE, then restart FOP2 and try

          Best regards,

          1 Reply Last reply
          0
          • R
            R
            rn_sr
            wrote on last edited by
            #5

            Unfortunately that did not work. I checked the available states with the CLI command "devstate change", and I found the states:

            *CLI> devstate change
            Usage: devstate change <device> <state>
                   Change a custom device to a new state.
                   The possible values for the state are:
            UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING
            RINGINUSE | ONHOLD
            

            I tried setting both "UNAVAILABLE" and "INVALID" in the Perl script and restarted FOP2 each time, to no avail.
            I did check that the devstate was set correctly with the CLI command "devstate list", and it was.

            Do you have any other suggestions for this? How does Asterisk determine the device's state?

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

              Your question is Asterisk/dialplan related, not FOP2 related. I have pointed you to the file that lets you set specific states, and as you noticed it works and sets the state. Now, if your Asterisk setup changes the voicemail options to play busy or unavailable based on dev states, is a matter of dialplan config. If you use FreePBX, you should investigate there. My guess is that is a "limitation" of FreePBX, perhaps voicemail options should be set based on device state and it is not performing that check. Anyways, there is nothing in FOP2 that will change that behaviour, it is not a FOP2 issue.

              1 Reply Last reply
              0
              • R
                R
                rn_sr
                wrote on last edited by
                #7

                I agree, Nicolas. Thank you for pointing in the right direction 🙂

                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