]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When a session timer expires during a T.38 call, re-invite with correct SDP
authorMatthew Jordan <mjordan@digium.com>
Fri, 15 Mar 2013 01:32:06 +0000 (01:32 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 15 Mar 2013 01:32:06 +0000 (01:32 +0000)
When a session timer expires during a dialog that has re-negotiated to T.38
and Asterisk is the refresher, Asterisk will send a re-INVITE with an SDP
containing audio media only. This causes some hilarity with the poor fax
session under weigh.

This patch corrects that by sending T.38 parameters if we are in the middle of
a T.38 session.

(closes issue ASTERISK-21232)
Reported by: Nitesh Bansal
patches:
  dont-send-audio-reinvite-for-sess-timer-in-t38-call.patch uploaded by nbansal (License 6418)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@383124 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 0c655847ddab1dff3ef446c5666a2651c396e632..9aa286e44c48f81673f30d03990b8cb9fb0489c4 100644 (file)
@@ -26686,7 +26686,11 @@ static int proc_session_timer(const void *vp)
 
        if (p->stimer->st_ref == SESSION_TIMER_REFRESHER_US) {
                res = 1;
-               transmit_reinvite_with_sdp(p, FALSE, TRUE);
+               if (T38_ENABLED == p->t38.state) {
+                       transmit_reinvite_with_sdp(p, TRUE, TRUE);
+               } else {
+                       transmit_reinvite_with_sdp(p, FALSE, TRUE);
+               }
        } else {
                p->stimer->st_expirys++;
                if (p->stimer->st_expirys >= 2) {