[asterisk-users] What is the best way to share extension state

asterisk-users at rogg.is asterisk-users at rogg.is
Sun Jul 5 19:09:25 CDT 2009


Greetings.

I wonder what is the best way in your opinion to share real-time extension
state with applications outside of asterisk?

What I'm after is the best way to have Asterisk update a central repository
with the state of each extension configured in the local Asterisk setup.

To try and explain what I am trying to achieve, Imagine for example if
asterisk would call a url like this: 

"http://myserver/updatestatus.php?ext=101&state=idle"
"http://myserver/updatestatus.php?ext=101&state=ringing"
"http://myserver/updatestatus.php?ext=101&state=occupied"

for every state change of every extensions.

I've already looked closely at a few ways to do this. The closest I've come
so far is thinking in this direction:

1) Set up a process that does SIP SUBSCRIBE to read hints from Asterisk
extensions.
2) Use jabber integration to somehow achieve this.
3) Hook into the AMI and parse the ExtensionStatusEvent which I think gives
me what I want.

Possible problems with the things I've considered so far may be for example:

o Extensions that are part of a queue (making sure state is 
  reflected even if the ext is ringing as part of a queue ringing).
o Making sure the process can recover even if the monitoring entity 
  needs to be restarted.

I'm very curious to hear what your take on this is and if this has perhaps
been solved elegantly already? Thank you for considering this question and
your time spent thinking about this and possibly replying with your
thoughts.

Sincerely,
Baldvin







More information about the asterisk-users mailing list