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=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to