res_pjsip_session: Add configurable behavior for redirects.

The action taken when a redirect occurs is now configurable on a
per-endpoint basis. The redirect can either be treated as a redirect
to a local extension, to a URI that is dialed through the Asterisk
core, or to a URI that is dialed within PJSIP itself.

(closes issue ASTERISK-21710)
Reported by: Matt Jordan

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

Merged revisions 403207 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-11-28 00:38:36 +00:00
parent 48c2b40ff3
commit a64cd7c6bb
4 changed files with 72 additions and 2 deletions

View File

@@ -316,6 +316,15 @@ enum ast_sip_session_media_encryption {
AST_SIP_MEDIA_ENCRYPT_DTLS,
};
enum ast_sip_session_redirect {
/*! User portion of the target URI should be used as the target in the dialplan */
AST_SIP_REDIRECT_USER = 0,
/*! Target URI should be used as the target in the dialplan */
AST_SIP_REDIRECT_URI_CORE,
/*! Target URI should be used as the target within chan_pjsip itself */
AST_SIP_REDIRECT_URI_PJSIP,
};
/*!
* \brief Session timers options
*/
@@ -574,6 +583,8 @@ struct ast_sip_endpoint {
unsigned int faxdetect;
/*! Determines if transfers (using REFER) are allowed by this endpoint */
unsigned int allowtransfer;
/*! Method used when handling redirects */
enum ast_sip_session_redirect redirect_method;
};
/*!