SOLVED: New PRI: Inbound calls OK, Can’t call out

Our PRI was just turned up this morning and my joy at being able to receive my first inbound test call was dashed when I was unable to make any outbound test calls. I’ve read through the Trunks and Outbound Routes module wiki and think I have things setup properly but I’m sure I’ve missed something critical.

Hardware and FreePBX Version Info:

Dell PowerEdge 2950 III, Dual Xeon QC 2.6 GHz, 16GB Ram, 300GB SAS RAID1
Sangoma A101DE PCIe T1 Card
FreePBX 12.0.53 / Asterisk 13.2.0

Dahdi Config:

Framing/Coding: EFS/B 8ZS
Channels 23/24 (T1)
Signalling: PRI - CPE
Switchtype: National ISDN 2 (default)
Sync/Clock Source: 0
Line Build Out: 0 db
PRI Dialplan: National
PRI Local Dialplan: National
PRI Exclusive: (nothing selected from dropdown list)
Receive Gain: 0.0
Transmit Gain: 0.0

Group: 0
Context: from-digital
Used Channels: 23

Trunk (dahdi):

Trunk Name: Main PRI
Outbound CallerID: “NLG” <7812752500>
CID Options: Allow Any CIC
Maximum Channels: (blank)
Asterisk Trunk Dial Options: (default selection Tt) - unchecked
Continue if Busy: (unchecked)
Disable Trunk: (unchecked)

Dial Number Manipulation Rules:

No entries added

Outgoing Settings:

DAHDI Trunks: Group 0 Round Robin Ascending

Outbound Route:

Route Name: USALocalAndLongDistance
Route CID: “NLG” <7812752510>
Override Extension: unchecked
Route Password: (blank)
Route Type: (all unchecked)
Music on Hold: default
Time Group: —Permanent Route—
Route Position: —No Change— (currently 1st route in list on right side of page)

Additional Settings:

Call Recording: Don’t Care

  • Extension Routing: Standard Mode
    Notification: None
    PIN Set: None

Dial Patterns that will use this Route:

1NXXNXXXXXX
NXXNXXXXXX
NXXXXXX

Tunk Sequence for Matched Routes:
Main PRI

Optional Destination on Congestion:
Normal Congestion

Here’s what I’m seeing on the console when I try making an outbound call to:
7812752500

BedfordPBXCLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/3010-0000003a”, “user-callerid,LIMIT”) in new stack
– Executing [[email protected]:1] Set(“SIP/3010-0000003a”, “TOUCH_MONITOR=1429032387.22766”) in new stack
– Executing [[email protected]:2] Set(“SIP/3010-0000003a”, “AMPUSER=3010”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/3010-0000003a”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/3010-0000003a”, “1?Set(REALCALLERIDNUM=3010)”) in new stack
– Executing [[email protected]:5] Set(“SIP/3010-0000003a”, “AMPUSER=3010”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/3010-0000003a”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/3010-0000003a”, “AMPUSERCIDNAME=Receptionist”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/3010-0000003a”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/3010-0000003a”, “AMPUSERCID=3010”) in new stack
– Executing [[email protected]:10] Set(“SIP/3010-0000003a”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/3010-0000003a”, “CALLERID(all)=“Receptionist” <3010>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/3010-0000003a”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/3010-0000003a”, “1?Set(GROUP(concurrency_limit)=3010)”) in new stack
– Executing [[email protected]:14] GosubIf(“SIP/3010-0000003a”, “7?sub-ccss,s,1(from-internal,7812752500)”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/3010-0000003a”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“SIP/3010-0000003a”, “CCSS_SETUP=TRUE”) in new stack
– Executing [[email protected]:3] GosubIf(“SIP/3010-0000003a”, “0?monitor_config,1(from-internal,7812752500):monitor_default,1(from-internal,7812752500)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/3010-0000003a”, “0?is_exten”) in new stack
– Executing [[email protected]:2] StackPop(“SIP/3010-0000003a”, “”) in new stack
– Executing [[email protected]:3] Return(“SIP/3010-0000003a”, “FALSE”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/3010-0000003a”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:16] GotoIf(“SIP/3010-0000003a”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [[email protected]:30] Set(“SIP/3010-0000003a”, “CALLERID(number)=3010”) in new stack
– Executing [[email protected]:31] Set(“SIP/3010-0000003a”, “CALLERID(name)=Receptionist”) in new stack
– Executing [[email protected]:32] Set(“SIP/3010-0000003a”, “CDR(cnum)=3010”) in new stack
– Executing [[email protected]:33] Set(“SIP/3010-0000003a”, “CDR(cnam)=Receptionist”) in new stack
– Executing [[email protected]:34] Set(“SIP/3010-0000003a”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Set(“SIP/3010-0000003a”, “ROUTEUSER=3010”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/3010-0000003a”, “1?restrictedroute-0,7812752500,2:outbound-allroutes,7812752500,2”) in new stack
– Goto (restrictedroute-0,7812752500,2)
[2015-04-14 13:26:27] WARNING[16867][C-00000830]: pbx.c:6510 __ast_pbx_run: Channel ‘SIP/3010-0000003a’ sent to invalid extension but no invalid handler: context,exten,priority=restrictedroute-0,7812752500,2
BedfordPBX
CLI>

And to 17812752500

BedfordPBXCLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/3010-0000002e”, “user-callerid,LIMIT”) in new stack
– Executing [[email protected]:1] Set(“SIP/3010-0000002e”, “TOUCH_MONITOR=1429031898.22602”) in new stack
– Executing [[email protected]:2] Set(“SIP/3010-0000002e”, “AMPUSER=3010”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/3010-0000002e”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/3010-0000002e”, “1?Set(REALCALLERIDNUM=3010)”) in new stack
– Executing [[email protected]:5] Set(“SIP/3010-0000002e”, “AMPUSER=3010”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/3010-0000002e”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/3010-0000002e”, “AMPUSERCIDNAME=Receptionist”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/3010-0000002e”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/3010-0000002e”, “AMPUSERCID=3010”) in new stack
– Executing [[email protected]:10] Set(“SIP/3010-0000002e”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/3010-0000002e”, “CALLERID(all)=“Receptionist” <3010>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/3010-0000002e”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/3010-0000002e”, “1?Set(GROUP(concurrency_limit)=3010)”) in new stack
– Executing [[email protected]:14] GosubIf(“SIP/3010-0000002e”, “7?sub-ccss,s,1(from-internal,17812752500)”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/3010-0000002e”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“SIP/3010-0000002e”, “CCSS_SETUP=TRUE”) in new stack
– Executing [[email protected]:3] GosubIf(“SIP/3010-0000002e”, “0?monitor_config,1(from-internal,17812752500):monitor_default,1(from-internal,17812752500)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/3010-0000002e”, “0?is_exten”) in new stack
– Executing [[email protected]:2] StackPop(“SIP/3010-0000002e”, “”) in new stack
– Executing [[email protected]:3] Return(“SIP/3010-0000002e”, “FALSE”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/3010-0000002e”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:16] GotoIf(“SIP/3010-0000002e”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [[email protected]:30] Set(“SIP/3010-0000002e”, “CALLERID(number)=3010”) in new stack
– Executing [[email protected]:31] Set(“SIP/3010-0000002e”, “CALLERID(name)=Receptionist”) in new stack
– Executing [[email protected]:32] Set(“SIP/3010-0000002e”, “CDR(cnum)=3010”) in new stack
– Executing [[email protected]:33] Set(“SIP/3010-0000002e”, “CDR(cnam)=Receptionist”) in new stack
– Executing [[email protected]:34] Set(“SIP/3010-0000002e”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Set(“SIP/3010-0000002e”, “ROUTEUSER=3010”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/3010-0000002e”, “1?restrictedroute-0,17812752500,2:outbound-allroutes,17812752500,2”) in new stack
– Goto (restrictedroute-0,17812752500,2)
[2015-04-14 13:18:18] WARNING[16483][C-0000081b]: pbx.c:6510 __ast_pbx_run: Channel ‘SIP/3010-0000002e’ sent to invalid extension but no invalid handler: context,exten,priority=restrictedroute-0,17812752500,2
BedfordPBX
CLI>

Am I reading this correctly that Asterisk did not find a route and therefore considers the number dialed a “restrictedroute”?

Have I missed anything obvious?

Thanks – Steve

Not quite, it is not Asterisk but your setup of FreePBX , you have module(s) that now apparently route calls incorrectly through restrictedroute I believe they are in the “commercial” category.

Good call–thanks. The “Allowed Extensions” setting is collapsed by default. Once expanded, lo and behold, every single one of my extensions is in the blocked list. Pretty interesting since I didn’t even know, need, or want this functionality. It just happened to be bundled with the “System Builder Basic” commercial module, and I certainly didn’t add these extensions to the block list myself.

So questions is: Why do extensions get added to the block list be default and is this is by design, why on earth is the default display behavior of the “Allowed Extensions” setting collapsed? This one cost me hours of screwing with my outbound route and trunk settings convinced that I had royally screwed something up.

Thanks – Steve

You would have to ask the publishers of those modules, I don’t use them.

OK, here’s some info that might shed some light as to why this happened and will hopefully help others who wander into this issue.

I originally created my extensions by adding a single extension manually using the Extensions module. Next I used the Bulk Extensions module to export my single extension to a csv file. I added the remaining extensions to the csv using Excel.

My Excel workbook has formulas that generate a random guid for the sip secret, references to the extension number and name information in multiple fields, formulas that build composite information from multiple cells, and cells that are prepopulated with defaults. The end result is that I need add only a couple of bits of information such as extension number, name, and email address–the rest is filled in automatically. When I’m done, I simply save as a csv and import into FreePBX using the Bulk Extensions module. Overall, very convenient, very fast and super simple to use.

The problem; the Bulk Extensions import / export mechanism has no fields for “Allowed Routes” so all routes end up disabled when the csv is imported to add or edit existing extensions.

This is unfortunate since it means that a not so obvious additional step is required. After a bulk import: you need to do one of the following:

  1. Manually touch each extension in the Extension module and check the desired routes and save the changes

  2. Edit each outbound route and remove every extension in the Additional Settings>Extension Routing>Blocked Extensions list.

That would only be in play if you bought Extension Routes Module.
It has caught me out as well before :slight_smile:

Yup it’s the Extension Routes module. To add to my confusion, I didn’t buy the module explicitly, it’s bundled in the System Builder Basic commercial bundle; a fact that I overlooked because it wasn’t of interest to me. I may disable it to see if this prevents this from happening in the future.

That will work. Can be a bit of a “Got ya” but I cannot think of a better way of introducing Extension Route Module. Default needs to be either all allowed or all disallowed. In this case Schmooze has gone down the more security conscious path and said all disallowed unless explicitly allowed.

Agreed that it would be difficult to handle enabling/disabling individual routes in Bulk Extension import/export. But maybe an “enable_all_routes” yes/no field in the bulk extension csv would be helpful.