[Home]

Summary:ASTERISK-24928: [patch]t38_udptl_maxdatagram in pjsip.conf not honored
Reporter:Juergen Spies (jspies)Labels:
Date Opened:2015-03-31 08:25:05Date Closed:2015-04-11 10:12:34
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip_t38
Versions:13.2.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 7, Pure VoIPAttachments:( 0) pjsipT38patch20150331.txt
Description:When in pjsip.conf for an endpoint „t38_udptl_maxdatagram” is set it will not be used to initialize the udptl structure in “t38_initialize_session”. “far_max_datagram” will be only set from the SIP INVITE SDP MediaAttribute T38FaxMaxDatagram from the remote endpoint.
The bug was discovered as our ISP does not provide T38FaxMaxDatagram in his SIP INVITE SDP message. The result was “WARNING[3849]: udptl.c:852 calculate_far_max_ifp: UDPTL (PJSIP/versateltrunk_endpoint-0000008b): Cannot calculate far_max_ifp before far_max_datagram has been set.” in asterisk messages and the INVITE was rejected with “SIP/2.0 488 Not Acceptable Here”.
According to our analysis the root cause is that in “t38_initialize_session” the new udptl-structure is not initialized with the value from “session->endpoint->media.t38. maxdatagram”. The values for nat and error_correction in contrast are initialized properly.
Therefor if the remote point does not provide a value for T38FaxMaxDatagram the value of “udptl->far_max_datagram” remains “-1” because ast_udptl_set_far_max_datagram is never called which results in the warning above.
Comments:By: Juergen Spies (jspies) 2015-03-31 08:36:54.542-0500

I will provide a patch as soon as my license agreement is accepted

By: Juergen Spies (jspies) 2015-03-31 12:58:43.876-0500

Proposed patch to this issue

By: Juergen Spies (jspies) 2015-04-01 11:32:08.887-0500

When I created this issue I was not sure if T38FaxMaxDatagram  was mandatory or optional in an SIP INVITE SDP. According to RFC 4612 it is optional. Therefor I consider the behavior of Asterisk a major bug now.

By: Rusty Newton (rnewton) 2015-04-03 13:58:30.025-0500

Once you've followed the Code Review process [1] and submitted your code to Review Board [2] be sure to edit this JIRA issue and add the Review Board review URL in the appropriate field.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Review+Board+Usage