[asterisk-dev] Run extension script on SIP peer registration

Olle E. Johansson oej at edvina.net
Wed Sep 30 07:06:50 CDT 2009


30 sep 2009 kl. 09.49 skrev Kirill 'Big K' Katsnelson:

> Is my understanding correct that currently there is no way to get any
> reaction to a SIP peer registration, e. g. add the newly registered  
> peer
> into a queue, other than through an external AMI process?
No. We have no concept of running dialplan without a call, or related  
to a previous call ("h" extension).

>
> If I am not missing something and this is correct, do you think that
> invoking an extension script on such events would be too hacky an
> approach to the problem? (practically, with ast_pbx_outgoing_*() in  
> the
> name of a Local channel). Seems to me very flexible: one can use
> applications, call AGI, whatever. But I should say I am very
> inexperienced in Asterisk internals to make a good architectural
> decision here. Any downside in that approach? Any better solution you
> would think of?

I am afraid of all the apps that expect a call to be running or about  
to be setup.

In voicemail we have hooks to external shell scripts, which is a  
better a more flexible solution.

However, it will be hard for you since we're running this at every  
registration, regardless if it's a first registration or a re- 
registration.

You propably want a hook for when we loose contact as well. I think it  
would be better to hook into the qualify subsystem for these kind of  
events.

/O



More information about the asterisk-dev mailing list