[asterisk-dev] [Code Review] SendMessage strips extension from To: Header in SIP MESSAGE

David Vossel reviewboard at asterisk.org
Fri Dec 2 17:05:23 CST 2011


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

Ship it!


Yep, great work!

- David


On Dec. 2, 2011, 3:40 p.m., mjordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1597/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2011, 3:40 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> When using the MessageSend application to send a SIP MESSAGE to a non-peer, chan_sip attempts to validate the hostname / IP Address.  In the process, it strips off the destination, and fails to add it back to the sip_pvt structure before transmission.  This patch attempts to handle valid URIs passed to chan_sip from the message core that contain either a peer to send to or a URI.  Acceptable forms from MessageSend take one of the following two forms:
> 
> sip:peer
> sip:destination at hostname
> sip:destination at ip_address
> 
> Note that more complex URIs (such as "User" <sip: blah at blah>) won't be accepted by the message core, as the message technology will assume that the user name is part of the message technology type.  That limitation is outside the scope of this issue.
> 
> 
> This addresses bug ASTERISK-18903.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18903
> 
> 
> Diffs
> -----
> 
>   /branches/10/channels/chan_sip.c 346804 
> 
> Diff: https://reviewboard.asterisk.org/r/1597/diff
> 
> 
> Testing
> -------
> 
> Tested with:
> 
> sip:destination at hostname
> sip:destination at ip_address
> sip:peer
> 
> All three were accepted by the MessageSend application and properly forwarded to their destinations / peers.
> 
> 
> Thanks,
> 
> mjordan
> 
>

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


More information about the asterisk-dev mailing list