Changing RTP Frame Size

Home » Asterisk Users » Changing RTP Frame Size
Asterisk Users 1 Comment

I am trying to set-up an Asterisk server to “transcode” between different RTP frame sizes. I have devices on one side using alaw with ptime 20 ms and some equipment on the other side requiring ptime 10. I am using the latest Asterisk 13.8.0. The set-up looks like this:

A (ptime 20) —> asterisk —> B (ptime 10)

In Asterisk I have two peers defined with only one codec in each, alaw:10 and alaw:20 respectively. The SIP call set-up looks fine and each side announces the correct ptime in the SDP (both Asterisk and B has the ptime=10 attribute in the SDP). The dialplan is currently first answering A’s call, plays a prompt and then Dial() into B.

This is what the media streams look like, including RTP frame size:

A — 20ms ——-> asterisk —–20ms!—–> B

A <-- 20ms ------- asterisk <-----10ms---- B The stream from Asterisk to B has the wrong frame size, it should be 10ms. Looking at the media from B to A, we can see that asterisk properly changes frame size in one direction. I also tried to use ulaw on the path between Asterisk and B to see if that would trigger a proper transcoding, but the results were the same (in terms of frame size, but with correct change of codec ). Is this supposed to work? Any suggestions for workarounds? Best regards, Jan Blom

One thought on - Changing RTP Frame Size

  • I believe so. That sounds odd. Hard to know without seeing the packet trace of the call.

    Which SIP channel driver are you using?

    I think you are safe to go ahead and file an issue report. Please include the sip.conf/pjsip.conf plus a packet capture and Asterisk debug log (be sure to get the DEBUG channel turned on in logger.conf)
    with correlating SIP trace.