summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorrey Searle <torrey@voxbone.com>2017-03-14 14:49:54 +0100
committerTorrey Searle <tsearle@gmail.com>2017-03-15 10:28:57 -0600
commit90ffb91cc45f3b902a43e5bb9c79249929d9d714 (patch)
treeb40e2a8c1f5491d394641b0f5e7b643d04915bb2
parent77334fcd6c647f7b30ef9d1af311c593ebe34ea9 (diff)
res/res_pjsip_refer: call xfer w/o extension
When transfering to a URI without an extension, ensure that the s extension of the dialplan is entered ASTERISK-26869 #close Change-Id: I07403df66cf93f09e00a40ab5b41bfc6f72b1525
-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 aa2af0933..0f4a95c77 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -822,6 +822,13 @@ static int refer_incoming_blind_request(struct ast_sip_session *session, pjsip_r
*/
AST_SIP_USER_OPTIONS_TRUNCATE_CHECK(exten);
+ /* Uri without exten */
+ if (ast_strlen_zero(exten)) {
+ ast_copy_string(exten, "s", sizeof(exten));
+ ast_debug(3, "Channel '%s' from endpoint '%s' attempted blind transfer to a target without extension. Target was set to 's@%s'\n",
+ ast_channel_name(session->channel), ast_sorcery_object_get_id(session->endpoint), context);
+ }
+
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);