diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-03-15 18:54:27 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-03-15 18:54:27 -0500 |
commit | bcc566b77e7126b8316e9679872d0dc3ff9a446c (patch) | |
tree | 6f0c5ee3fc24bb9b66650081807caf344ba2089c /res | |
parent | 481ed5c8f133aa40c2456f575ad154d2ecb5bc82 (diff) | |
parent | 48447313b6591a98f9fb8dedf890fe9a9c261556 (diff) |
Merge "res/res_pjsip_refer: call xfer w/o extension" into 13
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip_refer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c index d52a922fd..db5061249 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); |