[asterisk-commits] oej: branch 1.2 r48320 -
/branches/1.2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Dec 6 08:42:42 MST 2006
Author: oej
Date: Wed Dec 6 09:42:41 2006
New Revision: 48320
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48320
Log:
Issue #8528 - make sure we don't delete the dialog too quickly after receiving
a 487. Move 487 handling into handle_response_invite where it really
belongs and don't add an ALREADYGONE flag to the dialog.
Modified:
branches/1.2/channels/chan_sip.c
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=48320&r1=48319&r2=48320
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Wed Dec 6 09:42:41 2006
@@ -9827,12 +9827,23 @@
ast_log(LOG_WARNING, "Re-invite to non-existing call leg on other UA. SIP dialog '%s'. Giving up.\n", p->callid);
transmit_request(p, SIP_ACK, seqno, 0, 0);
break;
+ case 487: /* Cancelled transaction */
+ /* We have sent CANCEL on an outbound INVITE
+ This transaction is already scheduled to be killed by sip_hangup().
+ */
+ transmit_request(p, SIP_ACK, seqno, 0, 0);
+ if (p->owner && !ignore)
+ ast_queue_hangup(p->owner);
+ else if (!ignore)
+ update_call_counter(p, DEC_CALL_LIMIT);
+ break;
case 491: /* Pending */
/* we have to wait a while, then retransmit */
/* Transmission is rescheduled, so everything should be taken care of.
We should support the retry-after at some point */
break;
case 501: /* Not implemented */
+ transmit_request(p, SIP_ACK, seqno, 0, 0);
if (p->owner)
ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
break;
@@ -10140,6 +10151,10 @@
ast_set_flag(p, SIP_NEEDDESTROY);
break;
+ case 487:
+ if (sipmethod == SIP_INVITE)
+ handle_response_invite(p, resp, rest, req, ignore, seqno);
+ break;
case 491: /* Pending */
if (sipmethod == SIP_INVITE) {
handle_response_invite(p, resp, rest, req, ignore, seqno);
@@ -10175,12 +10190,6 @@
case 603: /* Decline */
if (p->owner)
ast_queue_control(p->owner, AST_CONTROL_BUSY);
- 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
is yet another failure of not having a layer 2 (again, YAY
More information about the asterisk-commits
mailing list