[asterisk-dev] SIP/SDP: ptime in translation module?

Alexander Traud pabstraud at compuserve.com
Fri Oct 2 14:13:27 CDT 2015


I am creating a translation module for AMR-WB. In one scenario on the
SIP/SDP layer, a higher ptime was negotiated than the default one. For
example, 60ms were negotiated instead of the AMR default 20ms. Now, Asterisk
should send three frames per RTP packet. I try to play one of the recorded
voices (slin8). Asterisk sends 320 samples to my translation module; the
default for 20ms packetization. My translation module has to wait 960
samples to create the frames.

Which structure do I have to query: How do know the ptime, there in such a
transcoding module? This was available in Asterisk 11 via
ast_format->cur_ms. How do I access this information in Asterisk 13|master?

I am asking asterisk-dev, because all transcoding modules might be affected.
At least with AMR-WB, I have to code/build those frames within the module
because RFC 4867 mandates a special header (section 4.3.5.2 and 4.4.5.1). At
first glance, this could be an architectural issue. Therefore, I am asking
for advice how to approach this: Simply, re-adding "cur_ms" to ast_format?





More information about the asterisk-dev mailing list