Configure multiple transport for per endpoint

hi,
I use realtime for endpoint.
I want to configure multiple transport for per endpoint.

the filed ‘transport’ in ps_transports table:

  transport-udp,transport-tcp

but, asterisk does not recognize this configuration format. the log on console:

[Jun  9 17:59:13] ERROR[12164]: res_pjsip.c:2954 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport 'transport-udp,transport-tcp'

how to do it?

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).

1 Like

That’s great! I will leave it empty. thanks!

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.

The option hasn’t changed or been extended. You can only explicitly tell it to use a single transport.

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.

1 Like