summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjsip_session.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-12-07 17:51:08 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-12-12 13:46:35 -0600
commitc0822c32ac4a6edb1aea3e66c9535a77dc8a3734 (patch)
tree3a45361ea391bbcbd2aa2c5db0bdb2ac322b9f99 /include/asterisk/res_pjsip_session.h
parent0384e49a6e293ae27e98fafd2b593fbfa330847c (diff)
chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)
This patch does three things associated with the initial incoming INVITE request URI. 1) Add access to the full initial incoming INVITE request URI. 2) We were not setting DNID on incoming PJSIP channels. The DNID is the user portion of the initial incoming INVITE Request-URI. The value is accessed by reading CALLERID(dnid). 3) Fix CHANNEL(pjsip,target_uri) documentation. * The initial incoming INVITE request URI is now available using CHANNEL(pjsip,request_uri). * Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the initial incoming INVITE request URI user portion. * CHANNEL(pjsip,target_uri) now correctly documents that the target URI is the contact URI. * Refactored print_escaped_uri() out of channel_read_pjsip() to handle pjsip_uri_print() error condition when the buffer is too small. ASTERISK-27478 Change-Id: I512e60d1f162395c946451becb37af3333337b33
Diffstat (limited to 'include/asterisk/res_pjsip_session.h')
-rw-r--r--include/asterisk/res_pjsip_session.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index de6589abd..6d506a35b 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -211,6 +211,8 @@ struct ast_sip_session {
unsigned int ended_while_deferred:1;
/*! DTMF mode to use with this session, from endpoint but can change */
enum ast_sip_dtmf_mode dtmf;
+ /*! Initial incoming INVITE Request-URI. NULL otherwise. */
+ pjsip_uri *request_uri;
};
typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);