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. Manually set extension states

Manually set extension states

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 296 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
    brettnem
    wrote on last edited by
    #1

    Hello,
    I have a custom application where I want certain events to trigger extension states automatically. For example, I'd like to be able to say extension 3200 is busy and get the counter started without actually generating a telephone call. Then I'd like to be able to mark it offline, online, inuse, busy, etc manually either by dbset or some other external script.

    In addition, I'd really like to make 4-5 different "states' an extension can be in and have the whole box change color (like busy->idle, but more states).

    Is this possible?

    Thanks,
    Brett

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

      Sorry. I do not think it is possible without rewriting or heavily modifying the whole thing: both client and server. You will have to use AMI Userevents for that, astdb is not enough. But it must be used too to have persistent fake states. The fop2 presence works like that, using astdb to store the presence state. And you can have any number of presence states, but they affect only the presence icon, not the whole button color.

      1 Reply Last reply
      0
      • S
        S
        stilobix
        wrote on last edited by
        #3

        Hi guys,

        I am doing a quite similar things on my asterisk and am having some issue with my users states.

        I am using Adhearsion (a fully featured framework using ruby) to logon / logoff my user on a device. But The thing is I have no idea on how to change or set my user's state so that I can see him online or offline on the FOP2 web interface. When I'm using my script, the user is logged on the device but on the interface he still grey (shown as offline).

        Where is this state data stored in the astdb? or how can I do to be able to reflect my user's real state?

        Thanks for your help

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

          The gray state in fop2 is the sip registration/qualify status. It is not set in astdb, it is informed by asterisk using manager events. Best regards,

          1 Reply Last reply
          0
          • S
            S
            stilobix
            wrote on last edited by
            #5

            ok, how can I catch those events to be able to change my user's state from offline to online for exemple? Because when I'm using my script, the user's state is not changing so i'm missing a bit of code that will allow me to make this change.

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

              You cannot change that state, you can change the presence state, or maybe the DND state, but not the registered state (grayed out button).

              Here is the user event needed to change presence state:

              Action: UserEvent
              UserEvent: FOP2ASTDB
              Family: fop2state
              Channel: SIP/606
              Value: Break
              

              At the same time you must set that state in the astdb if you want it to be persistent:

              /fop2state/SIP/606                                : Break 
              

              The best way to play with your custom states is to start fop2_server in debug mode level 15

              /usr/local/fop2/fop2_server -X 15
              

              Best regards,

              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