juniorlm87 / csipsimple

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

Sporadic app sent two contacts in REGISTER message #2873

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Sometimes app has sent two contacts in REGISTER
Contact: <sip:5ZaTk5rZCKgFprLWBil6@172.31.42.112>;expires=900;reg-id=1;
+sip.instance="<urn:uuid:00000000-0000-0000-0000-0000e922f243>" 
Expires: 900
Contact: <sip:+gsDTFIKKQEskUgn1CzM@172.31.42.112>;expires=0

2. SIP server rejects REGISTER with 
SIP/2.0 400 Invalid Request (more than one contact in REGISTER)
3.

What is the expected output? What do you see instead?

Is it possible to block sending two Contacts header in REGISTER

What version of the product are you using? On what device / operating
system?
CSipSimple 1.02.03 r2457, HTC mini , Android 4.4.2, 
HTC Sense version 6.0, Software 4.14.401.1, HTC SDK API level6.20
Kernal version 3.4.10-g3862988

Please provide any additional information below.

Original issue reported on code.google.com by stoja...@gmail.com on 21 Jan 2015 at 3:09

GoogleCodeExporter commented 9 years ago

Contact: <sip:+gsDTFIKKQEskUgn1CzM@172.31.42.112>;expires=0   
==> this means "unregister previous contact".
This is SIP valid. It's used because the previous registration is known as 
being obsolete and tries to unregister it to a register a new one.

Some buggy sip servers does not support that (while it's totally valid 
according to sip specs). In this case, you can enable a workaround setting in 
csipsimple account config so that csipsimple instead unregister first, and then 
register later.
It does not work with "try to clean registration" option however that takes 
advantage of a hook in registration (while legacy re-register is directly 
supported inside pjsip stack).

More info on how to use the "legacy" way to unregister :
https://code.google.com/p/csipsimple/wiki/FAQ?wl=en#I_receive_calls_twice_/_Regi
stration_is_done_on_the_sip_server_t

If you have control on sip server, a better way is probably to upgrade it or 
fix it if it appears to lead to problems on server side. CSipSimple will not be 
the only app that could behaves this way since it's something valid regarding 
RFC (and other apps might not have an hidden expert option to change the way it 
re-register)

Original comment by r3gis...@gmail.com on 8 Feb 2015 at 5:34

GoogleCodeExporter commented 9 years ago
Thanks,

It works when I've disabled "Try to clean registers".

Thanks again

Original comment by stoja...@gmail.com on 9 Feb 2015 at 11:35