mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 22:45:49 +00:00
res_pjsip: Apply outbound proxy to all SIP requests.
Objects which are involved in SIP request creation and sending now allow an outbound proxy to be specified. For cases where an endpoint is used the outbound proxy specified there will be applied. (closes issue ASTERISK-22673) Reported by: Antti Yrjola Review: https://reviewboard.asterisk.org/r/3022/ ........ Merged revisions 403811 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -146,6 +146,8 @@ struct ast_sip_contact {
|
||||
AST_DECLARE_STRING_FIELDS(
|
||||
/*! Full URI of the contact */
|
||||
AST_STRING_FIELD(uri);
|
||||
/*! Outbound proxy to use for qualify */
|
||||
AST_STRING_FIELD(outbound_proxy);
|
||||
);
|
||||
/*! Absolute time that this contact is no longer valid after */
|
||||
struct timeval expiration_time;
|
||||
@@ -190,6 +192,8 @@ struct ast_sip_aor {
|
||||
AST_DECLARE_STRING_FIELDS(
|
||||
/*! Voicemail boxes for this AOR */
|
||||
AST_STRING_FIELD(mailboxes);
|
||||
/*! Outbound proxy for OPTIONS requests */
|
||||
AST_STRING_FIELD(outbound_proxy);
|
||||
);
|
||||
/*! Minimum expiration time */
|
||||
unsigned int minimum_expiration;
|
||||
@@ -1277,6 +1281,16 @@ int ast_sip_create_request_with_auth(const struct ast_sip_auth_vector *auths, pj
|
||||
*/
|
||||
struct ast_sip_endpoint *ast_sip_identify_endpoint(pjsip_rx_data *rdata);
|
||||
|
||||
/*!
|
||||
* \brief Set the outbound proxy for an outbound SIP message
|
||||
*
|
||||
* \param tdata The message to set the outbound proxy on
|
||||
* \param proxy SIP uri of the proxy
|
||||
* \retval 0 Success
|
||||
* \retval -1 Failure
|
||||
*/
|
||||
int ast_sip_set_outbound_proxy(pjsip_tx_data *tdata, const char *proxy);
|
||||
|
||||
/*!
|
||||
* \brief Add a header to an outbound SIP message
|
||||
*
|
||||
|
Reference in New Issue
Block a user