The number you dialed is not in service, please check your number and try again

That should be the file the dahdi_genconf generates. Put those in chan_dahdi.conf.

This thread appears to be trying to solve a few things at once. At minimum it’s a single problem and this thread is discussing several symptoms.

I am running FreePBX 2.5.2.2 on top of Asterisk 1.6.2.5. I have followed all the instructions posted and still I cannot get inbound routing to work. ‘Zap Channel DIDs’ isn’t working for me.

My post here is not an attempt to resolve the issue in a desired way, meaning using the menus of FreePBX rather than hack the config files. Instead I am putting a little workaround I have found that allows me to route an inbound POTS call to a specific extension. This workaround only functions if you have one inbound DID per channel, i.e. no distinctive ring issues with multiple lines per channel.

I have a TDM800p with a FXO module. I want a call coming in on channel 8 (DID 666-555-1212) to route to extension 123 internally. I added this to extensions_custom.conf.

I hope this at least plugs the hole for a bit.

[from-pstn-custom]
exten => s,1,ExecIf($[ “${CHANNEL}” = “DAHDI/8-1” ] ?Goto(from-did-direct,123,1)) ; 666-555-1212 => x.123