MT#55283 support seperate from/to-interface=

Change-Id: I31499c16725af64f0c7bf5a0770ac81d6feb69d7
rfuchs/dataport
Richard Fuchs 1 year ago
parent a140d83975
commit 6d4ffb8ceb

@ -1644,6 +1644,9 @@ void call_ng_main_flags(sdp_ng_flags *out, str *key, bencode_item_t *value,
case CSH_LOOKUP("frequencies"):
call_ng_flags_freqs(out, value);
break;
case CSH_LOOKUP("from-interface"):
out->direction[0] = s;
break;
case CSH_LOOKUP("from-label"):
case CSH_LOOKUP("label"):
out->label = s;
@ -1916,6 +1919,9 @@ void call_ng_main_flags(sdp_ng_flags *out, str *key, bencode_item_t *value,
call_ng_flags_str_list(out, value, ng_t38_option, NULL);
break;
#endif
case CSH_LOOKUP("to-interface"):
out->direction[1] = s;
break;
case CSH_LOOKUP("to-label"):
out->to_label = s;
break;

@ -209,6 +209,12 @@ Optionally included keys are:
This special keyword is provided only for legacy support and should be considered obsolete.
It will be removed in future versions.
For commands that require only one interface (e.g. `publish`), use the
`interface=...` key. For commands that require two interfaces, as an
alternative to the `direction=` key, the two interfaces can be listed
separately, using `from-interface=...` for the first interface and
`to-interface=...` for the second one.
* `digit` or `code`
Sets the replacement digit for `DTMF-security=DTMF`.
@ -311,6 +317,12 @@ Optionally included keys are:
Contains one of the strings `off`, `immediate`, `delayed` or `heuristic`. This tells rtpengine which endpoint learning algorithm to use and overrides the `endpoint-learning` configuration option. This option can also be put into the `flags` list using a prefix of `endpoint-learning-`.
* `from-interface`
Contains a string identifying the network interface pertaining to the
"received from" direction of this message. Identical to setting the first
`direction=` value.
* `frequency` or `frequencies`
Sets the tone frequency or frequencies for `DTMF-security=tone` in Hertz.
@ -705,6 +717,12 @@ Optionally included keys are:
dictionary. The response dictionary may also contain the optional key `message` with
an explanatory string. No other key is required in the response dictionary.
* `to-interface`
Contains a string identifying the network interface pertaining to the
"going to" direction of this message. Identical to setting the second
`direction=` value.
* `to-label`
Commands that allow selection of two call participants (e.g. `block

@ -97,4 +97,77 @@ SDP
new_call;
offer('intfs selection alt', { 'from-interface' => 'foo', 'to-interface' => 'bar' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 0
c=IN IP4 198.51.100.1
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.2
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('intfs selection alt', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.2
s=tester
t=0 0
m=audio 3000 RTP/AVP 0
c=IN IP4 198.51.100.2
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.2
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
offer('intfs selection and new stream', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 0
c=IN IP4 198.51.100.1
a=sendrecv
m=audio 2004 RTP/AVP 0
c=IN IP4 198.51.100.1
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.2
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.2
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
done_testing();

Loading…
Cancel
Save