[Asterisk-code-review] res/res pjsip t38: Add missing initialization of t38faxmaxda... (asterisk[certified/13.1])
Mark Michelson
asteriskteam at digium.com
Thu Apr 23 13:48:01 CDT 2015
Mark Michelson has submitted this change and it was merged.
Change subject: res/res_pjsip_t38: Add missing initialization of t38faxmaxdatagram
......................................................................
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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Change-Id: I15bde169fd59a224a02005fec9a439f0679a375e
---
M res/res_pjsip_t38.c
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Mark Michelson: Looks good to me, approved; Verified
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index d4b384f..430519e 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -255,6 +255,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;
}
@@ -578,9 +579,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")) {
--
To view, visit https://gerrit.asterisk.org/239
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I15bde169fd59a224a02005fec9a439f0679a375e
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list