Why does Dialplan 1 work but not Dialplan 2?

I wanted to give the fantastic Stewart a break if possible and see if anyone else had any ideas on a problem I’m having.

So I’ve got a Linksys SPA3000 hooked up to FreePBX. The FXO port is hooked up to my BT PSTN connection. Nothing else in between like a legacy PBX. Nor am I in an office or similar. It’s a domestic setting.

When I use dialplan:
X.
I can dial out to the PSTN just fine and life feels great.

When I put in place Stewart’s dialplan of:
(999S0|1[1-3]x|1[45]xx|08001111|0845464x|0[58]00xxxxxx|01[2-9][02-9]xxxxxx|0[1-9]xxxxxxxxx|[2-9]xxxxx|00xxxxxxxx.)
I just get a voice reply (from Asterisk, I think, not the Linksys ATA) saying my call cannot be completed as dialled.

Any ideas why this might be? I’ve tried all sorts of combinations and variations of numbers and none of them work. When I use the dialplan tester - the numbers which do not work anymore give every indication they should work.

Arrr!!!?? :slight_smile: :slight_smile: Some obscure setting I’m missing? Should I do a complete reboot of Asterisk?!
Weirdly if I put BACK the original X. dialplan it all starts working again.

Lost.

Thank you!!

I doubt this assessment is correct.

Your dial plan is implemented in the ATA, so changing the dial plan is going to force the ATA to accept or reject a call. You can validate this by looking in the /var/log/asterisk/full log file and make sure the message isn’t coming from Asterisk. There’s no place in FreePBX to implement this dialplan.

On the Asterisk side, you need to set up for outbound route and trunk (if you’re using one) to make sure the numbers sent to the ATA are formatted so that they a acceptable to the ATA. As with the message, you can check your work in the /var/log/asterisk/full log file. You should see the number you are sending being processed through the trunk and outbound route, then sent to the ATA.

1 Like

Ahhhhh so I’ve fundamentally misunderstood WHERE I need to put the dialplan Stewart provided?? I don’t put it HERE:-

I put it HERE:-

108722-spa3000-configuration-08

Ignore the actual dialplans in those two images above, I just used them as generic images, they’re not mine.

If so…d’oh!!! No wonder things were getting weird!!!

This dialplan was intended for an ATA (or IP phone), so it would know when a number has been completely entered and send the call to Asterisk. On the PBX side, you shouldn’t have to change your outbound routes until you decide how to handle CNet or you get a commercial VoIP service.

For the specific case of the SPA3K, you would modify it to send emergency calls directly to the PSTN port, as well as sending * codes to Asterisk, perhaps something like:

(999<:@gw0>S0|112<:@gw0>S0|1[1-3]x|1[45]xx|08001111|0845464x|0[58]00xxxxxx|01[2-9][02-9]xxxxxx|0[1-9]xxxxxxxxx|[2-9]xxxxx|00xxxxxxxx.|*x.)

1 Like

Thank you! And sorry for being so stupid. This must seem elementary to you guys. You know, I did wonder why there was duplication of the 999 handling but I just assumed it appearing again in the dialplan I THOUGHT was destined for Freepbx was a backup!
Thanks!

Arrr I’m SO sorry I thought we had this cracked.

If I leave the dialplan on the SPA3000 as this: > (999<:@gw0>|x.|*x.), then when I go to place a call on the test phone connected to the SPA3000, I hear ONE set of DTMF tones and the call is connected. I can communicate with the person I’ve called. There’s activity in the Asterisk console and the call appears in the records on the FreePBX GUI.

If I change the dialplan on the SPA3000 to this:> > (999<:@gw0>S0|112<:@gw0>S0|1[1-3]x|1[45]xx|08001111|0845464x|0[58]00xxxxxx|01[2-9][02-9]xxxxxx|0[1-9]xxxxxxxxx|[2-9]xxxxx|00xxxxxxxx.|*x.), the DTMF tones are seemingly stored up and then repeated in one go down the line, and then there’s just silence. The call never connects, I don’t hear anything etc. But there’s still activity on the Asterisk console and the call is still logged in the FreePBX GUI.

Help please?! (Getting a bit disheartened here). Thank you!

Does anyone know if there’s a Discord server (or similar!) where there are some similarly amazing folks willing to help me debug? You guys are amazing but I think we’re on different a timezone! :slight_smile:
My time to try to crack this is 2000-2200 GMT daily.

At the moment when I dial a number I can hear loads of DTMF tones being rattled off reallly reallly faintly, and then I get an error message from the PSTN like “Sorry, there is a fault” or just a “beep code”. Yet when I look at the call records in the GUI, there’s no hint of all those DTMF tones, it just shows the number I tried to dial! Confused. Thank you

If you don’t now anyone in Brampton then

0NXXXXXXXX

is all you need for most calls, add international (001[34]XXXXX. for Europe only as an example) and the short-codes 911/112 etc. if appropriate.

Sorry, but these numbers are incorrect. Most UK landline numbers begin with 01, which 0N would not match. Only five 02x area codes are presently in use. The international prefix is 00, not 001. Emergency is 999 and 112; 911 is not used. Also, local numbers can be dialed without the initial 0 and area code.

@dan_ce , I don’t understand what you are hearing. On a corded phone, you go off hook, hear dial tone from the ATA, which accepts the digits you dial and sends the call to Asterisk. Asterisk then sends the call to the FXO section, which takes the landline off hook and sends the number via DTMF. Normally, you wouldn’t hear those tones but it’s possible that you’ll hear them faintly because of electrical crosstalk in the device or your home wiring.

With a cordless phone, it is usually possible to first press Talk, hear dial tone from the ATA and proceed same as with corded. But you can also enter the number first (it’s stored in the handset) and then press talk, which causes the phone to go off hook and send the DTMF sequence to the ATA, usually quite audibly.

To troubleshoot, see whether the Asterisk log correctly shows the complete number that you dialed. Don’t post a big log here. Instead, paste it at pastebin.freepbx.org and post the link.

BTW, I’m presently in California (UTC -7 summer time).

Sorry. my typo, 0NXXXXXXXX should have been 0ZXXXXXXXX .

Pedantically (but only currently), that could unneccesarily be 0[1-3,5,7-9]XXXXXXXX

00 as a prefix is almost universal outside NANP for international calls , 00[34]. for Europe, 005. South america, 007. the Russian block the others as per . 009 for intelsat and other strange stuff.

But almost all UK numbers are (as I linked ) ten digits starting with 0 (UK and most of the rest of the world) expect a 00 to prepend national calls.

On your cell phone dial + as the meta-code which will replace 00 (most everywhere) or 1 for NANPland, it is designed to work everywhere :wink:

As a good authority , start with :-

Either which way, you need to adjust your dialplan to not only suit your users expectations as to how to use a phone and equally be prepared to adjust translations to suit the not necessarily localized carrier services.

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