From: Olle Johansson Date: Wed, 30 Aug 2006 19:01:55 +0000 (+0000) Subject: Issue #7572 - Hangup when receiving a buggy 487 response to an INVITE X-Git-Tag: 1.2.12~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abfcb8d31ed782ad3402b8128df28f18a2fe7d1d;p=thirdparty%2Fasterisk.git Issue #7572 - Hangup when receiving a buggy 487 response to an INVITE git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41423 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2e0a662ef4..cd7583b8de 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2299,6 +2299,7 @@ static int hangup_sip2cause(int cause) switch(cause) { case 603: /* Declined */ case 403: /* Not found */ + case 487: /* Call cancelled */ return AST_CAUSE_CALL_REJECTED; case 404: /* Not found */ return AST_CAUSE_UNALLOCATED; @@ -10073,6 +10074,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ break; case 487: /* channel now destroyed - dec the inUse counter */ + if (owner) + ast_queue_hangup(p->owner); update_call_counter(p, DEC_CALL_LIMIT); break; case 482: /* SIP is incapable of performing a hairpin call, which