summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-03-10 20:00:21 +0000
committerJoshua Colp <jcolp@digium.com>2008-03-10 20:00:21 +0000
commit362b184c9c8832d41558a319288badd895583f43 (patch)
tree156cdc09dbcba8cc43898686c96eef88b8d0ae95 /channels
parent86fe5cc8006cddd86aa63dfb9305000ec7bc717f (diff)
If we receive a 488 on a T38 request reinvite back to audio. As well reinvite across a bridge back to audio if one side doesn't negotiate to T38.
(closes issue #8677) Reported by: alex-911 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a4afae1a9..39b2d27ea 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5133,6 +5133,8 @@ static int sip_indicate(struct ast_channel *ast, int condition, const void *data
transmit_reinvite_with_sdp(p, TRUE, FALSE);
}
break;
+ case AST_T38_TERMINATED:
+ case AST_T38_REFUSED:
case AST_T38_REQUEST_TERMINATE: /* Shutdown T38 */
if (p->t38.state == T38_ENABLED)
transmit_reinvite_with_sdp(p, FALSE, FALSE);
@@ -14692,24 +14694,13 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
break;
case 488: /* Not acceptable here */
xmitres = 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 .
- */
+ if (p->udptl && p->t38.state == T38_LOCAL_REINVITE) {
change_t38_state(p, 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 && !req->ignore)
- ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
- p->needdestroy = 1;
+ /* Trigger a reinvite back to audio */
+ transmit_reinvite_with_sdp(p, FALSE, FALSE);
} else if (p->udptl && p->t38.state == T38_LOCAL_DIRECT) {
/* We tried to send T.38 out in an initial INVITE and the remote side rejected it,
right now we can't fall back to audio so totally abort.