[asterisk-bugs] [Asterisk 0016634]: asterisk crashes while fax sending

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 27 11:11:13 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16634 
====================================================================== 
Reported By:                krn
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16634
Category:                   Channels/chan_sip/T.38
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.0.20 
JIRA:                       SWP-747 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-18 10:30 CST
Last Modified:              2010-01-27 11:11 CST
====================================================================== 
Summary:                    asterisk crashes while fax sending
Description: 
[general]
t38pt_udptl=yes
#next three lines makes no changes
t38pt_rtp=yes
t38pt_usertpsource=yes
faxdetect = yes

[provider]
type=peer
host=sip.provider.com
fromdomain=sip.provider.com
context=incoming-from-prov
port=5065
defaultuser=user
secret=password
fromuser=user
call-limit=10
canreinvite=yes
insecure=invite,port
nat=no
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833

[IntUser]
type=friend
host=dynamic
context=office-internal
defaultuser=intuser
secret=password
callgroup=3
pickupgroup=3
callerid=103 User
canreinvite=yes
qualify=30000
call-limit=2
t38pt_udptl=yes
disallow=all
allow=ulaw
allow=alaw
t38pt_udptl=yes
faxdetect=yes
dtmfmode=rfc2833
nat=no

IntUser - ATA Linksys SPA2102 with fax attached
T.38 with reinvite, vad disabled, external non-firewalled ip

Messages before crash:
WARNING[11356]: udptl.c:766 calculate_far_max_ifp: (no tag): Cannot
calculate far_max_ifp before far_max_datagram has been set.
WARNING[11389]: udptl.c:725 calculate_local_max_datagram: (no tag): Cannot
calculate local_max_datagram before local_max_ifp has been set.
WARNING[11389]: udptl.c:766 calculate_far_max_ifp: (SIP/xxxxxxxxxxxxxx):
Cannot calculate far_max_ifp before far_max_datagram has been set.


====================================================================== 

---------------------------------------------------------------------- 
 (0117248) raivisr (reporter) - 2010-01-27 11:11
 https://issues.asterisk.org/view.php?id=16634#c117248 
---------------------------------------------------------------------- 
with following hack I got it running to some extent, at least no more
segfaults:

--- asterisk.orig/channels/chan_sip.c	2010-01-27 15:15:20.000000000 +0200
+++ asterisk/channels/chan_sip.c	2010-01-27 16:28:57.000000000 +0200
@@ -5300,6 +5300,18 @@ static void change_t38_state(struct sip_
 	if (!chan)
 		return;
 
+	/* if remote end did not send their T38FaxMaxDatagram,
+	 * set it to configured value
+	 */
+	if (state == T38_PEER_REINVITE || state == T38_ENABLED)
+	{
+		if (ast_udptl_get_far_max_datagram(p->udptl) == -1)
+		{
+			ast_udptl_set_far_max_datagram(p->udptl, p->t38_maxdatagram);
+			ast_log(LOG_WARNING,"MaxDatagram has not been set, defaulting to
%d",p->t38_maxdatagram);
+		}
+	}
+
 	/* Given the state requested and old state determine what control frame
we want to queue up */
 	if (state == T38_PEER_REINVITE) {
 		parameters = p->t38.their_parms;

patch is for asterisk svn trunk version and requires maxdatagram option to
be set either in sip general or for specific peer. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-27 11:11 raivisr        Note Added: 0117248                          
======================================================================




More information about the asterisk-bugs mailing list