[asterisk-commits] mjordan: trunk r434689 - in /trunk: ./ res/res_pjsip_t38.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 11 10:11:17 CDT 2015


Author: mjordan
Date: Sat Apr 11 10:11:15 2015
New Revision: 434689

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434689
Log:
res/res_pjsip_t38: Add missing initialization of t38faxmaxdatagram

Prior to this patch, the far_max_datagram value on the UDPTL structure would
remain -1 if the remote endpoint fails to provide the SDP media attribute
T38FaxMaxDatagram. This can result in the INVITE request being rejected. With
this patch, we will now properly initialize the value with either the default
value or with the value provided by pjsip.conf's t38_udptl_maxdatagram
parameter.

Review: https://reviewboard.asterisk.org/r/4589

ASTERISK-24928 #close
Reported by: Juergen Spies
Tested by: Juergen Spies
patches:
  pjsipT38patch20150331.txt submitted by Juergen Spies (License 6698)
........

Merged revisions 434688 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_t38.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/res_pjsip_t38.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_t38.c?view=diff&rev=434689&r1=434688&r2=434689
==============================================================================
--- trunk/res/res_pjsip_t38.c (original)
+++ trunk/res/res_pjsip_t38.c Sat Apr 11 10:11:15 2015
@@ -259,6 +259,7 @@
 	ast_channel_set_fd(session->channel, 5, ast_udptl_fd(session_media->udptl));
 	ast_udptl_set_error_correction_scheme(session_media->udptl, session->endpoint->media.t38.error_correction);
 	ast_udptl_setnat(session_media->udptl, session->endpoint->media.t38.nat);
+	ast_udptl_set_far_max_datagram(session_media->udptl, session->endpoint->media.t38.maxdatagram);
 
 	return 0;
 }
@@ -580,9 +581,7 @@
 		} else if (!pj_stricmp2(&attr->name, "t38faxversion")) {
 			state->their_parms.version = pj_strtoul(&attr->value);
 		} else if (!pj_stricmp2(&attr->name, "t38faxmaxdatagram") || !pj_stricmp2(&attr->name, "t38maxdatagram")) {
-			if (session->endpoint->media.t38.maxdatagram) {
-				ast_udptl_set_far_max_datagram(session_media->udptl, session->endpoint->media.t38.maxdatagram);
-			} else {
+			if (!session->endpoint->media.t38.maxdatagram) {
 				ast_udptl_set_far_max_datagram(session_media->udptl, pj_strtoul(&attr->value));
 			}
 		} else if (!pj_stricmp2(&attr->name, "t38faxfillbitremoval")) {




More information about the asterisk-commits mailing list