From 098efb66412cd1a262c8a95427948008113cd43e Mon Sep 17 00:00:00 2001
From: Terry Wilson <twilson@digium.com>
Date: Mon, 19 Sep 2011 22:28:17 +0000
Subject: [PATCH] Merged revisions 336792 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336792 | twilson | 2011-09-19 17:13:34 -0500 (Mon, 19 Sep 2011) | 9 lines

  Merged revisions 336791 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8

  ........
    r336791 | twilson | 2011-09-19 17:07:58 -0500 (Mon, 19 Sep 2011) | 2 lines

    Don't interfere with T.38 reinvites

    This is an update to the fix for ASTERISK-18340 and ASTERISK-17725
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d7d46f54ae..f226b1c56a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -20147,7 +20147,11 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
 						"Channel: %s\r\nChanneltype: %s\r\nUniqueid: %s\r\nSIPcallid: %s\r\nSIPfullcontact: %s\r\nPeername: %s\r\n",
 						p->owner->name, "SIP", p->owner->uniqueid, p->callid, p->fullcontact, p->peername);
 			} else {	/* RE-invite */
-				ast_queue_control(p->owner, AST_CONTROL_UPDATE_RTP_PEER);
+				if (p->t38.state == T38_DISABLED || p->t38.state == T38_REJECTED) {
+					ast_queue_control(p->owner, AST_CONTROL_UPDATE_RTP_PEER);
+				} else {
+					ast_queue_frame(p->owner, &ast_null_frame);
+				}
 			}
 		} else {
 			 /* It's possible we're getting an 200 OK after we've tried to disconnect
-- 
GitLab