[asterisk-commits] rizzo: branch rizzo/astobj2 r51279 -
/team/rizzo/astobj2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jan 19 01:49:42 MST 2007
Author: rizzo
Date: Fri Jan 19 02:49:42 2007
New Revision: 51279
URL: http://svn.digium.com/view/asterisk?view=rev&rev=51279
Log:
merge from trunk 50007 (all versions before already done):
Issue #8677 - Handle failure of T.38 re-invite
Modified:
team/rizzo/astobj2/channels/chan_sip.c
Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=51279&r1=51278&r2=51279
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Fri Jan 19 02:49:42 2007
@@ -12428,6 +12428,34 @@
else if (!ast_test_flag(req, SIP_PKT_IGNORE))
update_call_counter(p, DEC_CALL_LIMIT);
break;
+ case 488: /* Not acceptable here */
+ transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
+ if (reinvite && p->udptl) {
+ /* If this is a T.38 call, we should go back to
+ audio. If this is an audio call - something went
+ terribly wrong since we don't renegotiate codecs,
+ only IP/port .
+ */
+ p->t38.state = T38_DISABLED;
+ /* Try to reset RTP timers */
+ ast_rtp_set_rtptimers_onhold(p->rtp);
+ ast_log(LOG_ERROR, "Got error on T.38 re-invite. Bad configuration. Peer needs to have T.38 disabled.\n");
+
+ /*! \bug Is there any way we can go back to the audio call on both
+ sides here?
+ */
+ /* While figuring that out, hangup the call */
+ if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE))
+ ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ } else {
+ /* We can't set up this call, so give up */
+ if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE))
+ ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ }
+ break;
+
case 491: /* Pending */
/* we really should have to wait a while, then retransmit */
/* We should support the retry-after at some point */
@@ -12931,6 +12959,12 @@
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, seqno);
break;
+
+ case 488: /* Not acceptable here - codec error */
+ if (sipmethod == SIP_INVITE)
+ handle_response_invite(p, resp, rest, req, seqno);
+ break;
+
case 491: /* Pending */
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, seqno);
@@ -12987,7 +13021,6 @@
ast_string_field_build(p->owner, call_forward,
"Local/%s@%s", p->username, p->context);
/* Fall through */
- case 488: /* Not acceptable here - codec error */
case 480: /* Temporarily Unavailable */
case 404: /* Not Found */
case 410: /* Gone */
More information about the asterisk-commits
mailing list