Well,
It appears to be a timeout problem.... I do get a refresh after 12 hours....I guess it pays to wait.. ;-)
>From the process_response_to_register() code, it appears the mindelta is getting set to the default, 86400.
I think the url_cmp() doesn't like the fact that the proxy sent back the Contact: header with the port #.

Is it safe to change url_cmp() to match if one side doesn't have a port # ?

Colin..

Here is the SIP trace:

01:01:46.816513 10.1.64.123.5060 > 10.3.10.2.5060:  udp 450 (DF) [tos 0x48]
REGISTER sip:10.3.10.2 SIP/2.0
Via: SIP/2.0/UDP 10.1.64.123;rport;branch=z9hG4bKjZX06Q6jg3jKa
Max-Forwards: 70
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166712 REGISTER
Contact: <sip:10.1.64.123>
Expires: 1
User-Agent: sofia-sip/1.11.6
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY
Supported: timer, path
Content-Length: 0

=================================================================================
01:01:46.816513 10.3.10.2.5060 > 10.1.64.123.5060:  udp 458 (DF)
SIP/2.0 401 Unauthorized
WWW-Authenticate: Digest realm="10.3.10.2",nonce="1ca7879c17599544131f5951f0d07115",stale=false,algorithm=MD5,qop="auth"
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166712 REGISTER
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+0+daa5e5a8
Via: SIP/2.0/UDP 10.1.64.123;rport=5060;branch=z9hG4bKjZX06Q6jg3jKa
Server: DC-SIP/2.0
Organization:
Content-Length: 0

=================================================================================
01:01:46.846514 10.1.64.123.5060 > 10.3.10.2.5060:  udp 695 (DF) [tos 0x48]
REGISTER sip:10.3.10.2 SIP/2.0
Via: SIP/2.0/UDP 10.1.64.123;rport;branch=z9hG4bKB5KU85ySDccmc
Max-Forwards: 70
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166713 REGISTER
Contact: <sip:10.1.64.123>
Expires: 1
User-Agent: sofia-sip/1.11.6
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY
Supported: timer, path
Authorization: Digest username="3014243101", realm="10.3.10.2", nonce="1ca7879c17599544131f5951f0d07115", cnonce="o3j/+h3hEimLvJsJherHSQ==", algorithm=MD5, uri="sip:10.3.10.2", response="4e420bbd1c1ea14b97d80a7a34385b48", qop=auth, nc=00000001
Content-Length: 0

=================================================================================
01:01:46.856514 10.3.10.2.5060 > 10.1.64.123.5060:  udp 361 (DF)
SIP/2.0 423 Interval Too Brief
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+0+c19c32fc
Via: SIP/2.0/UDP 10.1.64.123;rport=5060;branch=z9hG4bKB5KU85ySDccmc
Server: DC-SIP/2.0
Organization:
Content-Length: 0
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166713 REGISTER
Min-Expires: 3600

=================================================================================
01:01:46.886515 10.1.64.123.5060 > 10.3.10.2.5060:  udp 698 (DF) [tos 0x48]
REGISTER sip:10.3.10.2 SIP/2.0
Via: SIP/2.0/UDP 10.1.64.123;rport;branch=z9hG4bK5jamtKQ09m5pe
Max-Forwards: 70
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166714 REGISTER
Contact: <sip:10.1.64.123>
Expires: 3600
User-Agent: sofia-sip/1.11.6
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY
Supported: timer, path
Authorization: Digest username="3014243101", realm="10.3.10.2", nonce="1ca7879c17599544131f5951f0d07115", cnonce="o3j/+h3hEimLvJsJherHSQ==", algorithm=MD5, uri="sip:10.3.10.2", response="d450288486560aa8f97861fd83ad4582", qop=auth, nc=00000002
Content-Length: 0

=================================================================================
01:01:46.886515 10.3.10.2.5060 > 10.1.64.123.5060:  udp 372 (DF)
SIP/2.0 200 OK
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+0+7af1de9e
Via: SIP/2.0/UDP 10.1.64.123;rport=5060;branch=z9hG4bK5jamtKQ09m5pe
Server: DC-SIP/2.0
Organization:
Content-Length: 0
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166714 REGISTER
Contact: <sip:10.1.64.123:5060>;EXPIRES=3600

=================================================================================
13:01:46.851060 10.1.64.123.5060 > 10.3.10.2.5060:  udp 698 (DF) [tos 0x48]
REGISTER sip:10.3.10.2 SIP/2.0
Via: SIP/2.0/UDP 10.1.64.123;rport;branch=z9hG4bKy00ev1F75XySg
Max-Forwards: 70
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166715 REGISTER
Contact: <sip:10.1.64.123>
Expires: 3600
User-Agent: sofia-sip/1.11.6
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY
Supported: timer, path
Authorization: Digest username="3014243101", realm="10.3.10.2", nonce="1ca7879c17599544131f5951f0d07115", cnonce="o3j/+h3hEimLvJsJherHSQ==", algorithm=MD5, uri="sip:10.3.10.2", response="eebbd8a1a78d29cea51c2e9dd7b44adc", qop=auth, nc=00000003
Content-Length: 0

=================================================================================
13:01:46.851060 10.3.10.2.5060 > 10.1.64.123.5060:  udp 372 (DF)
SIP/2.0 200 OK
From: <sip:[EMAIL PROTECTED]>;tag=9gQ645gDpZ5Kg
To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+0+5353e584
Via: SIP/2.0/UDP 10.1.64.123;rport=5060;branch=z9hG4bKy00ev1F75XySg
Server: DC-SIP/2.0
Organization:
Content-Length: 0
Call-ID: a3744e10-1de1-1229-bc8b-9b0985eac749
CSeq: 64166715 REGISTER
Contact: <sip:10.1.64.123:5060>;EXPIRES=3600

=================================================================================




Pekka Pessi wrote:
On 2/22/06, Colin Whittaker <[EMAIL PROTECTED]> wrote:
  
 I am not seeing refresh of registration.
    

  
 The SIP trace is as follows:
 nua_register()
 REGISTER ->
 <- 401 Unauthorized
 nua_authenticate()
 REGISTER ->
 <- 423 Interval Too Brief
 REGISTER ->
 <- 200 OK
    

It would be nice to see the messages in detail, please send a trace
with environment variable TPORT_LOG=1, for example.

  
 Which timer is nua using to refresh REGISTER ?
    

Nua goes through the list of contacts in response to REGISTER, if it
founds a URI that matches with a URI in original REGISTER request it
calculates the expiration time of contact with sip_contact_expires().
That is a function which uses  expires parameter (and if there is
none, Expires header) to calculate the expiration time. If there was
multiple matching URIs, the lowest expiration time is selected.

There is a timer associated with nua_dialog_usage_t.
dialog_usage_set_refresh() takes the expiration time and sets the
timer at midpoint. If your contact has expiration time of 3600
seconds, the re-register should be sent after 1800 seconds. If the
expiration time is less than five minutes, the re-register is sent 30
seconds before expiration.

This can be fooled in multiple ways. The function url_cmp() used to
match URLs does not take parameters in account, so if you register a
contact like <sip:192.219.12.21;foo=bar> and there is already another
contact <sip:192.219.12.21;foo=baz>, it matches both.

If your registrar returned contacts with expire=0 and they match with
contacts which you tried to register, the expiration time is set to 0
and re-register is never made.

--
Pekka.Pessi mail at nokia.com


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
  
------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Sofia-sip-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to