dvoina / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

SIP Registration Timer/Expiration #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Register SIP account w/ IMSDroid
2. Expiration is hardcoded to 600000s
3. Local NAT pinhole expires, no inbound signaling until cycle

What is the expected output? What do you see instead?
The expiration parameter seems to be hardcoded; IMSDroid could benefit a user 
configurable parameter to address NAT pinhole expiration issues (in NATT 
settings page?)

What version of the product are you using? On what operating system?
IM-client/OMA1.0 IMSDroid/v1.2.348 (doubango r538) on HTC Desire/Legend

Please provide any additional information below.
Attempted to use remote keepalive SIP OPTIONS messages to no extent - Forcing 
the registration timeout in the SBC 200 OK reply (via contact 
binding;expire=xxx) has also no effect on the UA, IMSDroid retains the original 
value and does not re-register until 600000s. 

NOTE: The proposed enhancement above, mixed with local IP re-check before 
RE-INVITE could possibly address Issue 71 as well.

Example SIP Invite w/ Expiration value:

 REGISTER sip:xxx@xxx.net SIP/2.0
   Via: SIP/2.0/UDP 192.168.1.6:50922;branch=z9hG4bK765403782;rport
   From: <sip:xxx@xxx.net>;tag=1950918395
   To: <sip:xxx@xxx.net>
   Contact: <sip:xxx@xx.xx.xx.xx:50922;transport=udp>;+g.oma.sip-im;language="en,fr"
   Call-ID: c78ebb1a-9279-32e0-3372-11222dd69eba
   CSeq: 2054049193 REGISTER
   Expires: 600000
   Content-Length: 0
   Max-Forwards: 70
   Route: <sip:xxx.net:5080;lr;transport=udp>
   Event: reg
   Accept: application/reginfo+xml
   Allow-Events: refer, presence, presence.winfo, xcap-diff, conference
   Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER
   Privacy: none
   P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000
   User-Agent: IM-client/OMA1.0 IMSDroid/v1.2.348 (doubango r538)
   P-Preferred-Identity: <sip:xxx@xxx.net>

Original issue reported on code.google.com by webde...@gmail.com on 5 Jan 2011 at 7:55

GoogleCodeExporter commented 9 years ago
The default expiration value is 600000s as specified in 3GPP TS 24.229. Off 
course if the client receive a 200 OK message with a new "expires" it will take 
it.
The new delay is computed like this (as per 24.229):
"IMSDroid reregister the public user identity either 600 seconds before the 
expiration time if the initial registration was for greater than 1200 seconds, 
or when half of the time has expired if the initial registration was for 1200 
seconds or less."
The source code is here: 
http://code.google.com/p/doubango/source/browse/trunk/tinySIP/src/dialogs/tsip_d
ialog.c line 536.

Could you please send the network trace (wireshark) reproducing the issue?

Original comment by boss...@yahoo.fr on 7 Jan 2011 at 3:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for picking this up, appreciated. The expected behaviour as described is 
on spot, but when I actually go force the registration timer from the SBC using 
the expires header field in the registration 200 OK, the UA new expiration 
timer is always off by +60 seconds. In my setup, returning ;expires=180 back to 
IMSDroid UA will cause it to re-register after 240 instead, causing the contact 
to be removed server-side on a strict/probing setup due to the resulting 
negative expiration. 

The above example is for IMSDroid registered on Freeswitch (latest trunk) but I 
will try reproduce with other softswitches I have access to and make sure its 
not a pair-specific condition. 

Will produce pcaps asap and attach them next

Original comment by webde...@gmail.com on 10 Jan 2011 at 8:20

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 6 Feb 2011 at 6:53

GoogleCodeExporter commented 9 years ago
I have an issue that SIP is sending a second REGISTER after 0.5 sec and a third 
REGISTER after 1 sec. I am using the up-to-date IMSDroid version. Please help.

Original comment by shehada2...@googlemail.com on 2 Oct 2013 at 3:56

Attachments: