Inquiries about setting up the network interface of `rtpengine`

12 views
Skip to first unread message

MCCM Yu

unread,
Oct 28, 2025, 9:58:30 PM (4 days ago) Oct 28
to Sipwise rtpengine
Hi,

My `rtpengine` has a `host-type` network that is running as a Docker container.
There are 2 network interfaces that `rtpengine` can use.
A is connected to the PBX on the internal network, and B is connected to the webrtc client on the external network.

At this time,
1) When `rtpengine` receives a call from the PBX, it must forward RTP bidirectionally between address of A and address of B.
On the contrary,
2) If the call is from the webrtc client, RTP must be forwarded bidirectionally between address of B and address of A.

IMO, it seems that the direction attribute is available in the ng protocol's `offer` request.
In the case of 1), `direction` is given as [A', 'B'], and in the case of 2), `direction` is given as [B', 'A'].
However, `rtpengine` only forwards RTP bidirectionally to addresses that I set with the '--interface' option.

In summary, `rtpengine` has to use address of interface B, the public address, as the address for the session with the webrtc client,
Regarding the session with PBX, `rtpengine` has to use address of interface A, which is a private address.

1 more question. ICE candidates address on SDP exchanged with the webrtc client is also set to '--interface' option.
Is there a way to present a domain address in the outside direction, or interface B, which is a public address?
Do I have to manually process the SDP, and change the address?

Richard Fuchs

unread,
Oct 31, 2025, 8:51:12 AM (2 days ago) Oct 31
to rtpe...@googlegroups.com
On 28/10/2025 21.58, MCCM Yu wrote:
My `rtpengine` has a `host-type` network that is running as a Docker container.
There are 2 network interfaces that `rtpengine` can use.
A is connected to the PBX on the internal network, and B is connected to the webrtc client on the external network.

At this time,
1) When `rtpengine` receives a call from the PBX, it must forward RTP bidirectionally between address of A and address of B.
On the contrary,
2) If the call is from the webrtc client, RTP must be forwarded bidirectionally between address of B and address of A.

IMO, it seems that the direction attribute is available in the ng protocol's `offer` request.
In the case of 1), `direction` is given as [A', 'B'], and in the case of 2), `direction` is given as [B', 'A'].
Understood so far (I think).
However, `rtpengine` only forwards RTP bidirectionally to addresses that I set with the '--interface' option.

But this is where I start to get confused.

The `--interface` option (or its config file counterpart) is used to tell rtpengine which interfaces there are, which addresses they have, and optionally which names they have, especially if there are multiple ones. So typically in a case like yours, you need to configure the local interfaces via `--interface=...` and give them names, and then tell rtpengine on a call-by-call basis which direction a call is flowing using the configured interface names.

If the usage is not clear, perhaps it would be best to post a concrete example of your configuration.

Is there a way to present a domain address in the outside direction, or interface B, which is a public address?
Do I have to manually process the SDP, and change the address?

We don't currently support domain names for interfaces. You can try with manual SDP text manipulation to rewrite them in, but it could be tricky to get it right. Best would be to patch the code and add support for domain names, which shouldn't be too difficult, and then open a pull request.

Cheers

Reply all
Reply to author
Forward
0 new messages