SIP Trunk Help Voicemail CME

Hello everyone. I am setting up a SIP trunk between a Cisco router running Call Manager express and my FreePBX system. The pourpose of this is to use the FreePBX system for Voicemail, presence, etc. I am following an article I found on google on setting this up. I can see the trunk is up but when I place a call to the voicemail ext I just get fast busy. A debug of my SIP messages on my Cisco router shows the call being sent to my freepbx system but I am getting 401 unauthorized. A SIP debug on the FreePBX system doesn’t return any messages so I assume the call isnt even getting to the FreePBX server. Please help! I have been stuck on this for days. If needed I will post my router config and SIP messages I am getting to pastebin. Thank you in advance.

The default settings on newer FreePBX systems have pjsip listening on port 5060 and chan_sip on port 5160. If you set up the trunk as chan_sip (as your linked instructions specify) but your CME is connecting to port 5060 (what happens if you don’t specify a port number in the ‘session target’), you will see the symptoms you described.

You can confirm this by typing
pjsip set logger on
at the Asterisk command prompt and making a test call. You’ll see pjsip attempting to authenticate the CME, failing and returning a 401.

To fix, you can either specify port 5160 in CME, e.g.
session target ipv4:11.100.64.248:5160
or set up a pjsip trunk instead, or change the bind port numbers in Asterisk SIP Settings so chan_sip listens on port 5060.

You are awesome. Doing a pjsip trace showed the 401. I set the port to 5160 on my CME router and it works now. Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.