Unable to register any SIP Phone

I have successfully built my FreePBX server and set up my SIP trunk. I’m confirming it’s working because when I dial the DID on a cell phone, the server goes into the IVR menu I set up for testing. So it’s receiving inbound calls from the outside world.

Problem is, I can’t register any SIP phones (hardware and software) and I’ve tried everything:

  • Opened port TCP port 5160 on the hardware firewall pointing the FreePBX Server
  • Created new SIP Extension (101) and linked to a new user. Copied both secrets to clipboard
  • Logged into the SIP Phone’s web interface (Shoretel IP-8000).

Parameters are:
SIP Username: Same as what I set up in FreePBX
SIP Authorization Name: Same as the SIP Username
SIP Authorization Password: Same as the FreePBX User Secret
SIP Registration: Direct
SIP Registrar: Enabled
Registrar Hostname: IP Address of the FreePBX server
Registrar IP Port: 5160
UDP Signaling Port: 5160
TCP Signaling: Enabled
TCP Signaling Port: 5160

These parameters lead SIP Registration to fail.

What am I doing wrong?

You say you

Opened port TCP port 5160 on the hardware firewall pointing the FreePBX Server

but did you also

Opened port UDP port 5160 on the hardware firewall pointing the FreePBX Server

and what does

lsof -i :5060

return, unless you changed things, external SIP connections will use UDP and FreePBX will need you to support and provision chan_pjsip on udp/5060 or change your sip ports for the connections

Thanks for your quick response!

I’ve opened up both TCP and UDP port 5160 on the firewall, but that didn’t seem to have an effect.

I ran the command and this is what returned:

And just for fun I ran lsof -I :5160 and this is what was returned:
(it’s not letting me post a second image because I’m a new user, so I’ll post another reply.)

I also added TCP and UDP port 5060 to forward to FreePBX just to see what would happen, restarted the server, and hoped for the best. I also adjusted the settings on the Shoretel IP8000 to use port 5060.

We’re still failing SIP Registration.

Here’s the result when running lsof -I :5160

. . . .and FreePBX will need you to support and provision chan_pjsip on udp/5060 or change your sip ports for the connections . . . .

unless you changed FreePBX to send udp/5060 to chan_sip

I haven’t changed any defaults, and both chan_sip and chan_pjsip are provisioned and on. Chan_SIP is on 5160, Chan_PJSIP is on 5060.

I changed the extension associated with the user to use PJSIP instead of regular SIP. That didn’t help.

I also have a softphone on my computer called MicroSIP, and I tried setting the user up through there. It immediately says “Incorrect Password,” although I’ve reset the password on the user account and tried again. Still no luck.

Admittedly, I’m completely new to FreePBX and Asterisk. Are there some configuration files I could post here? I feel like I’m missing something very simple…

Also – FreePBX (the standard distro running on CentOS) is running as a VM in HyperV on a Windows Server. So that might be causing some issues. But the VM has its own private IP address on the network and I’m able to ping it.

Are you getting a timeout error or something else? if its timeout, its most probably from your network settings.

I’ve had a breakthrough! I watched a YouTube video and clearly I was reading the instructions wrong. I was using the USER password instead of the Extension Secret.

Also I stopped using the custom username associated with the extension, and just typed the extension number in the user field.

So the softphone is now registered.

I’m going to try and register the Shoretel IP 8000 and let everyone know what happens.

Unfortunately, the ShoreTel IP8000 continues to fail SIP Registration… it’s past midnight here so I’m going to try again tomorrow. If anyone has anything to add for what I can try, I’ll look forward to reading and trying. Thanks for everyone’s suggestions up to this point.

This is solved… the Shoretel IP8000 finally registered with the FreePBX box.

To summarize, here are the settings that worked:

  • On the FreePBX Server: Create a PJSIP extension, copy the SIP Secret to clipboard.
  • On the ShoreTel IP8000: Use the extension number as the username (NOT the User the extension is associated with). Use the Extension Secret as the Password (NOT the password for the User the extension is associated with). Port 5060 is fine. Restart the Shoretel and wait several minutes.
1 Like