diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-09 16:50:45 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-09 16:50:45 +0000 |
commit | e12672b2485d5152712f9643a040e3acc7e32cd2 (patch) | |
tree | 2b93aa591a15f22b84b74cc0be63ec9240210eb5 /channels | |
parent | dbcca480c3520ec59cab23496f2d031726271596 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@113784 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 2cd3a9ad2..a204c7f7a 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -7787,9 +7787,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]); |