sonuarya / csipsimple

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

no RTP audio packets sent when WMM on wireless LAN and QoS on CSipSimple are enabled #1532

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 issue reported on code.google.com by luca_...@yahoo.co.jp on 23 Jan 2012 at 8:55

GoogleCodeExporter commented 9 years ago
Well I'm far to be expert on QoS stuff, but I know that it is very very tricky 
to configure on network equipement. Many sip providers do a lot of test on QoS 
before getting something working good with most clients.

QoS can be for good or for bad of the transport. So it is possible that qos 
lead to worse result than result you get without qos. You probably noticed that 
QoS is disabled by default in csipsimple. The reason is that I know that it can 
worsen things, and many sip providers advised me to disable it by default and 
let users that know what they do activate it.

To do qos (and actually to do all sip stuff), CSipSimple relies on pjsip (it's 
a well known and widely used sip stack)
The documentation about QoS on pjsip stack is available here :
http://trac.pjsip.org/repos/wiki/QoS

What I can tell, is that pjsip on android is not built to support WMM (actually 
pjsip implementation does support WMM only on windows... )
The only implementation it supports is DSCP.

I added in the interface a way to activate QoS DSCP and a way to change the 
DSCP value. And it will automatically set the qos type as voice. (which should 
preset various other settings to correct values).
If you think that I should try to give access to another setting let me know, 
I'll add it in the interface so that you can tweak pjsip settings.

Since I've no real ways to do test in my dev environment, I'm not really able 
to test that part so do not hesitate to tell me if you observe something weird, 
I'll have a closer look to the code and how I setup pjsip.

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

GoogleCodeExporter commented 9 years ago
This could be related to my D-link WBR-2310 router.

I just remembered I have another wireless router, Planex MZK-MF300N2 for mobile 
usage and I tested the router as an AP in the same private LAN. The result is 
CSipSimple works fine with the router.

Although I cannot change the WMM parameter, it is set to enabled in the web 
console, and I can see QoS data frames between the router and my cellphone if I 
check 802.11 frames with WireShark unless I am looking at wrong place... Thus, 
this issue is most likely the the old D-Link router.

Is anyone able to confirm that CSipSimple works properly in WMM enabled on AP 
and "Enable QoS" on CSipSimple so that I can know it is the old D-Link router's 
issue??

Anyway, CSipSimple is the best SIP client software I have found. I can use it 
as an extension of my Asterisk server outside the house as if it is a cellphone 
at Starbucks etc. The only issue I had was this no outbound audio at home.

Thanks, r3gis...@gmail.com :)

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

GoogleCodeExporter commented 9 years ago
This is my comment to the QoS thing.

I am not an expert in QoS either. I have just 4 months experience in 802.11n 
certification testing as a co-op and got some knowledge about WMM and QoS from 
the experience.

From my point of view, WMM functionality support at this point is not 
mandatory. Because I believe that a sip client on android is not for business 
use yet and a wireless AP at home is not so congested. But, it is nice to have 
WMM ability.

Regarding to WMM functionality, WMM priority value is set from 802.1p(802.1D) 
priority value by a wireless adapter and its driver. So, I believe, but I am 
not expert though, you do not really need to pay attention to WMM.

In fact, CSipSimple 0.03-01 r1108(with my handset, LG P500h) does set the WMM 
priority to voice when Enable QoS is on if you check 802.11 frames going to an 
AP from the handset. And, Layer 3 QoS value is also properly set to voice.
The values I obtained with WireShark are following:
The QoS value in the IP header(in a RTP segment): Differentiated Services 
Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00)
The QoS value in an 802.11 frame: Priority: 6 (Voice) (Voice)
This means WMM prioritasation is working. If it is not working, it must be set 
to 0 (Best Effort).

This is just an idea though...
I do not really know the latest nightly build, but if CSipSimple will have a 
video call capability, it would be nice to have 2 QoS on/off interfaces for 
voice and video for maybe expert mode. If it makes 2 RTP data streams for video 
and voice, disabling QoS only for video could be a better way to keep the voice 
quality while compromising only the video quality in congested wifi networks.
I just came up with this idea. Again, I am not expert; I do not know how RTP 
packets are used for a video call, and I even do not know if the idea complies 
with the RFCs.

Original comment by luca_...@yahoo.co.jp on 24 Jan 2012 at 6:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This thread's status can be changed to resolved as per my comment #2 - either 
D-link WBR-2310 router or LG Optimus One (Model No.:LG-P500h) with Android 
2.3.3., or both was malfunctioning with the L3 QoS and L2 QoS.

And, I was not talking about only L3 QoS, anyway; an L3 QoS value must 
correspond to a proper L2 QoS value (WMM) since SCipSimple is most likely used 
by a wireless device, but either my phone (highly likely) or my old router did 
not set proper WMM QoS value and I found either one was configuring a wrong 
value as far as I can recall. And, this L3 and L2 QoS issue should be device 
dependent since CSipSimple configures DSCP value properly as far as I can 
remember.

Original comment by luca_...@yahoo.co.jp on 25 Feb 2013 at 7:11

GoogleCodeExporter commented 9 years ago
Thanks for the update. 
Sorry for the delay updating things (I've so many issues to treat ;) ), so good 
that you recall me to update this one ;)
Thanks !

Original comment by r3gis...@gmail.com on 25 Feb 2013 at 9:50