[asterisk-dev] [Code Review] Add new SIP-specific option to the CHANNEL function to retrieve source RTP address/port. Fix crashes that could happen when getting remote RTP address/port
Mark Michelson
mmichelson at digium.com
Wed Mar 24 09:33:25 CDT 2010
> On 2010-03-24 09:24:47, Russell Bryant wrote:
> > The code looks good to me, though an automated test would still be nice, as you mentioned.
Yep, I actually found the last bug I corrected by running a test I'm writing. I'm hitting some snags, likely configuration-related, that are causing me not to be able to publish a review request for the test at this time though.
> On 2010-03-24 09:24:47, Russell Bryant wrote:
> > /trunk/channels/sip/dialplan_functions.c, line 72
> > <https://reviewboard.asterisk.org/r/542/diff/4/?file=8875#file8875line72>
> >
> > remove this debug message
Will do.
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/542/#review1733
-----------------------------------------------------------
On 2010-03-24 09:18:59, Mark Michelson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/542/
> -----------------------------------------------------------
>
> (Updated 2010-03-24 09:18:59)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This patch accomplishes two objectives:
>
> 1. It adds a new option to the CHANNEL() function to retrieve RTP source address and port for a given stream.
> 2. It fixes crashes that could occur when attempting to retrieve RTP destination address and port when given a non-existent stream.
>
> Note that even if I get a "Ship it!" on this code, I'm not necessarily going to commit it until I also have an automated test in place for it. Likely this will be an external test in a separate repo and will be submitted as a separate review.
>
>
> Diffs
> -----
>
> /trunk/channels/sip/dialplan_functions.c 253799
>
> Diff: https://reviewboard.asterisk.org/r/542/diff
>
>
> Testing
> -------
>
> Using manager's GetVar action, I retrieved the destination and source RTP audio addresses and ports and verified that they are what I expect. Out of curiosity, I tried to see what would happen if I requested an RTP address/port for a nonexistent stream, such as a video stream during an audio-only call. This is how I found the crash. Now, with my fix in place, there is no crash, and an empty string is returned in such a case.
>
>
> Thanks,
>
> Mark
>
>
More information about the asterisk-dev
mailing list