[asterisk-dev] [Code Review] 3999: chan_iax2: Jitterbuffer causes crash in Asterisk 13 on account of format changes

Joshua Colp reviewboard at asterisk.org
Thu Sep 18 11:02:53 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3999/#review13337
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Colp


On Sept. 16, 2014, 9:28 p.m., Jonathan Rose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3999/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2014, 9:28 p.m.)
> 
> 
> Review request for Asterisk Developers, Matt Jordan and rmudgett.
> 
> 
> Bugs: ASTERISK-24265
>     https://issues.asterisk.org/jira/browse/ASTERISK-24265
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This only occurs when the chan_iax jitterbuffer options are set and no when setting jitterbuffers via diaplan or anything like that.
> 
> The first time __get_from_jb is called, voiceformat has not been set on the IAX pvt. Trying to call ast_format_get_default_ms on a NULL pointer fails. This worked previously because Asterisk 12 and prior simply modified an ast_format on the stack, so when it used ast_codec_interp_len on that format pointer there was no possibility for it to be a NULL pointer... just one that doesn't have a real format associated with it.
> 
> One thing I might not be doing right here is that I'm using an interpolation value of 0 for a NULL format. Previously Asterisk would just check to see if the format was ILBC and if it was, return 30 and otherwise return 20... so it might be more appropriate to use 20 instead of 0.  It doesn't appear to make a difference for the sake of behavior.
> 
> 
> Diffs
> -----
> 
>   /branches/13/channels/chan_iax2.c 423149 
> 
> Diff: https://reviewboard.asterisk.org/r/3999/diff/
> 
> 
> Testing
> -------
> 
> Ran basic call from a PJSIP peer to an IAX peer with the following:
> 
> [general]
> 
> ; The important parts
> jitterbuffer=yes
> forcejitterbuffer=yes
> 
> 
> [deskbox]
> type=friend
> requirecalltoken = no
> username = deskbox
> secret = secret
> host = dynamic
> transfer = no
> dtmfmode = auto
> encryption = no
> qualify = 300
> context = default
> disallow=all
> allow=ulaw
> allow=alaw
> ; Most of this is probably unnecessary for reproduction
> 
> 
> Without the patch this would crash in 13 but work fine in 12.
> With the patch, behavior strongly resembles 12 with the initial call into __get_from_jb attempting to jb_get and getting JB_OK back and then later, when the call was actually answered, the voice format would change and the function would call again with the proper format and the jitterbuffer would get started properly.
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140918/5bf1b70f/attachment.html>


More information about the asterisk-dev mailing list