EPM - PJSIP Cisco SPA phones - If port is not 5060 won't register

I had an issue with registering Cisco SPA50xG phones after switching to Chan_PJSIP. The issue was the Cisco phones would not register unless the SIP server was listening on port 5060. Same issue would occur if Chan_SIP was bound to a port other than 5060. Endpoint Manager is setting the following after building the phone configs:

<SIP_Port_1_ ua="na">5061</SIP_Port_1_>
<Proxy_1_ ua="na">X.X.X.X</Proxy_1_>

I am not sure if SIP_Port_1_ if attempting to set the listening port or the SIP server port, nmap X.X.X.X -sU reports UDP 5060 is open and the phone’s web admin shows SIP Port = 5061 for Ext 1. Regardless, in order for the Cisco phones to register to a port other than 5060 the configuration has to reflect (5061 in this case):

<Proxy_1_ ua="na">X.X.X.X:5061</Proxy_1_>

In order to get Endpoint Manager to do this I had to set the Proxy_1_ value to X.X.X.X:5061 using BaseEdit. I am sure I am not the only one chasing this, it would be nice if EPM would set this for us.

Hello Shauberg, I think I might be having the same problem as you are. I would like a little more information if you could help.

I have 5 Cisco SPA508g SIP phones and I’ve tried everything under the sun to change the default port from 5060 to something else, but the phones will just not work (blinking orange lights and wont work). The issues and fix you are talking about is it to fix this problem?

Assuming your running the FreePBX 12.

I have gotten this to work using the Commercial Endpoint Manager, you can either modify the template the SPA phones are using through Basefile Edit, Set:

<Proxy_1_ ua="na"></Proxy_1_> value to X.X.X.X:PORT

X.X.X.X is your PBX server IP, in my case 5061 is the port I used.

Or, you can set the port via the “Destination Address” value in the template settings the SPA phones are using. Say X.X.X.X:5061

Make sure to rebuild the configs and manually reboot the phones. EPM will not restart your phones and the Phone Reboot module will not work with PJSIP.

I haven’t tried using ports other than 5060 with OSS EPM, but the proxy server setting may work in the same manor as the Destination Address setting in the Commercial EPM.

Your best bet is to factory reset on the physical SPA phones which will force the phones to auto provision granted you have the TFTP(Option 66) value set to your PBX server IP on your DHCP server. The phones should reboot on their own a couple of times before the provisioning completes.

Make sure your PBX server is listening on the desired ports for CHAN_SIP and/or CHAN_PJSIP via the Asterisk SIP settings and the “Extensions” settings are reflecting the correct channel driver. Remember to restart Asterisk if you make changes to the Asterisk SIP Settings. “core restart now” under the Asterisk CLI.

Also, there are a number of issues with Asterisk 13 and PJSIP as why FreePBX has in beta status.

~Cheers.