Change PJSIP WS and WSS Listening Ports

Here is what they are by default:

pbx-whh*CLI> pjsip show transports

Transport: 0.0.0.0-tcp tcp 3 96 0.0.0.0:Non-Standard-Good!
Transport: 0.0.0.0-tls tls 3 96 0.0.0.0:Non-Standard-Good!
Transport: 0.0.0.0-udp udp 3 96 0.0.0.0:Non-Standard-Good!
Transport: 0.0.0.0-ws ws 3 96 0.0.0.0:5060 - BAD!
Transport: 0.0.0.0-wss wss 3 96 0.0.0.0:5060 - BAD!

I can manually change them in /etc/asterisk/pjsip.transports.conf but of course that gets overwritten as soon as I submit and reload - I could put them /etc/asterisk/pjsip.transports_custom_post.conf but that seems a little “manual” to me - is there nowhere in the GUI to set these ports - It’s actually the WSS port I care about - I have people using UCP over HTTPS and unless you change the port (or expose 5060 - Not!) the Phone in UCP doesn’t work.

Seems like it should be somewhere in the GUI but I can’t find it.

Settings, Asterisk SIP Settings, PJSIP tab. Need to restart asterisk after the apply config.

Not for WSS - I am using Framework 15.0.17.24

You can set the port for UDP, TCP and TLS - no option for WS and WSS.

Ok - Curious thing here - if I try and just re-define the transport in pjsip.transports_custom_post.conf (copying the block from pjsip.transports.conf with the right port assignment) it crashes pjsip - it doesn’t load.

If I turn them OFF under PJSIP Settings and then put them in pjsip.transports_custom_post.conf they load and work, but fwconsole throws this error:

PJSIP Transports for WS and WSS have enabled in Asterisk SIP Settings under the Chan PJSIP Settings tab. Please restart Asterisk (in bright RED)

Another thing I just noticed - even though it’s an HTTPS connection to an HTTPS WebPhone, it is using the WS port - figured this out because I hadn’t bothered to re-map/open the port and it didn’t work until I did - Why am I not using the WSS port?

I stand corrected, Not seeing a supported way to resolve this. Adding this to my list of nice-to-haves.

Actually, this is not a solution at all - if I shut them off in PJSIP Settings and then turn them on in pjsip.transports_custom_post.conf I get the following error message and Zulu is not happy:

image

I guess until this can be added I will have to expose that port!

1 Like