diff options
author | Matthew Jordan <mjordan@digium.com> | 2015-04-11 15:11:15 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2015-04-11 15:11:15 +0000 |
commit | 5f181bcccd9f3309958f341c9fb9e9b0a307c2f9 (patch) | |
tree | 42d58fa34fa9af9e295b92e0a62913078e31049d /res/res_pjsip_t38.c | |
parent | c499cabf530227fc5022ef411c32f3a95108ba2f (diff) |
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
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_t38.c')
-rw-r--r-- | res/res_pjsip_t38.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index c5cebc6c4..ac31086a6 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -259,6 +259,7 @@ static int t38_initialize_session(struct ast_sip_session *session, struct ast_si 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 @@ static void t38_interpret_sdp(struct t38_state *state, struct ast_sip_session *s } 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")) { |