summaryrefslogtreecommitdiff
path: root/res/res_pjsip.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2013-10-10 12:26:20 +0000
committerJoshua Colp <jcolp@digium.com>2013-10-10 12:26:20 +0000
commitcbbcf1808cbe24753d3c8a23cf596497223f631f (patch)
tree48f55f5400f076f69f2ba69597c5d6497c9eaa5f /res/res_pjsip.c
parentfcf6c846662390afa501d9e5432e6d08bcdc82da (diff)
Fix an assertion in res_pjsip when specifying an invalid outbound proxy.
This change fixes two issues when setting an outbound proxy: 1. The outbound proxy URI was not parsed and validated during configuration. 2. If an outgoing dialog was created and the outbound proxy could not be set an assertion would occur because the usage count on the dialog was not decremented. The documentation has also been updated to specify that a full URI must be specified for the outbound proxy. (closes issue ASTERISK-22672) Reported by: Antti Yrjola ........ Merged revisions 400824 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r--res/res_pjsip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 4d9a19e2b..9718e6c43 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -254,7 +254,7 @@
<synopsis>Authentication object used for outbound requests</synopsis>
</configOption>
<configOption name="outbound_proxy">
- <synopsis>Proxy through which to send requests</synopsis>
+ <synopsis>Proxy through which to send requests, a full SIP URI must be provided</synopsis>
</configOption>
<configOption name="rewrite_contact">
<synopsis>Allow Contact header to be rewritten with the source IP address-port</synopsis>
@@ -1401,6 +1401,7 @@ pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint,
pj_strdup2_with_null(dlg->pool, &tmp, outbound_proxy);
if (!(route = pjsip_parse_hdr(dlg->pool, &ROUTE_HNAME, tmp.ptr, tmp.slen, NULL))) {
+ dlg->sess_count--;
pjsip_dlg_terminate(dlg);
return NULL;
}