mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +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:
@@ -258,6 +258,15 @@ static int qualify_contact(struct ast_sip_contact *contact)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* If an outbound proxy is specified set it on this request */
|
||||
if (!ast_strlen_zero(contact->outbound_proxy) &&
|
||||
ast_sip_set_outbound_proxy(tdata, contact->outbound_proxy)) {
|
||||
pjsip_tx_data_dec_ref(tdata);
|
||||
ast_log(LOG_ERROR, "Unable to apply outbound proxy on request to qualify contact %s\n",
|
||||
contact->uri);
|
||||
return -1;
|
||||
}
|
||||
|
||||
init_start_time(contact);
|
||||
|
||||
ao2_ref(contact, +1);
|
||||
@@ -795,6 +804,7 @@ static int qualify_and_schedule_cb(void *obj, void *arg, int flags)
|
||||
struct ast_sip_aor *aor = arg;
|
||||
|
||||
contact->qualify_frequency = aor->qualify_frequency;
|
||||
|
||||
qualify_and_schedule(contact);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user