[asterisk-dev] [Code Review] possible fix for broken SIP/peer/exten/IPorHost dial syntax
wdoekes
reviewboard at asterisk.org
Wed Apr 11 02:11:41 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1859/
-----------------------------------------------------------
(Updated April 11, 2012, 2:11 a.m.)
Review request for Asterisk Developers.
Changes
-------
Changes:
* Removed some red blobs.
* Added LFs to log warnings.
* Fixed inverted logic that broke global outboundproxy in r1.
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 (updated)
-----
/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/20120411/b80bb8cc/attachment.htm>
More information about the asterisk-dev
mailing list