Fixes for sending SIP MESSAGE outside of calls.

* Fix authenticate MESSAGE losing custom headers added by the MESSAGE_DATA
function in the authorization attempt.

* Pass up better From header contents for SIP to use.  Now is in the
"display-name" <URI> format expected by MessageSend.  (Note that this is a
behavior change that could concievably affect some people.)

* Block user from adding standard headers that are added automatically.
(To, From,...)

* Allow the user to override the Content-Type header contents sent by
MessageSend.

* Decrement Max-Forwards header if the user transferred it from an
incoming message.

* Expand SIP short header names so the dialplan and other code only has to
deal with the full names.

* Documents what SIP expects in the MessageSend(from) parameter.

(closes issue ASTERISK-18992)
Reported by: Yuri

(closes issue ASTERISK-18917)
Reported by: Shaun Clark

Review: https://reviewboard.asterisk.org/r/1683/
........

Merged revisions 352520 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-01-25 17:23:25 +00:00
parent 4bf5e3716e
commit cbe57b11cb
4 changed files with 308 additions and 95 deletions

View File

@@ -88,15 +88,18 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<para>This function will read from or write a value to a text message.
It is used both to read the data out of an incoming message, as well as
modify a message that will be sent outbound.</para>
<para>NOTE: If you want to set an outbound message to carry data in the
current message, do Set(MESSAGE_DATA(key)=${MESSAGE_DATA(key)}).</para>
<note>
<para>If you want to set an outbound message to carry data in the
current message, do
Set(MESSAGE_DATA(<replaceable>key</replaceable>)=${MESSAGE_DATA(<replaceable>key</replaceable>)}).</para>
</note>
</description>
<see-also>
<ref type="application">MessageSend</ref>
</see-also>
</function>
<application name="MessageSend" language="en_US">
<synopsis>
<synopsis>
Send a text message.
</synopsis>
<syntax>
@@ -106,6 +109,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="from" required="false">
<para>A From URI for the message if needed for the
message technology being used to send this message.</para>
<note>
<para>For SIP the from parameter can be a configured peer name
or in the form of "display-name" &lt;URI&gt;.</para>
</note>
</parameter>
</syntax>
<description>