[asterisk-dev] [Code Review] possible fix for broken SIP/peer/exten/IPorHost dial syntax

Mark Michelson reviewboard at asterisk.org
Fri Aug 3 16:40:39 CDT 2012


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

Ship it!


I've taken a look at this review, and the changes that are still relevant are good to go.

The parts that fix the routing of ACK and CANCEL are no longer needed due to recent changes. The change to place outbound proxy parsing in a common file is also unnecessary since that also exists now.

In fact, given the impending Asterisk 11 branching, I'm going to go ahead and get this committed to 1.8, 10, and trunk. If you would rather do it yourself, feel free to revert my commits and re-do them yourself.

- Mark


On April 11, 2012, 2:17 a.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1859/
> -----------------------------------------------------------
> 
> (Updated April 11, 2012, 2:17 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> As you can see in the bug report, I have trouble using the //IPorHost syntax in the SIP dial string.
> 
> This is an attempt at fixing it: I create a temporary outboundproxy for the dialog instead of just setting p->sa once.
> 
> Unfortunately I had to touch (remove) a call to set_destination(). That's where it gets hairy, because other proxy bugs were created and fixed in the vicinity. 
> 
> I left some debug code in that you might find useful if you're going to play with this.
> 
> Things this patch does:
> * Revert parts of r256485.
> * Make IPorHost work by using a temporary outboundproxy instead.
> * Replace thread-unsafe usage of strtok with strtok_r when parsing outboundproxy.
> * Remove duplicate code for parsing outboundproxy.
> * Fix memory leak that would occur when discarding an unparsable peer-specific outboundproxy.
> * Consistently pass TRUE and FALSE as create_addr newdialog argument.
> * Update the documentation above sip_request_call about all the possible SIP dial strings.
> 
> 
> This addresses bug ASTERISK-19677.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19677
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 361906 
>   /trunk/channels/sip/config_parser.c 361906 
>   /trunk/channels/sip/include/sip.h 361906 
> 
> Diff: https://reviewboard.asterisk.org/r/1859/diff
> 
> 
> Testing
> -------
> 
> My test calls work fine now, with and without the //IPorHost proxy. But I suspect that removing the set_destination must cause a problem for someone somewhere.
> 
> NOTE: my patch was actually against 10.3.0-rc3. But looking through the SVN log (for the 10 branch) did not reveal any related fixes.
> 
> 
> Thanks,
> 
> wdoekes
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120803/f9ddb332/attachment.htm>


More information about the asterisk-dev mailing list