FreeBPX Glitch? Or is it human error? Dialplan issues

ok… could someone take the time to explain to me how the dialplan rules work?

Its getting to be a real pain in the .

Ok… I understand that in order to dial out you need a 9… and to ignore that 9 once your out… requires a switch of sorts that tells asterisk to ignore the first digit on the left.

Example… in freePBX it’s this:

9|NXXXXXX

For Long distance its

9|1NXXNXXXXXX

Now… heres my problem… and again… im using Free PBX…

I want to be able to dial long distance and local at will… using free PBX to set it up.

right now we have 1 line… for testing purposes… soon to be expanded into 2.

Now when the rules are arranged like this in FreePBX

9|1NXXNXXXXXX
9|NXXXXXX

the long distance portion works…but the local one does not.

when its arranged like this

9|NXXXXXX
9|1NXXNXXXXXX

They both work…

But the above is only done if it’s HARDCODED into the configuration file (additional_extensions.conf)… free PBX always puts it in this order… wether I like it or not.

9|1NXXNXXXXXX
9|NXXXXXX

And messes up the stupid configuration file when and IF i change settings.

This isn’t going to help me much… surely theres a solution?

Is it just a matter of how I set up the outbound rules? Or is it a FreePBX glitch…

I’ve been trying to decode the configuraiton files just to figure out what in the heck its doing that would make it do that… I thought it wouldn’t matter WHAT order it is in.

Im just a tad bit confused.

Any suggestions?

Better yet… how would YOU set it up so you can dial out with 9 to call local and longdistance.

one rule for each? (didn’t work for me…) or all in one?

i wouldn’t bother with the 9 in the first place ! or FreePBX for that matter :smiley:

it shouldn’t make any difference as Asterisk should match the best pattern. if it’s a bug perhaps create 2 outbound routes, each with it’s own dialling rules ?

HEh… well… unfortiantely the 9 is a nesscary “evil” at best.

I tried making seperate routes… but it didn’t work…at least as far as I can tell.

Is the outbound dialroutes order specific??

can you paste the context that contains this “route” here ?

sure…

[outrt-001-main1]
include => outrt-001-main1-custom
exten => _91NXXNXXXXXX,1,Macro(dialout-trunk,1,${EXTEN:1},,)
exten => _91NXXNXXXXXX,n,Macro(outbusy,)
exten => _9NXXXXXX,1,Macro(dialout-trunk,1,${EXTEN:1},,)
exten => _9NXXXXXX,n,Macro(outbusy,)

Comments:

the included file (outrt-001-main1-custom) is blank… or context…

In its current order… this does not work…and was generated by freePBX.

If the order was swapped… local first… longdistance last… it would work… have no idea why.

If the routes were seperated… it dosen’t work.

I even told FreePBX to have local on the top of the list and londistance on the bottom in that specific order… and it put it back… that dosen’t make sense at all.

Oh… and in addition… when I dial long distance in this format…

It turncates the last 3 or so digits.

discovered Anaheim has a 503 prefix… go figure…heh.

Was trying to dial an out of state number (IE: Oregon ; O ) ) from Anahiem…

You’d think the patteren matching would work.

:unamused:

nudge

Still waiting for assistance.

poke

: O P

Still could use some help… perhaps a basic Dialplan how too for Free PBX?

Want to make long distance <anywhere > and local calls with dialing 9 to get out on ONE line.

If this isn’t something thats possible… then why is it doable when I manually config the code.

honestly, most of the guys here don’t use FreePBX, so you might have better luck on their forums if you are going to stick with that particular product.

as far as a basic dialout sequence, here you go. note that all of these are using zap groups instead of individual trunk numbers - feel free to change.

exten => _91NXXNXXXXXX,1,Dial(Zap/g1/${EXTEN:1}) ; long distance
exten => _9NXXNXXXXXX,1,Dial(Zap/g1/${EXTEN:1}) ; 10 digit
exten => _9NXXXXXX,1,Dial(Zap/g1/{$EXTEN:1}) ; 7 digit

this is exactly what i use on our production servers - works like a charm.

again, if you want/need to use FreePBX, realize that it uses a very specific set of config files to work - it’s using Asterisk, true, but the configs are not something that are supposed to be world-editable. if you want to get the most out of asterisk (and want us to be able to help) then ditching FreePBX is probably your best bet…

that’s my $0.02, anyway.

this should just work. i used freepbx, and what i do is have a separate outbound route for each specific requirement. e.g. a route called “emergency” which matches on 911 and goes to the appropriate trunk. then one for information, that matches on 311 or 411 and etc… don’t have my configs here, but i have 7/10/11 digit dialing working by having the 7-digit rule prepend 1508 (508 being my area code), 10-digit prepending 1, and 11-digit not altering it.

Heres the kicker… in that specific order… is how freePBX does it… as far as who goes first when you program the outbound numbers.

And it dosen’t work propperly.

So whats different about your setup in comparsion to mine?

Is it using multipule lines under that group?

AH… finally… : O )

OK… so when you say prepend… you mean that when you have a 7 digit number say like

NXXXXXX <== that… you have it append the area code?

And when its long distance IE: NXXNXXXX instead of matching a patteren you just add a 1?

Ok now im really confused…

I decided to try what the guy suggested up there

At one point I just tossed it in the outbound rules… didn’t work… then I tried just going to the trunk dialing rules…

Called a local number… without area code… worked.

Called a out of state number … worked.

Caleld a 2ND out of state number to the SAME previous state but in a different prefix… and ended up back in my own area code (wrong number is the result).

What the heck just happened?

O_o

Are you putting these routing rules in under Trunks or Outbound Routes? If you are using Trunks, try putting it in Outbound Routes.

I put them seperatly in outbound routes…

Now I can reach one number but not the other… in Oregon that is…

can you post what the specific outbound rules are?

coming right up…

[outrt-001-main]
include => outrt-001-main-custom
exten => _91NXXNXXXXXX,1,Macro(dialout-trunk,1,${EXTEN:1},,)
exten => _91NXXNXXXXXX,n,Macro(outisbusy,)
exten => _9NXXXXXX,1,Macro(dialout-trunk,1,${EXTEN:1},,)
exten => _9NXXXXXX,n,Macro(outisbusy,)

Free PBX genereated the above code…

BTW… I got yet an another riddle.

Restarted server to do a quick HD data pull from a laptop drive…

Dialed my cell once… twice… both times failed… third time… worked.

had to use area code to do it too… weird.

sorry, what i meant was: what do the rules look like in freepbx? and what order are the rules?

p.s. i know you can’t (?) post a screenshot, but post the contents of the dial rules for each outbound route…

Sorry bout that…

Here’s how its set up in the GUI side

Route Name: main
Route Password:
Emergency Dialing: off

Dial Patterens:

9|1NXXNXXXXXX
9|NXXXXXX

Trunk Sequence:
ZAP/g0

Now the log book records the trunk receiveing the correct number sequence being dialed…

Still totaly in the dark as to the recurring results.

Ok… UPDATE…

1: It seems… and thats a big “SORT OF” seems… to be working.

Sometimes it does it right… sometimes it dosen’t.

2: I think I should mention that the majority of the phone calls made/recieved are done via Soft Phones thorugh SIP protocal…

I have a possible idea that perhaps in light of this… that it could be perhaps dialing too fast?

Any suggestions,comments, interests, hobbies? :smile: