diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-01-25 17:23:25 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-01-25 17:23:25 +0000 |
commit | cbe57b11cb673a6eabe7cdd4d2b5c8ba81cec216 (patch) | |
tree | 7d61ca0e8d2d07030bcd0f75ee5b2f9b10e11d82 /channels/sip/include | |
parent | 4bf5e3716e9388e980274c94df7ad696ec63fbcd (diff) |
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
Diffstat (limited to 'channels/sip/include')
-rw-r--r-- | channels/sip/include/sip.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h index ad9e7819f..f370193e8 100644 --- a/channels/sip/include/sip.h +++ b/channels/sip/include/sip.h @@ -966,6 +966,17 @@ struct offered_media { char codecs[128]; }; +/*! Additional headers to send with MESSAGE method packet. */ +struct sip_msg_hdr { + AST_LIST_ENTRY(sip_msg_hdr) next; + /*! Name of header to stick in MESSAGE */ + const char *name; + /*! Value of header to stick in MESSAGE */ + const char *value; + /*! The name and value strings are stuffed here in that order. */ + char stuff[0]; +}; + /*! \brief Structure used for each SIP dialog, ie. a call, a registration, a subscribe. * Created and initialized by sip_alloc(), the descriptor goes into the list of * descriptors (dialoglist). @@ -1134,6 +1145,7 @@ struct sip_pvt { struct sip_history_head *history; /*!< History of this SIP dialog */ size_t history_entries; /*!< Number of entires in the history */ struct ast_variable *chanvars; /*!< Channel variables to set for inbound call */ + AST_LIST_HEAD_NOLOCK(, sip_msg_hdr) msg_headers; /*!< Additional MESSAGE headers to send. */ AST_LIST_HEAD_NOLOCK(request_queue, sip_request) request_queue; /*!< Requests that arrived but could not be processed immediately */ struct sip_invite_param *options; /*!< Options for INVITE */ struct sip_st_dlg *stimer; /*!< SIP Session-Timers */ |