< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Refresh registration as UAC


2010/2/11 Adam Roach <adam@xxxxxxxxxxx>
Technically, in the REGISTER request, the expiration can be sent in either a Contact "expires" parameter or in a separate Expires header field:

         -  If the field value has an "expires" parameter, that value
            MUST be taken as the requested expiration.

         -  If there is no such parameter, but the request has an
            Expires header field, that value MUST be taken as the
            requested expiration.

         -  If there is neither, a locally-configured default value MUST
            be taken as the requested expiration.

However, it is possible that your registrar isn't set up to look for it in the Contact header field, in which case moving it to the Contact might fix the issues you're seeing. But that would just be a work-around.

In any case, the registrar is out of spec in one way or another (either ignoring the Expires header field, or illegally lengthening the expiration), and a bug report for the registrar vendor is definitely in order.

Here's my REGISTER messsage:

REGISTER sip:192.168.1.106 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.147:24450;branch=z9hG4bK-d8754z-c45c114c4da02e53-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:1002@xxxxxxxxxxxxx:24450;rinstance=05d0664c4a937631>;expires=300
To: <sip:1002@xxxxxxxxxxxxx>
From: <sip:1002@xxxxxxxxxxxxx>;tag=79cb6301
Call-ID: MzI2MTlkMTgxYzdkZjA0MWJjN2RkYTViMWY2Y2JjMTA.
CSeq: 2 REGISTER
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, MESSAGE, NOTIFY, SUBSCRIBE, REFER, INFO
Supported: timer
Authorization: Digest username="1002",realm="192.168.1.106",nonce="e2d5547b-dfd2-4993-9f7d-dcd745fa44bc",uri="sip:192.168.1.106",response="ff820cc8263b64c8c216429f6c7d2c12",cnonce="4e2d127ff73a017a049e990ca8fca34e",nc=00000001,qop=auth,algorithm=MD5
Content-Length: 0

And here's the reply:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.147:24450;branch=z9hG4bK-d8754z-c45c114c4da02e53-1---d8754z-;rport=24450
From: <sip:1002@xxxxxxxxxxxxx>;tag=79cb6301
To: <sip:1002@xxxxxxxxxxxxx>;tag=N2S7Z6BF2KZec
Call-ID: MzI2MTlkMTgxYzdkZjA0MWJjN2RkYTViMWY2Y2JjMTA.
CSeq: 2 REGISTER
Contact: <sip:1002@xxxxxxxxxxxxx:24450;rinstance=05d0664c4a937631>;expires=1200
Date: Thu, 11 Feb 2010 20:09:56 GMT
User-Agent: FreeSWITCH-mod_sofia/1.0.4-hacked
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Content-Length: 0

It seems that the registrar is indeed ignoring my values entirely.

- Richard.