Dial Plan issues - new user


(United Kingdom) #1

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


#2

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.


(United Kingdom) #3

pjsip show history

No. Timestamp (Dir) Address SIP Message
===== ========== ============================== ===================================
00000 1605105383 * ==> 192.168.8.242:5060 OPTIONS sip:1000@192.168.8.242: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:9123@192.168.5.38 SIP/2.0
00003 1605105388 * ==> 192.168.8.242:5060 SIP/2.0 401 Unauthorized
00004 1605105388 * <== 192.168.8.242:5060 ACK sip:9123@192.168.5.38 SIP/2.0
00005 1605105388 * <== 192.168.8.242:5060 INVITE sip:9123@192.168.5.38 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:9123@192.168.5.38 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:9123@192.168.5.38 SIP/2.0


(United Kingdom) #4

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


#5

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


(United Kingdom) #6

I will go through my configuration again.
Thanks


(United Kingdom) #7

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


(United Kingdom) #8

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


(United Kingdom) #9

Hopefully this screen grab will help


#10

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.


(United Kingdom) #11

Thanks please find the link to my log

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


(United Kingdom) #12

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


#13

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.


(United Kingdom) #14

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