Menu

#1237 G729 : Incorrect interval between RTP packets

Accepted
nobody
None
Medium
Defect
2011-09-06
2011-08-26
Anonymous
No

Originally created by: tzhong... (code.google.com)@gmail.com
Originally owned by: r3gis... (code.google.com)@gmail.com

What steps will reproduce the problem?

1. Set up a outgoing call with G.719 codec
2. Run tcpdump on cell phone by using applications such as shark
3. Check the trace on PC by using Wireshark

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

Expect to see 20ms intervals between G.729 RTP packets.

Instead, I am seeing 10ms intervals. Besides, it seems the scheduling was done poorly. The packets were sent 4 per 80ms, instead of 1 per 20 ms.

What version of the product are you using? On what operating system?

CM7 Gingerbread (2.3.5), with CSipSimple 0.02-03 [r944].

Please provide any additional information below.

Using freephoneline.ca as the service provider.

Related

Commit: [r944]

Discussion

  • Anonymous

    Anonymous - 2011-08-26

    Originally posted by: tzhong... (code.google.com)@gmail.com

    Typo: G.719 codec should be G.729 codec.

     
  • Anonymous

    Anonymous - 2011-08-27

    Originally posted by: r3gis... (code.google.com)@gmail.com

    Probably linked to this bug on Samuel's project : https://code.google.com/p/siphon/issues/detail?id=374

    As far as I understand from this issue, it's 10ms per frame and *usually* softwares send 2 frames per packet (but that's not mandatory). However, the usually has probably a very good reason since it reduce total transmitted size (less rtp headers).

    I'll update the patch from samuel to have that fixed. Thanks for pointing this out!

    Summary: G729 : Incorrect interval between RTP packets
    Status: Accepted

     
  • Anonymous

    Anonymous - 2011-08-27

    Originally posted by: r3gis... (code.google.com)@gmail.com

    The weird point is that Samuel finally used 1 frame/packet in the current version of his patch.
    I know that he did a *lot* of tests for his codec in order to make it as optimized as possible. There is maybe a good reason why he did that.

    I'll try to have a chat with him before changing things (that just a line to uncomment and another to comment)
    (https://code.google.com/p/csipsimple/source/browse/trunk/pjsip_android/apps/pjsip/project/pjmedia/src/pjmedia-codec/g729.c#265)

    So for now I keep the issue open and I don't commit the change (actually I was already to latest version of the g729 patch and modifying it would mean divert from the iphone version of pjsip).

    Just another point, I noticed you use Freephoneline.ca service. There is users with trouble on issue 296. If you can help them it would be fine :) . Specially if you changed some default settings, (I can change the way the wizard behaves for freephoneline.ca if some particular settings helps).

    Owner: r3gis...@gmail.com

     

    Related

    Tickets: #296

  • Anonymous

    Anonymous - 2011-09-02

    Originally posted by: tzhong... (code.google.com)@gmail.com

    I deleted my previous comments regarding issue 296 as it is now behind us by using the latest wizard for freephoneline.ca.

    But I still have concern about the ptime for the G.729 codec. Although I agreed with you that ptime=10ms is really nothing wrong, but I do expect to see 2 frames per packet when setting ptime=20, which is not happening right now.

    Based on the G.729 test call that I made on freephoneline.ca, CSipSimple was sending 100 packets per second with average packet length = 512 bits, freephoneline.ca was sending 50 packets per second with average packet length = 592 bits. That means the RTP stream from CSipSimple was using 50kbps, and the reverse link was only using 28.9kbps. So CSipSimple uses 73% more bandwidth than what it really needs.

    These numbers may seem low, but it significantly changes the voice quality when the SIP client and server are connected over a very congested link.

    I would appreciate if you can check with Samuel to see if this can be corrected.

    Thanks and appreciate for your great work!

     

    Related

    Tickets: #296

  • Anonymous

    Anonymous - 2011-09-02

    Originally posted by: r3gis... (code.google.com)@gmail.com

    I've just added in [r1020] the 2 frames/packet option for tests purpose. Let me know how it goes.
    I'll still try to collect infos from Samuel about why he set 1 frame per packet by default, but your feedback could be very valuable too with [r1020]. Do not hesitate to share your findings here.
    Thanks

     

    Related

    Commit: [r1020]

  • Anonymous

    Anonymous - 2011-09-03

    Originally posted by: tzhong... (code.google.com)@gmail.com

    Here is what I observed with rev 1020 without changing any configuration:

    1. CSipSimple is now sending 50 packets per second (ptime=20ms), which is correct.
    2. RTP timestamp jumps 160 every packet, which is correct.
    3. RTP payload has only 10 octects (1 frame) per packet at the beginning before receiving the very first RTP packet from the other side.
    4. RTP payload contains 20 octects (2 frames) per packet in the conversation.

    I have voice on both ways. Every thing looks normal except for #3, but can be ignored.

    Thanks for the great work!

     
  • Anonymous

    Anonymous - 2011-09-06

    Originally posted by: tzhong... (code.google.com)@gmail.com

    When you add account, expand 'Other country providers' and find Freephoneline.ca. Then follow the instruction to setup freephoneline account.

    Here is how to verify the configuration after the above steps (not necessary):

    - Open CSipSimple
    - Click 'menu' button, click 'Accounts'
    - Click 'Freephoneline.ca'
    - Click 'menu' button again, select 'Choose wizard'
    - Under 'Generic wizards', select 'Expert'
    - Now click 'Freephoneline.ca' account again, you will see more options in the account settings
    - Under 'Connection' section, make sure 'Contact rewrite method' is NOT checked.

     
  • Anonymous

    Anonymous - 2011-09-06

    Originally posted by: qizho... (code.google.com)@gmail.com

    Your setting seems only works on WIFI, but not on 3G. Please let me know how to set up in 3G. Thx! Yuan By the way I am using wind Mobile 3G in Toronto.

     
  • Anonymous

    Anonymous - 2011-09-06

    Originally posted by: tzhong... (code.google.com)@gmail.com

    I don't have a phone that can work on 3G frequencies in Canada. It is an European model which can only use EDGE in Canada. So I can't test it on 3G.

    However, I don't see why it is not working on 3G. If your phone is rooted, you can install 'shark' from market and collect tcpdump traces. It will be helpful to see what is going on.

    Another thing that you can try is to set different RTP port number (default is 4000, but usually RTP port number should be set to 16384 and above based on Cisco default RTP range setting):

    - Open CSipSimple
    - Click 'menu', select 'Settings'
    - Click 'menu', select 'Expert mode'
    - Select 'Network', under 'Transport' section, set 'RTP port' from '4000' to some thing higher than '16390', for example, set it to '26000'.

     
  • Anonymous

    Anonymous - 2011-09-06

    Originally posted by: tzhong... (code.google.com)@gmail.com

    The other setting that you should check:

    In 'Media' setting, check 'Codecs', make sure only one codec is enabled in BOTH 'Wideband' and 'Narrowband'. Recommend to use G729 on both and deactivate all other codecs.

    3G is considered as 'Narrowband connection', which is default setting in 'Connections bandwidth types' configuration under 'Media' setting. While WIFI is considered as 'Wideband connection'. This may be your problem.

     
  • Anonymous

    Anonymous - 2011-09-06

    Originally posted by: qizho... (code.google.com)@gmail.com

    I still have difficults to use 3G.

    If i am not wrong, I think you are Chinese from your last name. Please give me call at 416-742-4037 ext 4149 during day time or call me @416-855-3901 in the evening. Thanks! Yuan

     
  • Anonymous

    Anonymous - 2011-09-06

    Originally posted by: qizho... (code.google.com)@gmail.com

    here is my questions:
    -----
    your commnet 10: Under 'Connection' section, make sure 'Contact rewrite method' is NOT checked.

    I have unchecked "Allow contact rewrite", is it right?
    -----
    your commnet 12
    Select 'Network', under 'Transport' section, set 'RTP port' from '4000' to some thing higher than '16390', for example, set it to '26000'.

    I can not find 'RTP port'
    ------
    other things, I can install shark from android market, I would like send the result to you, can you help me to review the log or result of shark?

    Thx! & B. Regards, Yuan

     

Log in to post a comment.

MongoDB Logo MongoDB