<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">I try before , I connect AMI by telnet localhost ..</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">In this session , if I register a softphone or unregiser from softphone ,</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">There is event message and show peer no : XXX ,<VAR id=yui-ie-cursor></VAR>and show register or unregister .</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">You can capture this message and do further what you want .......</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">Regad/chui king man </SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div><BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; MARGIN-TOP: 5px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr readonly="true" contenteditable="false"></DIV><B><SPAN style="FONT-WEIGHT: bold">寄件人︰</SPAN></B> Face <falazemi@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">收件人︰</SPAN></B> Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com> <BR><B><SPAN style="FONT-WEIGHT: bold">傳送日期︰</SPAN></B> 2012年11月16日 (週五) 9:55 AM<BR><B><SPAN style="FONT-WEIGHT: bold">主題︰</SPAN></B> Re: [asterisk-users] On SIP REGISTER event trigger a AGI script<BR></FONT></DIV><BR>On Fri, Nov 16, 2012 at 12:32 AM, Danny Nicholas <<A href="mailto:danny@debsinc.com" ymailto="mailto:danny@debsinc.com">danny@debsinc.com</A>>
wrote:<BR>> Check for Status on these commands. If it comes back "OK" the peer is<BR>> registered. If not, it should return "UNKNOWN".<BR>><BR>> -----Original Message-----<BR>> From: <A href="mailto:asterisk-users-bounces@lists.digium.com" ymailto="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</A><BR>> [mailto:<A href="mailto:asterisk-users-bounces@lists.digium.com" ymailto="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</A>] On Behalf Of Face<BR>> Sent: Thursday, November 15, 2012 12:15 PM<BR>> To: Asterisk Users Mailing List - Non-Commercial Discussion<BR>> Subject: Re: [asterisk-users] On SIP REGISTER event trigger a AGI script<BR>><BR>> On Wed, Nov 14, 2012 at 7:42 PM, Steve Edwards <<A href="mailto:asterisk.org@sedwards.com" ymailto="mailto:asterisk.org@sedwards.com">asterisk.org@sedwards.com</A>><BR>>
wrote:<BR>>>> On Wed, 14 Nov 2012, Face wrote:<BR>>>><BR>>>>>>> Is there a way I can trigger a AGI script On SIP REGISTER event.<BR>>><BR>>><BR>>> On Wed, 14 Nov 2012, Danny Nicholas wrote:<BR>>><BR>>>> What you will need to do is to monitor for the SIP REGISTER in AMI,<BR>>>> then launch a local channel call to run your AGI process. If the<BR>>>> process is not time-critical, you could monitor the logs to cut down on<BR>> AMI traffic.<BR>>><BR>>><BR>>> Just for clarity...<BR>>><BR>>> If the OP's script does not interact with Asterisk using the AGI<BR>>> protocol, it is not an 'AGI' and does not need any channel.<BR>>><BR>>> If the OP's 'goal' is something like 'when Asterisk receives a<BR>>> REGISTER, I want to update a counter in my MySQL database' then no channel<BR>> is
needed.<BR>>><BR>>> Hey, OP, if we know what you are trying to accomplish, maybe we can<BR>>> suggest a solution rather than answering a 'feature' question.<BR>>><BR>>> --<BR>>> Thanks in advance,<BR>>> -------------------------------------------------------------------------<BR>>> Steve Edwards <A href="mailto:sedwards@sedwards.com" ymailto="mailto:sedwards@sedwards.com">sedwards@sedwards.com</A> Voice: +1-760-468-3867 PST<BR>>> Newline Fax: +1-760-731-3000<BR>>><BR>>> --<BR>>> _____________________________________________________________________<BR>>> -- Bandwidth and Colocation Provided by <A href="http://www.api-digital.com/" target=_blank>http://www.api-digital.com/</A>
--<BR>>> New to Asterisk? Join us for a live introductory webinar every Thurs:<BR>>> <A href="http://www.asterisk.org/hello" target=_blank>http://www.asterisk.org/hello</A><BR>>><BR>>> asterisk-users mailing list<BR>>> To UNSUBSCRIBE or update options visit:<BR>>> <A href="http://lists.digium.com/mailman/listinfo/asterisk-users" target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>><BR>><BR>><BR>> I have a related question. I need to know if a SIP peer is registered or<BR>> unregistered. I try :<BR>><BR>> CLI<BR>> ------------------------------<BR>> sip show peer 6000<BR>><BR>><BR>><BR>> AMI<BR>> ------------------------------<BR>> Action: SIPShowPeer<BR>> Peer: 6000<BR>><BR>><BR>> AMI<BR>> ------------------------------<BR>> Action: ExtensionState<BR>> Exten:
1<BR>><BR>><BR>><BR>> noun of those return anything about the SIP peer is registered or<BR>> unregistered!<BR>><BR>><BR>> --<BR>> Sincerely,<BR>> falazemi<BR>><BR>> --<BR>> _____________________________________________________________________<BR>> -- Bandwidth and Colocation Provided by <A href="http://www.api-digital.com/" target=_blank>http://www.api-digital.com/</A> -- New to<BR>> Asterisk? Join us for a live introductory webinar every Thurs:<BR>> <A href="http://www.asterisk.org/hello" target=_blank>http://www.asterisk.org/hello</A><BR>><BR>> asterisk-users mailing list<BR>> To UNSUBSCRIBE or update options visit:<BR>> <A href="http://lists.digium.com/mailman/listinfo/asterisk-users" target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>><BR>><BR>> --<BR>>
_____________________________________________________________________<BR>> -- Bandwidth and Colocation Provided by <A href="http://www.api-digital.com/" target=_blank>http://www.api-digital.com/</A> --<BR>> New to Asterisk? Join us for a live introductory webinar every Thurs:<BR>> <A href="http://www.asterisk.org/hello" target=_blank>http://www.asterisk.org/hello</A><BR>><BR>> asterisk-users mailing list<BR>> To UNSUBSCRIBE or update options visit:<BR>> <A href="http://lists.digium.com/mailman/listinfo/asterisk-users" target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR><BR><BR>I try all of those<BR>------------------------------<BR>Action: Status<BR>Peer: 600<BR><BR>Action: Status<BR>Exten: 600<BR><BR>Action: Status<BR>SIP: 600<BR><BR><BR><BR>the return is this<BR>------------------------------<BR>Response: Success<BR>Message: Channel status
will follow<BR><BR>Event: StatusComplete<BR>Items: 0<BR><BR>Response: Success<BR>Message: Channel status will follow<BR><BR>Event: StatusComplete<BR>Items: 0<BR><BR>Response: Success<BR>Message: Channel status will follow<BR><BR>Event: StatusComplete<BR>Items: 0<BR><BR><BR>-- <BR>Sincerely,<BR>falazemi<BR><BR>--<BR>_____________________________________________________________________<BR>-- Bandwidth and Colocation Provided by <A href="http://www.api-digital.com/" target=_blank>http://www.api-digital.com/</A> --<BR>New to Asterisk? Join us for a live introductory webinar every Thurs:<BR> <A href="http://www.asterisk.org/hello" target=_blank>http://www.asterisk.org/hello</A><BR><BR>asterisk-users mailing list<BR>To UNSUBSCRIBE or update options visit:<BR> <A href="http://lists.digium.com/mailman/listinfo/asterisk-users"
target=_blank>http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR><BR><BR></DIV></DIV></BLOCKQUOTE></div></div></body></html>