[OpenSIPS-Users] get expires from REGISTER

Liviu Chircu liviu at opensips.org
Mon Nov 27 07:14:34 EST 2017


Hi Dragomir,

There is no "Expires" in REGISTER, so $hdr(expires) prints "<null>". Try 
$(hdr(Contact){uri.param,expires}).

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 27.11.2017 13:46, Dragomir Haralambiev wrote:
> Hello,
>
> I try to get expires from REGISTER.
> xlog("Expires=$hdr(expires)\n");
>
> I receive this:
> Expires=<null>
>
> Here is REGISTER
>
> Session Initiation Protocol (SIP as raw text)
>     REGISTER sip:sip-server.com:5060 <http://sip-server.com:5060> 
> SIP/2.0\r\n
>     Accept: application/reginfo+xml, application/sdp, 
> application/simple-message-summary, message/sipfrag, multipart/mixed, 
> multipart/related\r\n
>     Via: SIP/2.0/UDP 
> 10.152.220.38:5062;branch=z9hG4bKde569c7a0f7678fe1;rport\r\n
>     Max-Forwards: 70\r\n
>     From: "55555555" <sip:55555555 at sip-server.com:5060 
> <http://sip:55555555@sip-server.com:5060>>;tag=026b9b8a13\r\n
>     To: "55555555" <sip:55555555 at sip-server.com:5060 
> <http://sip:55555555@sip-server.com:5060>>\r\n
>     Call-ID: de52071eacc30295\r\n
>     CSeq: 448743846 REGISTER\r\n
>     Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, REFER, 
> SUBSCRIBE, UPDATE\r\n
>     Contact: <sip:55555555 at 10.152.220.38:5062 
> <http://sip:55555555@10.152.220.38:5062>>;audio;expires=120\r\n
>     User-Agent: Media5-fone/4.25.4.13060 Android/8.0.0\r\n
>     Content-Length: 0\r\n
>     \r\n
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171127/031721fe/attachment.html>


More information about the Users mailing list