Dial Plan issues - new user

Hi all, first-time poster here and also first time FreePBX user.

I’ve just set up FreePBX 15.0.16.78 and connected a Cisco SPA504g which get a dial tone.

I’ve set-up a Trunk which points towards Sipgate UK and is online, I’m having issues making and receiving calls which may be down to the dial plan, I will try and list out my configuration and trouble shouting below with the hope that it will help you help me resolve this issue.

I can see logs from outgoing calls but no logs incoming

Her goes

Trunk Configuration

Under General, I just have the trunk name Sipgate

Dial Number Manipulation
I have ‘X.’ without the ‘’

Sip Settings
Outgoing
fromuser=USER-ID
username=USER-ID
secret=PASSWORD
host=sipconnect.sipgate.co.uk
fromdomain=sipconnect.sipgate.co.uk
port=5060
type=peer
context=from-trunk
insecure=port,invite
canreinvite=no
registertimeout=600
dtmfmode=rfc2833
disallow=all
allow=alaw&ulaw&G729&GSM&G726

I can not post my logs as I’m being informed new users cant post links

Currently it is best to use PJSIP for SIP rather than the legacy chan_sip driver, especially for brand new installs.

I would recommend disabling chan_sip (Settings - Advanced Settings - set SIP driver to chan_pjsip only). Do this after you have removed your extension and trunk configurations that currently use chan_sip. Then create the configs again with PJSIP.

This may sound like a lot of work but it should be beneficial to you in the end, and this is the best time to do it–before you have set up a lot of trunks and extensions.

pjsip show history

No. Timestamp (Dir) Address SIP Message
===== ========== ============================== ===================================
00000 1605105383 * ==> 192.168.8.242:5060 OPTIONS sip:[email protected]:5060 SIP/2.0
00001 1605105383 * <== 192.168.8.242:5060 SIP/2.0 200 OK
00002 1605105388 * <== 192.168.8.242:5060 INVITE sip:[email protected] SIP/2.0
00003 1605105388 * ==> 192.168.8.242:5060 SIP/2.0 401 Unauthorized
00004 1605105388 * <== 192.168.8.242:5060 ACK sip:[email protected] SIP/2.0
00005 1605105388 * <== 192.168.8.242:5060 INVITE sip:[email protected] SIP/2.0
00006 1605105388 * ==> 192.168.8.242:5060 SIP/2.0 100 Trying
00007 1605105388 * ==> 192.168.8.242:5060 SIP/2.0 183 Session Progress
00008 1605105389 * <== 192.168.8.242:5060 CANCEL sip:[email protected] SIP/2.0
00009 1605105389 * ==> 192.168.8.242:5060 SIP/2.0 200 OK
00010 1605105389 * ==> 192.168.8.242:5060 SIP/2.0 487 Request Terminated
00011 1605105389 * <== 192.168.8.242:5060 ACK sip:[email protected] SIP/2.0

Thanks for the reply, I can confirm that I’m using PJSIP and getting these issues, I will try and post my debug logs.

Chet, the reason I commented that way is that you posted a chan_sip configuration for your trunk.

I will go through my configuration again.
Thanks

I will get back to you, I’ve hit a problem registering with PJSIP

OK I now have connected using PJSIP and getting the following when dialling out to 123

SIP/2.0 401 Unauthorized
SIP/2.0 501 Not Implemented
SIP/2.0 503 Service Unavailable

I still can’t post my debugs though because of being a new user

I’ve attached my dial plan from my phone

Thanks

Hopefully this screen grab will help

Nothing in your screen grab looks abnormal, except the 503 which it likely because sipgate rejected the call. I’m guessing that your sipgate trunk is using chan_sip so those transactions didn’t appear in pjsip history.

Please post a complete debug:
At the Asterisk command prompt, type
pjsip set logger on
sip set debug on
and make a failing test call. The regular Asterisk log will now include both pjsip and chan_sip traces, in addition to the normal entries. You can access it at Reports -> Asterisk Logfiles, or directly at /var/log/asterisk/full

Take the entire log for the call, redact as desired, paste it at pastebin.freepbx.org and post the link here.

Thanks please find the link to my log

UPDATED
https://pastebin.freepbx.org/view/d9cb53a2

What should a typical call look like coming into the PBX as I’m not seeing these either.

Outbound calls to 9123 failed because your Outbound Routes do not match that pattern.

Calls to 123 failed because the trunk settings need to include a From User setting with your sipgate username.

Inbound calls are failing because in Asterisk SIP Settings, External Address and Local Networks are not properly set. Restart Asterisk after changing these.

After fixing the above, if you still have trouble, post new logs.

Thanks, for your responses, I’ve quite a bit to learn with regards to this system, I’m going to carry out a clean install and move away from a VM and then build from the ground up again, hopefully, my next post will be to say it’s been successful.

Thanks

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