UDP size thresdhold and fallback to UDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  I forgot to add that it fails after timeout, it is maybe important. 
Besides, I've tested with a sip server that doesn't support tcp but 
refuse directly connection and fallback works properly. But in case of 
timeout it doesn't retry with UDP as transport.

Below the log I got, as you see, there is only the tcp timeout and then 
no try is done on UDP.
First is the UDP first invite, then we have a 407 that requires auth, 
and then as the next message is longer than 1300, so it use the TCP 
transport (that is what I understand from logs). Finally TCP timeout and 
the call end.

However, it is maybe a limitation due to the fact it is a timeout and 
not a clean refuse?
But it would probably make sense to try anyway on UDP : as I said, if I 
attach the account to the UDP transport it works fine.


01-08 04:38:40.453: DEBUG/libpjsip(598):  04:38:40.463   pjsua_core.c  
TX 1110 bytes Request msg INVITE/cseq=20133 (tdta0x3dc238) to UDP 
212.27.52.5:5060:
01-08 04:38:40.453: DEBUG/libpjsip(598): INVITE 
sip:04xxxxxx at freephonie.net SIP/2.0
01-08 04:38:40.453: DEBUG/libpjsip(598): Via: SIP/2.0/UDP 
83.206.185.81:1113;rport;branch=z9hG4bKPjGMc7IBRp1fZEpPMmLu1fko8JALVv69na
01-08 04:38:40.453: DEBUG/libpjsip(598): Max-Forwards: 70
01-08 04:38:40.453: DEBUG/libpjsip(598): From: 
<sip:09xxxxxxxx at freephonie.net>;tag=4z92T2TUU-15F1BmZ.9t-cOOV-x9FlkJ
01-08 04:38:40.453: DEBUG/libpjsip(598): To: sip:04xxxxxxxx at freephonie.net
01-08 04:38:40.453: DEBUG/libpjsip(598): Contact: 
<sip:0953949016 at 83.206.185.81:1113;transport=UDP>
01-08 04:38:40.453: DEBUG/libpjsip(598): Call-ID: 
Oe-.NHAmoQNc44Njh6sMgx7LfUwypFAX
01-08 04:38:40.453: DEBUG/libpjsip(598): CSeq: 20133 INVITE
01-08 04:38:40.453: DEBUG/libpjsip(598): Allow: PRACK, INVITE, ACK, BYE, 
CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
01-08 04:38:40.453: DEBUG/libpjsip(598): Supported: replaces, 100rel, 
timer, norefersub
01-08 04:38:40.453: DEBUG/libpjsip(598): Session-Expires: 1800
01-08 04:38:40.453: DEBUG/libpjsip(598): Min-SE: 90
01-08 04:38:40.453: DEBUG/libpjsip(598): User-Agent: CSipSimple
01-08 04:38:40.453: DEBUG/libpjsip(598): Content-Type: application/sdp
01-08 04:38:40.453: DEBUG/libpjsip(598): Content-Length:   465
01-08 04:38:40.453: DEBUG/libpjsip(598):
01-08 04:38:40.453: DEBUG/libpjsip(598): v=0
01-08 04:38:40.453: DEBUG/libpjsip(598): o=- 2525139520 2525139520 IN 
IP4 172.20.254.194
01-08 04:38:40.453: DEBUG/libpjsip(598): s=pjmedia
01-08 04:38:40.453: DEBUG/libpjsip(598): c=IN IP4 172.20.254.194
01-08 04:38:40.453: DEBUG/libpjsip(598): t=0 0
01-08 04:38:40.453: DEBUG/libpjsip(598): a=X-nat:0
01-08 04:38:40.453: DEBUG/libpjsip(598): m=audio 4000 RTP/AVP 0 8 102 
109 9 3 104 103 101
01-08 04:38:40.453: DEBUG/libpjsip(598): a=rtcp:4001 IN IP4 172.20.254.194
01-08 04:38:40.453: DEBUG/libpjsip(598): a=rtpmap:0 PCMU/8000
01-08 04:38:40.453: DEBUG/libpjsip(598): a=rtpmap:8 PCMA/8000
01-08 04:38:40.453: DEBUG/libpjsip(598): a=rtpmap:102 speex/8000
01-08 04:38:40.453: DEBUG/libpjsip(598): a=
01-08 04:38:40.463: INFO/libpjsip(598):  04:38:40.472 pjsua_wrap.cpp  
Call 0 state changed to CALLING
01-08 04:38:40.583: DEBUG/libpjsip(598):  04:38:40.586   pjsua_core.c  
RX 337 bytes Response msg 100/INVITE/cseq=20133 (rdata0x34bf2c) from UDP 
212.27.52.5:5060:
01-08 04:38:40.583: DEBUG/libpjsip(598): SIP/2.0 100 Trying
01-08 04:38:40.583: DEBUG/libpjsip(598): Call-ID: 
Oe-.NHAmoQNc44Njh6sMgx7LfUwypFAX
01-08 04:38:40.583: DEBUG/libpjsip(598): CSeq: 20133 INVITE
01-08 04:38:40.583: DEBUG/libpjsip(598): From: 
<sip:09xxxxxxxx at freephonie.net>;tag=4z92T2TUU-15F1BmZ.9t-cOOV-x9FlkJ
01-08 04:38:40.583: DEBUG/libpjsip(598): To: 
<sip:04xxxxxxxx at freephonie.net>
01-08 04:38:40.583: DEBUG/libpjsip(598): Via: SIP/2.0/UDP 
83.206.185.81:1113;received=83.206.185.81;rport=1113;branch=z9hG4bKPjGMc7IBRp1fZEpPMmLu1fko8JALVv69na 

