MT#55283 allow overriding T.38 version

Change-Id: I2e8040774ceb7faaa65a2ec6e69bc67be0260caa
(cherry picked from commit b6f34096af)
(cherry picked from commit 40a5ae24bc)
mr12.5.1
Richard Fuchs 1 month ago
parent 950de61b90
commit 0f938bd645

@ -1315,6 +1315,7 @@ void call_ng_flags_init(sdp_ng_flags *out, enum call_opmode opmode) {
out->volume = 9999;
out->digit = -1;
out->frequencies = g_array_new(false, false, sizeof(int));
out->t38_version = -1;
}
static void call_ng_dict_iter(sdp_ng_flags *out, bencode_item_t *input,
@ -1949,6 +1950,17 @@ void call_ng_main_flags(sdp_ng_flags *out, str *key, bencode_item_t *value,
case CSH_LOOKUP("t.38"):
call_ng_flags_str_list(out, value, ng_t38_option, NULL);
break;
case CSH_LOOKUP("T38-version"):
case CSH_LOOKUP("T.38-version"):
case CSH_LOOKUP("t38-version"):
case CSH_LOOKUP("t.38-version"):
case CSH_LOOKUP("T38 version"):
case CSH_LOOKUP("T.38 version"):
case CSH_LOOKUP("t38 version"):
case CSH_LOOKUP("t.38 version"):
out->t38_version = bencode_get_integer_str(value, out->t38_version);
break;
#endif
case CSH_LOOKUP("to-interface"):
out->direction[1] = s;

@ -872,6 +872,10 @@ static void __t38_options_from_flags(struct t38_options *t_opts, const sdp_ng_fl
t38_opt(no_v29);
t38_opt(no_v34);
t38_opt(no_iaf);
#undef t38_opt
if (flags && flags->t38_version >= 0)
t_opts->version = flags->t38_version;
}
static void __check_t38_gateway(struct call_media *pcm_media, struct call_media *t38_media,
@ -887,6 +891,7 @@ static void __check_t38_gateway(struct call_media *pcm_media, struct call_media
t_opts.fec_span = 3;
t_opts.max_ec_entries = 3;
}
__t38_options_from_flags(&t_opts, flags);
MEDIA_SET(pcm_media, GENERATOR);

@ -844,6 +844,14 @@ Optionally included keys are:
Use UDPTL FEC instead of redundancy. Only useful with `T.38=force` as
it's a negotiated parameter.
* `T.38 version`
Sets the T.38 version number to use for the T.38 gateway. The default is
version zero, or to go along with what has been advertised in the SDP if
responding to a received T.38 offer. Overriding the version to zero
regardless of what has been advertised in the SDP can solve T.38 gateway
problems against certain endpoints.
* `volume`
Sets the tone volume for `DTMF-security` modes `tone`, `zero, `DTMF`,

@ -141,6 +141,7 @@ struct sdp_ng_flags {
str vsc_pause_rec;
str vsc_pause_resume_rec;
str vsc_start_pause_resume_rec;
int t38_version;
unsigned int asymmetric:1,
protocol_accept:1,

@ -681,6 +681,114 @@ t38_gw_test('FEC span 5',
new_call;
offer('override T.38 version control', { 'T.38' => [ 'decode' ] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=image 4000 udptl t38
c=IN IP4 198.51.100.1
a=sendrecv
a=T38FaxVersion:1
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:262
a=T38FaxMaxDatagram:300
a=T38FaxUdpEC:t38UDPRedundancy
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 8
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('override T.38 version control', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio 4002 RTP/AVP 8
c=IN IP4 198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=image PORT udptl t38
c=IN IP4 203.0.113.1
a=T38FaxVersion:1
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:1800
a=T38FaxMaxDatagram:512
a=T38FaxUdpEC:t38UDPRedundancy
a=sendrecv
SDP
new_call;
offer('override T.38 version', { 'T.38' => [ 'decode' ], 'T.38 version' => 0 }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=image 4000 udptl t38
c=IN IP4 198.51.100.1
a=sendrecv
a=T38FaxVersion:1
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:262
a=T38FaxMaxDatagram:300
a=T38FaxUdpEC:t38UDPRedundancy
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 8
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('override T.38 version', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio 4002 RTP/AVP 8
c=IN IP4 198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=image PORT udptl t38
c=IN IP4 203.0.113.1
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:1800
a=T38FaxMaxDatagram:512
a=T38FaxUdpEC:t38UDPRedundancy
a=sendrecv
SDP
# XXX packet loss tests
# XXX tests of different SDP options

Loading…
Cancel
Save