<div dir="ltr"><div><div><div>Hi,<br><br></div>In case when client do not unregister properly, for example in case when I'm killing sip-client process at my PC there will no be any unregister messages and in this case I will not be able to track this client properly and next register message from this client will be ignored if I implement solution as you proposed.<br><br></div>With kind regards,<br><br></div>Jurijs<br><div><div><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-11 13:46 GMT+02:00 Matthew Jordan <span dir="ltr"><<a href="mailto:mjordan@digium.com" target="_blank">mjordan@digium.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 3:24 AM, Jurijs Ivolga <span dir="ltr"><<a href="mailto:jurij.ivo@gmail.com" target="_blank">jurij.ivo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>Problem is that if I will wait for "PeerStatus: Registered" message then next time when phone will re-register message will be completely same and there is no possible to understand if it is re-registration or completely new registration.<br><br></div>This message I got when my sip-client re-register<br><div><br>Event: PeerStatus<br>Privilege: system,all<br>SequenceNumber: 8<span><br>File: manager.c<br>Line: 1459<br>Func: manager_default_msg_cb<br>ChannelType: SIP<br>Peer: SIP/+1111111111<br></span>PeerStatus: Registered<br>Address: <a href="http://192.168.1.152:5060" target="_blank">192.168.1.152:5060</a><br><br></div><div>This message I got when my sip-client register<br></div><div><br>Event: PeerStatus<br>Privilege: system,all<br>SequenceNumber: 4<span><br>File: manager.c<br>Line: 1459<br>Func: manager_default_msg_cb<br>ChannelType: SIP<br>Peer: SIP/+1111111111<br></span>PeerStatus: Registered<br>Address: <a href="http://192.168.1.152:5060" target="_blank">192.168.1.152:5060</a><br><br></div><div>As you can see they are same. Maybe you have better idea how I can trigger a script after registration and do not trigger it after each re-registration.<br><br></div><div><br></div></div></blockquote><div><br></div><div>You have to keep track of the status of the devices in your script. If a device unregisters, you'll get an update with a PeerStatus of Unregistered. If your goal is only to respond on initial registration, your script should ignore subsequent "Registered" updates until it sees an Unregistered.<span class=""><font color="#888888"><br><br></font></span></div></div><span class=""><font color="#888888">-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
asterisk-app-dev mailing list<br>
<a href="mailto:asterisk-app-dev@lists.digium.com">asterisk-app-dev@lists.digium.com</a><br>
<a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev</a><br>
<br></blockquote></div><br></div></div></div></div></div></div></div></div></div>