Custom transport in PJSIP, possible from GUI?

At present I don’t see any feasible way of doing this at all with FreePBX. You can create a transport easily enough, by manually adding the necessary details to pjsip.transports_custom.conf, and you can confirm that the transport is created by the Asterisk output from pjsip show transports. But you can’t apply this transport to a PJSIP trunk (nor to an extension) directly from the GUI, so you must also manually create a PJSIP trunk then manually create dialplan to use the trunk. At that point, using the GUI you would create a trunk of type ‘Custom’ with an appropriate dial string that matches your dialplan.

This needs a feature request to allow users to create custom transports in Asterisk SIP settings.

edit - Having finished coffee #3, I realize there is a feasible way to do this. Create a new PJSIP transport in pjsip.transports_custom.conf:

[TESTING]
type=transport
protocol=udp
bind=0.0.0.0:5166
external_media_address=xxx.xxx.xxx.xxx
external_signaling_address=xxx.xxx.xxx.xxx
allow_reload=yes
local_net=10.0.0.0/8
local_net=10.8.0.0/24
local_net=192.168.0.0/24

From the Asterisk CLI confirm it is working:

core reload
pjsip show transport TESTING

In the file pjsip.endpoint.conf locate the endpoint associated with the trunk you want to change, and note the name in square brackets. Then create something like the following in pjsip.endpoint_custom_post.conf using the name that matches your trunk:

[pjsip-test-trunk](+)
transport=TESTING

.Then check the transport line from the Asterisk CLI:

core reload
pjsip show endpoint pjsip-test-trunk
7 Likes