Hi,
we have asterisk server behind NAT using PJSIP. Some clients are connected with transport protocol wss (webrtc) and some are on UDP. Yesterday all webrtc clients stop working, without any software upgrade/change. The problem was that asterisk starts to send SDP without external address and webrtc clients were not able to connect. UDP clients work OK, because they are using external_media_address, local_net…
1.) It looks like that wss protocol is not using transport options local_net, external_media_address? Is it possible to used fixed external media address also when wss protocol is used?
It is not possible to configure multiple STUN servers. As well if Asterisk is on a fixed IP address you should use the ice_host_candidates functionality of rtp.conf to put the external IP address in as a host candidate, and not use STUN at all.
There is not a lot of documentation regarding ice_host_candidates, but as I understand correctly this configuration should map my local ip 10.1.1.5 to external 193.x.x.x and also include other local ip-s. (I need this, because I have some clients also on 10.1.x.x network.)
With ice_host_candidates mapping there is no way to set fixed external addresses, what is IMO most common scenario. For example, I was not able to set that only external 193.x.x.x and single local 10.1.1.5 will be included as candidates in SDP.
Maybe something like this:
any => 193.x.x.x
any => 10.1.1.5
So that in any situation ONLY those two addresses will be included and also any change in server network configuration (like adding vpn connection, docker network) will not reveal new candidate in SDP or remove fixed one.
I don’t quite understand what you mean, but you can prevent candidates from appearing in the SDP by using the “ice_deny” and “ice_permit” functionality.