Hi, First I think you have to look a bit closer on frame length (ptime). I think the default frame length for G729 is 10 ms so you will actually send 100 packet/s and the overhead is rather 32 kbit/s for RTP/UDP/IP. So G729 with default settings will actually have higher bandwidth compared to GSM, since the frame length is different. The only way to save more is to increase ptime and send multiple frames /packet at the expense of higher delay. If you want to receive inband DTMF you have to keep the media stream and I think this also applies to DTMF with RFC2833, so SIP info is the only option , then it depends if this is supported by the remote client. I need to get back on the last question or perhaps some other on the list can help. BR/Olle _____ From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of Nguyen Van Minh Danh Sent: den 22 juni 2009 16:21 To: pjsip at lists.pjsip.org Subject: Re: optimizing bandwidth usage for IVRapplications writtenusing PJSIP Hi Thanks a lot for your reply, I think I figured out why I got twice the actual bit rate (e.g. 20KBytes/s instead of 10KBytes/s for PCMU). I was using Windows Task Manager, Network Tab, Bytes/Interval column to measure the bit rate. The refresh interval is set to Normal which is every 2 seconds so I end up getting twice the actual speed. I will try to use G729 for a better bandwidth. But following your on your calculations: + Using GSM codecs: 13kbps (payload) +16 kbps (RTP/UDP/IP headers)+2kbps (SIP+RTCP) = 31kbps. This is quite close to my results. + Using G729 codes: 8kbps (payload) + 16kbps + 2kbps = 26kbps. So, compared to GSM, G729 only saves bandwidth by 5kbps, which is little. Is my calculation wrong somewhere? I have tried putting a call on hold using pjsua_call_set_hold. Calling this the first time will eliminate the upload bandwidth (download bandwidth is still there). Calling this the second time onwards will eliminate the download bandwidth as well! However, any incoming DTMF is not detected (which is what I wanted). Can you tell me in more details how I can do a sendonly in SDP? I guess you mean PJMEDIA_DIR_ENCODING, which is available in pjsua_call_info.media_dir but I am not sure how to set this for an existing call. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090622/90303685/attachment.html>