01-08 04:38:40.583: DEBUG/libpjsip(598): Content-Length: 0
01-08 04:38:40.583: DEBUG/libpjsip(598):
01-08 04:38:40.583: DEBUG/libpjsip(598): --end msg--
01-08 04:38:40.583: DEBUG/libpjsip(598):  04:38:40.593   pjsua_core.c  
RX 700 bytes Response msg 407/INVITE/cseq=20133 (rdata0x34bf2c) from UDP 
212.27.52.5:5060:
01-08 04:38:40.583: DEBUG/libpjsip(598): SIP/2.0 407 authentication 
required
01-08 04:38:40.583: DEBUG/libpjsip(598): Call-ID: 
Oe-.NHAmoQNc44Njh6sMgx7LfUwypFAX
01-08 04:38:40.583: DEBUG/libpjsip(598): Contact: 
<sip:04xxxxxxxx at 172.17.20.241:5062;user=phone>
01-08 04:38:40.583: DEBUG/libpjsip(598): CSeq: 20133 INVITE
01-08 04:38:40.583: DEBUG/libpjsip(598): From: 
<sip:09xxxxxxxx at freephonie.net>;tag=4z92T2TUU-15F1BmZ.9t-cOOV-x9FlkJ
01-08 04:38:40.583: DEBUG/libpjsip(598): Proxy-Authenticate: Digest 
realm="freephonie.net",nonce="0107265e4dbc26c2104b331dxxxxxxxx",opaque="0105xxxxxxxx",stale=false,algorithm=MD5 

01-08 04:38:40.583: DEBUG/libpjsip(598): Record-Route: 
<sip:212.27.52.5:5060;transport=udp;lr>
01-08 04:38:40.583: DEBUG/libpjsip(598): To: 
<sip:04xxxxxxxx at freephonie.net>;tag=00-08174-01072763-237b79893
01-08 04:38:40.583: DEBUG/libpjsip(598): Via: SIP/2.0/UDP 
83.206.185.81:1113;received=83.206.185.81;rport=1113;branch=z9hG4bKPjGMc7IBRp1fZEpPMmLu1fko8JALVv69na 

