juniorlm87 / csipsimple

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

No outgoing audio from CSipSimple to softphone or Asterisk server on the same network #1529

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This could be two separate issues.

What steps will reproduce the problem?
1.Connect to a wireless LAN access point, and any other networks are disabled(I 
don't use the phone as UMTS/GSM phone.)
2.Set up a RTP starting port number in the Network settings, 65520 for example.
3.Set up an audio call with maybe any codec (tested G711u and GSM) to sflphone 
by either URI direct call or extension via Asterisk server. They are all on the 
same network.

What is the expected output? What do you see instead?
1.Sflphone should receive audio from CSipSimple, but no sound.
1-1.Outgoing audio from CSipSimple must be sent, but no audio is sent.
1-2.CSipSimple must send RTP packets to sflphone or Asterisk server, but no RTP 
packets are sent if I check the packets with WireShark. However, it sometimes 
works properly and sends RTP packets after a while being on the same network.

2.The RTP port for audio in CSipSimple must be the port number I set or higher.
2-1.CSipSimple uses random port numbers such as 36180 and 33934 in the SIP/SDP 
message.
2-2.Sflphone sends RTP packets to the port stated in the Media Description 
section.
2-3.There is another attribute that states rtcp port. I do not know RFC but I 
do not see this parameter when I use a different app(AGEphone ver.1.0.017) and 
it works perfectly on the LAN.

What version of the product are you using? On what operating system?
Cellphone
1.LG Optimus One (Model No.:LG-P500h) with Android 2.3.3.
2.CSipSimple version is 0.03-01 r1108
3.Current IP address is 192.168.0.16 (DHCP)

Asterisk Server
1.OS is Ubuntu 11.04 with 2.6.38-8-generic kernel
2.Asterisk is Asterisk 1.6.2.9-2ubuntu2.1
3.Current IP address is 192.168.0.200 (static)

SFLphone
1.OS is Ubuntu 11.04 with 2.6.38-13-generic-pae kernel
2.SFLphone is 0.9.12
3.Current IP address is 192.168.0.10 (DHCP)

Please provide any additional information below.
CSipSimple works perfectly when it connects to the Asterisk Server that is open 
to the Internet from WAN side of NATed networks such as starbucks wifi etc.

Original issue reported on code.google.com by luca_...@yahoo.co.jp on 23 Jan 2012 at 3:54

GoogleCodeExporter commented 9 years ago
Oh, I forgot to add the subnet mask. It is 255.255.255.0 (/24) for the all IPs.

Original comment by luca_...@yahoo.co.jp on 23 Jan 2012 at 3:59

GoogleCodeExporter commented 9 years ago
Is STUN (or STUN+ICE) activated in csipsimple when you make the test inside the 
private network?

If so, it may try to resolve the public rtp port and ip and provide that in the 
SDP to your server in the private network. And this one gets lost because it 
will try to send to the public port and it will probably fail (unless your 
public router does really tricky things).
It could explains :
* why it works from outside
* that sdp you observe have a different port (and probably ip)
* the other sip client that has not stun activated works inside (and may fail 
if you use it outside ;) ).

Original comment by r3gis...@gmail.com on 23 Jan 2012 at 9:25

GoogleCodeExporter commented 9 years ago
Thank you for the response.

No, I never used STUN. Disabling ICE solved the RTP port number one. Now I see 
the ports are the number I set or higher.
But it uses a random port number with ICE even when there is no connection to 
the router (Truly LAN network). How can ICE obtain a public port while there is 
no public IP and port??

Anyway, CSipSimple still does not send RTP packets to SFLphone or Asterisk, or 
even another softphone(Twinkle etc)

I tried different codecs, G711u, G711a and GSM, but all the same, no RTP audio 
packets from CSipSimple. I suppose this is not related to a codec.

Original comment by luca_...@yahoo.co.jp on 23 Jan 2012 at 7:23

GoogleCodeExporter commented 9 years ago
I think I found out the cause.

What steps will reproduce the problem?
1.Enabling WMM function for Wireless LAN on a wireless router or an access 
point 
2.Turn on "Enable QoS"
3.Connect to a wireless LAN access point, and any other networks are disabled(I 
don't use the phone as UMTS/GSM phone.)
4.Set up a RTP starting port number in the Network settings, 65520 for example.
5.Set up an audio call with maybe any codec (tested G711u and GSM) to sflphone 
by either URI direct call or extension via Asterisk server. They are all on the 
same network.

What is the expected output? What do you see instead?
1.Sflphone should receive audio from CSipSimple, but no sound.
1-1.Outgoing audio from CSipSimple must be sent, but no audio is sent.
1-2.CSipSimple must send RTP packets to sflphone or Asterisk server, but no RTP 
packets are sent if I check the packets with WireShark. However, it sometimes 
works properly and sends RTP packets after a while being on the same network.

What version of the product are you using? On what operating system?
Cellphone
1.LG Optimus One (Model No.:LG-P500h) with Android 2.3.3.
2.CSipSimple version is 0.03-01 r1108
3.Current IP address is 192.168.0.16 (DHCP)

Asterisk Server
1.OS is Ubuntu 11.04 with 2.6.38-8-generic kernel
2.Asterisk is Asterisk 1.6.2.9-2ubuntu2.1
3.Current IP address is 192.168.0.200 (static)

SFLphone
1.OS is Ubuntu 11.04 with 2.6.38-13-generic-pae kernel
2.SFLphone is 0.9.12
3.Current IP address is 192.168.0.10 (DHCP)

Wireless router
1.D-link WBR-2310 working as an access point (NAPT is disabled)
2.Firmware ver. 2.03
3.WMM function is on

Please provide any additional information below.
1.CSipSimple works perfectly when it connects to the Asterisk Server that is 
open to the Internet from WAN side of NATed networks such as starbucks wifi etc.

Solutions to avoid this issue:
* Disabling WMM function on Wireless LAN
 --> CSipSimple works perfectly regardless of Enable QoS setting.
* Disabling "Enable QoS" on CSipSimple
 --> CSipSimple works perfectly regardless of WMM setting on a wireless router

So, this is mainly related to WMM(L2 QoS for wireless LAN, 802.11e-2005) 
functionality because CSipSImple works fine when WMM is disabled, and I presume 
that this issue occurs when WMM is on, Enable QoS is on and peers are in the 
same private LAN because I do not recall I had this issue when I used public 
wifi APs.

I will check if the wifi APs have WMM enabled or not when I visit any public 
wifi place next time, and post updates.

Original comment by luca_...@yahoo.co.jp on 23 Jan 2012 at 8:13

GoogleCodeExporter commented 9 years ago
Since it is closed, I will make a new ticket.

Original comment by luca_...@yahoo.co.jp on 23 Jan 2012 at 8:53

GoogleCodeExporter commented 9 years ago
Ok. Sorry for the delay replying. I do csipsimple only on my free time (night, 
week end and hollidays) ;).

So don't be worried if I don't reply for an entire day, it just means that I 
had hard time for my full time part job and was too tired to do support stuff 
:).

I could have re-open the issue :), but good idea to open a new one.

Original comment by r3gis...@gmail.com on 23 Jan 2012 at 9:18