[asterisk-users] On SIP REGISTER event trigger a AGI script

Danny Nicholas danny at debsinc.com
Thu Nov 15 15:32:07 CST 2012


Check for Status on these commands.  If it comes back "OK" the peer is
registered.  If not, it should return "UNKNOWN".

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Face
Sent: Thursday, November 15, 2012 12:15 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] On SIP REGISTER event trigger a AGI script

On Wed, Nov 14, 2012 at 7:42 PM, Steve Edwards <asterisk.org at sedwards.com>
wrote:
>> On Wed, 14 Nov 2012, Face wrote:
>>
>>>>> Is there a way I can trigger a AGI script On SIP REGISTER event.
>
>
> On Wed, 14 Nov 2012, Danny Nicholas wrote:
>
>> What you will need to do is to monitor for the SIP REGISTER in AMI, 
>> then launch a local channel call to run your AGI process.  If the 
>> process is not time-critical, you could monitor the logs to cut down on
AMI traffic.
>
>
> Just for clarity...
>
> If the OP's script does not interact with Asterisk using the AGI 
> protocol, it is not an 'AGI' and does not need any channel.
>
> If the OP's 'goal' is something like 'when Asterisk receives a 
> REGISTER, I want to update a counter in my MySQL database' then no channel
is needed.
>
> Hey, OP, if we know what you are trying to accomplish, maybe we can 
> suggest a solution rather than answering a 'feature' question.
>
> --
> Thanks in advance,
> -------------------------------------------------------------------------
> Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
> Newline                                              Fax: +1-760-731-3000
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- 
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users



I have a related question. I need to know if a SIP peer is registered or
unregistered. I try :

CLI
------------------------------
sip show peer 6000



AMI
------------------------------
Action: SIPShowPeer
Peer: 6000


AMI
------------------------------
Action: ExtensionState
Exten: 1



noun of those return anything about the SIP peer is registered or
unregistered!


--
Sincerely,
falazemi

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list