The transport option for endpoints configures the transport to be used when sending messages to the endpoint. It does not control the transport used for receiving traffic. It is not possible to configure multiple transports. You can also leave it empty and PJSIP will try its best to determine the correct transport to use. (For example if they register over TCP then we’ll contact them over TCP).
Sorry to revive such an old thread but I’ve just run into this issue.
I have a system with 3 transports, two are public facing (IPv4 and IPv6) and one is on a private vlan and leads to my PSTN provider.
Is it possible to say “use these two” for an endpoint or just “not this one” or similar? If I leave it blank incoming calls from the PSTN network will always use the private transport and won’t work.
I managed to fix this by putting the private transport first in pjsip.conf, and the public transports (udp, tcp, udp6, tcp6) after. They’re still selected at random but the o= and IP4 lines in the SDP always contain the public transports.