summaryrefslogtreecommitdiff
path: root/res/res_pjsip_refer.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-08-29 18:08:22 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-09-09 17:13:02 -0500
commitba362822f34e1967e5e15a0e81bab2f5981b014a (patch)
tree2a29699f8901f55e40b7f9270532f4b8ec405455 /res/res_pjsip_refer.c
parent9d54dd04bbdad6849aee77536ab12c5fa6620680 (diff)
res_pjsip: Add ignore_uri_user_options option.
This implements the chan_sip legacy_useroption_parsing option but with a better name. * Made the caller-id number and redirecting number strings obtained from incoming SIP URI user fields always truncated at the first semicolon. People don't care about anything after the semicolon showing up on their displays even though the RFC allows the semicolon. ASTERISK-26316 #close Reported by: Kevin Harwell Change-Id: Ib42b0e940dd34d84c7b14bc2e90d1ba392624f62
Diffstat (limited to 'res/res_pjsip_refer.c')
-rw-r--r--res/res_pjsip_refer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index 19367bf32..c1dee8225 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -814,6 +814,13 @@ static int refer_incoming_blind_request(struct ast_sip_session *session, pjsip_r
/* Using the user portion of the target URI see if it exists as a valid extension in their context */
ast_copy_pj_str(exten, &target->user, sizeof(exten));
+
+ /*
+ * We may want to match in the dialplan without any user
+ * options getting in the way.
+ */
+ AST_SIP_USER_OPTIONS_TRUNCATE_CHECK(exten);
+
if (!ast_exists_extension(NULL, context, exten, 1, NULL)) {
ast_log(LOG_ERROR, "Channel '%s' from endpoint '%s' attempted blind transfer to '%s@%s' but target does not exist\n",
ast_channel_name(session->channel), ast_sorcery_object_get_id(session->endpoint), exten, context);