[Asterisk-Dev] Thoughts on a context for dialplan execution upon a sip or iax register?

John Todd jtodd at loligo.com
Sun Apr 24 12:07:09 MST 2005


At 9:21 AM -0700 on 4/24/05, Kevin P. Fleming wrote:
>
>It's an interesting thought, although obviously you wouldn't be able 
>to run any applications that handle a media stream.
>
>What do you see being a potential use for this functionality?


I see this as a good idea, and I would add to this suggestion.  I 
would say that both registration and UNregistration events should 
call that context, perhaps with different prefixes.  Perhaps a 
registration event causes "r1234" to be the extension called, and 
unregistration causes "u1234" to be called, where "1234" is the 
extension that is registering.  Stripping off that first 
character/digit should be fairly easy to make decisions.

I could see several things off the top of my head that would be 
possible with this feature:

  - when my laptop SIP client registers, all my calls go to my mobile 
SIP client and no longer ring on my desk by a previously-set value 
via a DBPut from the registration (this is a different functionality 
than using SIP/1234&SIP/9876, since only one line rings at any time)

  - my deskphone should always be registered.  When my deskphone falls 
out of registration, that is bad.  When my phone comes back on-line, 
I would like to immediately get a call from an automated system that 
says "Your phone was unregistered for X minutes due to network 
problems"

  - Also in the previous example, when my deskphone falls out of 
registration, I'd like to get a call from the system (via a Zap 
channel) to my cellphone that my deskphone has gone away.

  - I'd like to test ${SIPUSERAGENT} on registration, to see if I have 
"registration fights" between two devices which are configured with 
the same username/password.  Instead of doing this on the INVITE, I'd 
like to do it on the REGISTER.


NOTE: Some of these examples could be implemented with the 
"regcontext=" feature and some acrobatic dialplan work.  I find the 
regcontext= feature to be useful, but not "real-time" in nature. 
(http://www.voip-info.org/wiki-Asterisk+sip+regcontext)


JT



More information about the asterisk-dev mailing list