Hi; The Contact in the OK response is missing the expires parameter. Each contact in the OK response to a REGISTER request must carry an expires parameter, this expires is added by the Registrar server.
Regards Inca On Jul 31, 2009, at 5:05 PM, Jim Thomas wrote: > Hello Jerry, > > It looks like you and I have run into the same issue. Please see my > recent post 'Registration issue with SIP server behind SBC'. > > I think Sofia-SIP is doing the right thing. From RFC 3261: > > The 200 (OK) response from the registrar contains a list of Contact > fields enumerating all current bindings. The UA compares each > contact address to see if it created the contact address, using > comparison rules in Section 19.1.4. If so, it updates the > expiration > time interval according to the expires parameter or, if absent, the > Expires field value. The UA then issues a REGISTER request for each > of its bindings before the expiration interval has elapsed. It MAY > combine several updates into one REGISTER request. > > That sounds like the SIP designers intended for the original Contact > header to be preserved in the response as a correlation hook. > > However, we still need a way to integrate with systems that perhaps > improperly modify the Contact header. > > Since controlling the behavior of the far end system is typically > beyond our control, one approach might be for Sofia-SIP to use the > value in the Expires header in the 200 OK response if the Contact > header has been changed such that it no longer correlates and the > 'expires' parameter in that header will not be used. > > My reading of the RFC 3261 excerpt above seems like maybe this is > the intended behavior of the SIP stack anyway. > > I haven't reviewed the Sofia-SIP source, but in my case, the 200 OK > response with the modified Contact header *does* also include a > separate Expires header, and the value in that Expires header is not > being used by Sofia-SIP as a fall-back registration fallback, so I > assume Sofia-SIP is not using that as a fall-back when the Contact > header URIs do not correlate. > > I would be interested to learn what solution you or the Sofia-SIP > maintainers come up with. > > Thanks. > > Jim > > > > ----- Original Message ---- > From: Jerry Richards <jer...@tonecommander.com> > To: sofia-sip-devel@lists.sourceforge.net > Sent: Thursday, July 30, 2009 5:39:22 PM > Subject: Re: [Sofia-sip-devel] REGISTER Refreshing Error? > > Okay, I found the code that is causing sofia-sip to use the default > Expires > value instead of the value specified by the server. It is in the > nua_register_client_response() function in the > libsofia-sip-ua/nua/nua_register.c file. > > It appears a for-loop check in this function is comparing the sent > Contact > URL to the received Contact URL which is always different (because > the sent > URL is the phone's URL and the received URL is the server's URL), > thus the > code that sets the refresh time to the received Expires value is never > getting invoked. > > Jerry > > > -----Original Message----- > From: Jerry Richards [mailto:jer...@tonecommander.com] > Sent: Monday, July 27, 2009 11:04 AM > To: 'sofia-sip-devel@lists.sourceforge.net' > Subject: REGISTER Refreshing Error? > > Hello, > > I am using version 1.12.9 and noticed the sofia-sip stack setting the > register refresh timer to the wrong value. That is, the 200 OK > includes > "Expires: 60", but sofia-sip logs this: > > "nua(): refresh register after 1905 seconds (in [900..2700])". > > Here is the 200 OK content: > > Status-Line: SIP/2.0 200 OK > Message Header: > To: ... > From: ... > Call-ID: ... > Via: ... > User-Agent: ... > Max-Forwards: ... > Contact: sip:6...@192.168.72.128:5060 > Cseq: 118227582 REGISTER > Expires: 60 > Content-Length: 0 > > Do you know why the timer could be wrong? It looks like it's > getting set to > the default 3600 seconds. > > Best Regards, > Jerry > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel > > > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel