summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-04-09 16:52:04 +0000
committerJoshua Colp <jcolp@digium.com>2008-04-09 16:52:04 +0000
commit230d9d14658934b1f93e87742115b40a68750e77 (patch)
tree034af1388c582ae5d0105a9aa04caeedabe765fe /channels
parent7e91279cfc78faa09a24dd65fd7153b93b6b07c5 (diff)
Merged revisions 113784 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r113784 | file | 2008-04-09 13:50:45 -0300 (Wed, 09 Apr 2008) | 4 lines If we receive an AUTHREQ from the remote server and we are unable to reply (for example they have a secret configured, but we do not) then queue a hangup frame on the Asterisk channel. This will cause the channel to hangup and a HANGUP to be sent via IAX2 to the remote side which is the proper thing to do in this scenario. (closes issue #12385) Reported by: viraptor ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 08dc92e45..8cfaf4e7b 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -8633,9 +8633,13 @@ retryowner2:
break;
}
if (authenticate_reply(iaxs[fr->callno], &iaxs[fr->callno]->addr, &ies, iaxs[fr->callno]->secret, iaxs[fr->callno]->outkey)) {
+ struct ast_frame hangup_fr = { .frametype = AST_FRAME_CONTROL,
+ .subclass = AST_CONTROL_HANGUP,
+ };
ast_log(LOG_WARNING,
"I don't know how to authenticate %s to %s\n",
ies.username ? ies.username : "<unknown>", ast_inet_ntoa(iaxs[fr->callno]->addr.sin_addr));
+ iax2_queue_frame(fr->callno, &hangup_fr);
}
if (!iaxs[fr->callno]) {
ast_mutex_unlock(&iaxsl[fr->callno]);