01-08 04:38:40.583: DEBUG/libpjsip(598): Allow: UPDATE,REFER,INFO
01-08 04:38:40.583: DEBUG/libpjsip(598): Server: Cirpack/v4.42q (gw_sip)
01-08 04:38:40.583: DEBUG/libpjsip(598): Content-Length: 0
01-08 04:38:40.583: DEBUG/libpjsip(598):
01-08 04:38:40.583: DEBUG/libpjsip(598): --end msg--
01-08 04:38:40.593: DEBUG/libpjsip(598):  04:38:40.595   pjsua_core.c  
TX 378 bytes Request msg ACK/cseq=20133 (tdta0x3ee4d8) to UDP 
212.27.52.5:5060:
01-08 04:38:40.593: DEBUG/libpjsip(598): ACK 
sip:04xxxxxxxx at freephonie.net SIP/2.0
01-08 04:38:40.593: DEBUG/libpjsip(598): Via: SIP/2.0/UDP 
83.206.185.81:1113;rport;branch=z9hG4bKPjGMc7IBRp1fZEpPMmLu1fko8JALVv69na
01-08 04:38:40.593: DEBUG/libpjsip(598): Max-Forwards: 70
01-08 04:38:40.593: DEBUG/libpjsip(598): From: 
<sip:09xxxxxxxx at freephonie.net>;tag=4z92T2TUU-15F1BmZ.9t-cOOV-x9FlkJ
01-08 04:38:40.593: DEBUG/libpjsip(598): To: 
sip:04xxxxxxxx at freephonie.net;tag=00-08174-01072763-237b79893
01-08 04:38:40.593: DEBUG/libpjsip(598): Call-ID: 
Oe-.NHAmoQNc44Njh6sMgx7LfUwypFAX
01-08 04:38:40.593: DEBUG/libpjsip(598): CSeq: 20133 ACK
01-08 04:38:40.593: DEBUG/libpjsip(598): Content-Length:  0
01-08 04:38:40.593: DEBUG/libpjsip(598):
01-08 04:38:40.593: DEBUG/libpjsip(598): --end msg--
01-08 04:38:40.593: DEBUG/libpjsip(598):  04:38:40.599   tcpc0x3f1c44  
TCP client transport created
01-08 04:38:40.603: DEBUG/libpjsip(598):  04:38:40.603   tcpc0x3f1c44  
TCP transport 172.20.254.194:50398 is connecting to 212.27.52.5:5060...
01-08 04:38:40.603: DEBUG/libpjsip(598):  04:38:40.606   pjsua_core.c  
TX 1352 bytes Request msg INVITE/cseq=20134 (tdta0x3dc238) to tcp 
212.27.52.5:5060:
01-08 04:38:40.603: DEBUG/libpjsip(598): INVITE 
sip:04xxxxxxxx at freephonie.net SIP/2.0
01-08 04:38:40.603: DEBUG/libpjsip(598): Via: SIP/2.0/TCP 
172.20.254.194:50398;rport;branch=z9hG4bKPjmsIyd.aGHyETsxmkCWLdykws7MpLIgfN
01-08 04:38:40.603: DEBUG/libpjsip(598): Max-Forwards: 70
01-08 04:38:40.603: DEBUG/libpjsip(598): From: 
<sip:09xxxxxxxx at freephonie.net>;tag=4z92T2TUU-15F1BmZ.9t-cOOV-x9FlkJ
01-08 04:38:40.603: DEBUG/libpjsip(598): To: sip:04xxxxxxxx at freephonie.net
01-08 04:38:40.603: DEBUG/libpjsip(598): Contact: 
<sip:09xxxxxxxx at 83.206.185.81:1113;transport=UDP>
01-08 04:38:40.603: DEBUG/libpjsip(598): Call-ID: 
Oe-.NHAmoQNc44Njh6sMgx7LfUwypFAX
01-08 04:38:40.603: DEBUG/libpjsip(598): CSeq: 20134 INVITE
01-08 04:38:40.603: DEBUG/libpjsip(598): Allow: PRACK, INVITE, ACK, BYE, 
CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
01-08 04:38:40.603: DEBUG/libpjsip(598): Supported: replaces, 100rel, 
timer, norefersub
01-08 04:38:40.603: DEBUG/libpjsip(598): Session-Expires: 1800
01-08 04:38:40.603: DEBUG/libpjsip(598): Min-SE: 90
01-08 04:38:40.603: DEBUG/libpjsip(598): User-Agent: CSipSimple
01-08 04:38:40.603: DEBUG/libpjsip(598): Proxy-Authorization: Digest 
username="09xxxxxxxx", realm="freephonie.net", 
nonce="0107265e4dbc26c2104b3xxxxxxxx", 
uri="sip:04xxxxxxxx at freephonie.net", response="4dd1ed5axxxxxxxx", 
algorithm=MD5, opaque="0105fxxxxxxxx"
01-08 04:38:40.603: DEBUG/libpjsip(598): Content-Type: application/sdp
01-08 04:38:40.603: DEBUG/libpjsip(598): Content-Length:   465
01-08 04:38:40.603: DEBUG/libpjsip(598):
01-08 04:38:40.603: DEBUG/libpjsip(598): v=0
01-08 04:38:40.603: DEBUG/libpjsip(598): o=- 2525139520 25
01-08 04:38:40.603: INFO/libpjsip(598):  04:38:40.609 pjsua_wrap.cpp  
Call 0 state changed to CALLING
01-08 04:39:12.603: DEBUG/libpjsip(598): Stop ringback
01-08 04:39:12.603: INFO/libpjsip(598):  04:39:12.611 pjsua_wrap.cpp  
Call 0 is DISCONNECTED [reason=408 (Request Timeout)]
01-08 04:39:13.643: DEBUG/libpjsip(598):  04:39:13.643  pjsua_media.c  
Closing sound device after idle for 1 seconds


On 10/09/2010 13:19, Benny Prijono wrote:
> It should fall back to UDP. Check for errors in the log.
>
> Best regards,
>   Benny
>
>
>
>
> 2010/9/9 R?gis Montoya<r3gis.3r at gmail.com>:
>> Hi,
>>
>> I've detected a strange behavior with UDP size thresdhold and it's falling
>> back to UDP if TCP fails.
>>
>> I'm using 1.8-trunk but absolutely not sure since from version it was
>> introduce, or if it is really a regression or if it's a bad configuration I
>> did.
>>
>> The use case :
>> * A sip server that  doesn't support TCP.
>> * I try to make a call with an invite larger than 1300.
>> * It tries first with TCP (=>  ok that's fine I have a TCP transport enabled
>> for another account and this account is not attached to the UDP tranport, so
>> why not...).
>> * As expected TCP fails.
>> * ->  But... it doesn't retry with UDP.
>>
>> I'm well aware of the fact, if I want to ensure that it doesn't try with
>> TCP, I can attach my account to my UDP transport or I can also use the
>> PJSIP_DONT_SWITCH_TO_TCP flag.
>> But I think that not falling back to UDP is a bug. At least regarding this
>> ticket : http://trac.pjsip.org/repos/ticket/831 ("Also when the TCP
>> connection fails, the endpoint should revert back to using UDP.").
>>
>> Is there something I miss or it is a bug?
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux