NG-Studio-Development / csipsimple

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

Csipsimple is hardwired with 5060 for some sip communications #2929

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. I have freepbx and asterisk 11. I add tcpbindaddr=0.0.0.0:5066 in sip 
setting. In my router I add port forward to my freepbx server for tcp 5066 and 
udp 10000-20000.

2. In Csipsimple's account I have 
Registration URI: sip:hostname:5066
Proxy URI: sip:hostname:5066
Transport: TCP

Csimple can register to my freepbx server. I can make a call but it has 30 
seconds hangup. Log shows
"chan_sip.c: Disconnecting call 'SIP/5555-00000038' for lack of RTP activity in 
31 seconds".

Then I add port forward tcp 5060. I can call without 30 seconds hangup though 
the log still has "lack of RTP activity in 31 seconds"

3. Later I change port forward 5060 as source 5060 to 5066 (NAT 5060 to 5066). 
Everything works fine. No more "lack of RTP ..." in log. So I suspect some 
communications are using TCP 5060 instead of 5066. To test my theory, I 
download Sipdroid and configure it to use tcp 5066. After turn port forward 
5060 off, I can make calls without problem. So Sipdroid is not hardwired with 
5060. 

What is the expected output? What do you see instead?
Expect to remove 5060 hardwired codes.

What version of the product are you using? On what device / operating
system?
The latest version of csipsimple from Play Store. Samsung Note 2 with Android 
4.4.4.

Please provide any additional information below.
My brother's mobile data provider blocks 5060 so he has to use other port. 

Original issue reported on code.google.com by haoy...@gmail.com on 25 Apr 2015 at 3:24

GoogleCodeExporter commented 9 years ago
This is usually a bad configuration on server side. See 
https://code.google.com/p/csipsimple/issues/detail?id=604 that is similar 
problem.

Quickly, it's about your sip server telling the app to use a new sip route (and 
that route does not specify a port).
Sipdroid (due to a similar bad behavior on their pbxes servers) does not follow 
the SIP spec properly and keep some port and transport from configuration 
instead of respecting responses given by sip server.
CSipSimple uses pjsip (which is a pretty robust sip library and is now used 
inside next gen asterisk server). Basically everything related to sip behavior 
comes from pjsip and is heavily tested by many other opensource community. So, 
I'm pretty confident in the fact it's not something about something harcoded 
somewhere but rather some configuration issue.
If you need some help to investigate the problem you can send your sip logs 
(see HowToCollectLogs wiki page) so that we can investigate. Your problem might 
be either something with the issue I mentioned before or with some lack of NAT 
traversal features (such as STUN which is enabled by default on some other sip 
clients).

Original comment by r3gis...@gmail.com on 25 Apr 2015 at 12:19