[asterisk-app-dev] CALLID header in SuccessfulAuth manager message
Matthew Jordan
mjordan at digium.com
Thu Sep 11 06:46:09 CDT 2014
On Thu, Sep 11, 2014 at 3:24 AM, Jurijs Ivolga <jurij.ivo at gmail.com> wrote:
> Hi,
>
> 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.
>
> This message I got when my sip-client re-register
>
> Event: PeerStatus
> Privilege: system,all
> SequenceNumber: 8
> File: manager.c
> Line: 1459
> Func: manager_default_msg_cb
> ChannelType: SIP
> Peer: SIP/+1111111111
> PeerStatus: Registered
> Address: 192.168.1.152:5060
>
> This message I got when my sip-client register
>
> Event: PeerStatus
> Privilege: system,all
> SequenceNumber: 4
> File: manager.c
> Line: 1459
> Func: manager_default_msg_cb
> ChannelType: SIP
> Peer: SIP/+1111111111
> PeerStatus: Registered
> Address: 192.168.1.152:5060
>
> 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.
>
>
>
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.
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20140911/b6f6ca86/attachment.html>
More information about the asterisk-app-dev
mailing list