[asterisk-app-dev] CALLID header in SuccessfulAuth manager message

Olivier oza.4h07 at gmail.com
Thu Sep 11 05:01:43 CDT 2014


You cannot configure that: it has to be integrated in source code.
Sorry for confusing.

2014-09-11 11:50 GMT+02:00 Jurijs Ivolga <jurij.ivo at gmail.com>:
> Hi,
>
> How I can add RegisrationDuration field to "PeerStatus: Registered"
> messages?
>
> With kind regards,
>
> Jurijs
>
> 2014-09-11 11:15 GMT+02:00 Olivier <oza.4h07 at gmail.com>:
>>
>> Adding a RegisrationDuration field in each PeerStatus/Registered event
>> seems simple to implement as it strictly follow REGISTERs content.
>>
>> Then, a third party app listening to such PeerStatus/Registered events
>> and recording when such events occur would have everything needed to
>> decide whether re-registration occured (event received on schedule) or
>> not.
>>
>> 2014-09-11 10:24 GMT+02:00 Jurijs Ivolga <jurij.ivo at gmail.com>:
>> > 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.
>> >
>> > With kind regards,
>> >
>> > Jurijs
>> >
>> > 2014-09-10 17:40 GMT+02:00 Matthew Jordan <mjordan at digium.com>:
>> >>
>> >>
>> >>
>> >> On Wed, Sep 10, 2014 at 9:40 AM, Jurijs Ivolga <jurij.ivo at gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> I'm creating application which should be triggered after peer
>> >>> registration. I'm listening on manager interface for events. Following
>> >>> event
>> >>> I'm getting when peer are registered:
>> >>>
>> >>> Event: SuccessfulAuth
>> >>> Privilege: security,all
>> >>> SequenceNumber: 214
>> >>> File: manager.c
>> >>> Line: 1459
>> >>> Func: manager_default_msg_cb
>> >>> EventTV: 2014-09-10T10:38:47.508+0200
>> >>> Severity: Informational
>> >>> Service: SIP
>> >>> EventVersion: 1
>> >>> AccountID: +1234567890
>> >>> SessionID: 0x7f4f6431fc88
>> >>> LocalAddress: IPV4/UDP/192.168.1.174/5060
>> >>> RemoteAddress: IPV4/UDP/192.168.1.152/36623
>> >>> UsingPassword: 1
>> >>>
>> >>> When I got this event I'm triggering my script. When peer tries to
>> >>> unregister or re-register, then SessionID should be same as for
>> >>> initial
>> >>> register message(I believe so). Sometimes after new registration
>> >>> SessionID
>> >>> is not updated and in this case my script ignores this message, cause
>> >>> it is
>> >>> assuming that it is re-registration.
>> >>
>> >>
>> >> This is a security event, which is not related to a channel. For all we
>> >> know, something just registered; that doesn't mean there is an active
>> >> call
>> >> between this Account and Asterisk.
>> >>
>> >> If you want to know when a peer registers, you should use the
>> >> PeerStatus
>> >> event, as you allude to later.
>> >>
>> >>
>> >>>
>> >>>
>> >>> As solution I assumed I can use sip header CALLID, but it is not
>> >>> possible
>> >>> to include it in manager SuccessfulAuth messages, I tried to add to
>> >>> manager.conf following line:
>> >>>
>> >>> channelvars = SIPCALLID
>> >>>
>> >>> But it do not helps, it shows SIPCALLID for other manager messages but
>> >>> not for SuccessfulAuth messages.
>> >>
>> >>
>> >> It will not show up, as there is no channel. You can't emit channelvars
>> >> on
>> >> events that have nothing to do with an active channel.
>> >>
>> >>>
>> >>>
>> >>> Additionally I do not understand why PeerStatus: Reachable
>> >>> message(which
>> >>> you can find below) is not generated for each registration. 50% of
>> >>> registration I see this message, but I should be able to get it for
>> >>> each
>> >>> registration.
>> >>>
>> >>> Event: PeerStatus
>> >>> Privilege: system,all
>> >>> SequenceNumber: 220
>> >>> File: manager.c
>> >>> Line: 1459
>> >>> Func: manager_default_msg_cb
>> >>> ChannelType: SIP
>> >>> Peer: SIP/+1111111111
>> >>> PeerStatus: Reachable
>> >>
>> >>
>> >> A PeerStatus of Reachable does not imply that a peer has registered,
>> >> merely that the peer is now reachable (based on qualify attempts). You
>> >> should get a PeerStatus event when a peer first registers, with a
>> >> PeerStatus
>> >> header of "Registered".
>> >>
>> >> --
>> >> 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
>> >>
>> >> _______________________________________________
>> >> asterisk-app-dev mailing list
>> >> asterisk-app-dev at lists.digium.com
>> >> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>> >>
>> >
>> >
>> > _______________________________________________
>> > asterisk-app-dev mailing list
>> > asterisk-app-dev at lists.digium.com
>> > http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>> >
>>
>> _______________________________________________
>> asterisk-app-dev mailing list
>> asterisk-app-dev at lists.digium.com
>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>
>
>
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>



More information about the asterisk-app-dev mailing list