[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 11:57:58 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.
> 
> Mark Michelson wrote:
>     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.

I've finished my test now. Due to conditions of my testsuite working directory, I'm not going to post the test I wrote until reviews 558 and 560 receive a "ship it!" and I've committed the changes.


- 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