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

I have 12 port analog card, port 1-5 are for extensions, start from port number 6, it is for dial in. However, each time when I try to ring the port 6, I heard the asterisk telling me “The number you dialed is not in servie, please check your number and try again.” Where should I look to solve this? I have Zap Channel DID defined, but I am kind of confused, since the page saying "You MUST assign the channel’s context to from-zaptel for these settings to have effect. It will be a line that looks like:
context = from-zaptel"
My configuration for the card used from-pstn. How to fix this?

The The full log showed this:

[Jan 11 16:41:35] VERBOSE[17978] chan_dahdi.c: – Starting simple switch on ‘DAHDI/6-1’
[Jan 11 16:41:38] NOTICE[17978] chan_dahdi.c: Got event 18 (Ring Begin)…
[Jan 11 16:41:39] ERROR[17978] callerid.c: No start bit found in fsk data.
[Jan 11 16:41:39] WARNING[17978] chan_dahdi.c: CallerID feed failed: Success
[Jan 11 16:41:39] WARNING[17978] chan_dahdi.c: CallerID returned with error on channel ‘DAHDI/6-1’
[Jan 11 16:41:39] VERBOSE[17978] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, “No DID or CID Match”) in new stack
[Jan 11 16:41:39] VERBOSE[17978] pbx.c: – Executing [[email protected]:2] Answer(“DAHDI/6-1”, “”) in new stack
[Jan 11 16:41:39] VERBOSE[17978] pbx.c: – Executing [[email protected]:3] Wait(“DAHDI/6-1”, “2”) in new stack
[Jan 11 16:41:41] VERBOSE[17978] pbx.c: – Executing [[email protected]:4] Playback(“DAHDI/6-1”, “ss-noservice”) in new stack
[Jan 11 16:41:41] VERBOSE[17978] file.c: – <DAHDI/6-1> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[Jan 11 16:41:46] VERBOSE[17978] pbx.c: – Executing [[email protected]:5] SayAlpha(“DAHDI/6-1”, “”) in new stack
[Jan 11 16:41:46] VERBOSE[17978] pbx.c: – Executing [[email protected]:6] Hangup(“DAHDI/6-1”, “”) in new stack
[Jan 11 16:41:46] VERBOSE[17978] pbx.c: == Spawn extension (from-pstn, s, 6) exited non-zero on ‘DAHDI/6-1’
[Jan 11 16:41:46] VERBOSE[17978] pbx.c: – Executing [[email protected]:1] Hangup(“DAHDI/6-1”, “”) in new stack
[Jan 11 16:41:46] VERBOSE[17978] pbx.c: == Spawn extension (from-pstn, h, 1) exited non-zero on ‘DAHDI/6-1’
[Jan 11 16:41:46] VERBOSE[17978] chan_dahdi.c: – Hungup ‘DAHDI/6-1’

Do I need to start all over again? I thought zaptel is a name no longer used, so I assigned the inbond call port to from-pstn instead of from-zaptel. Thanks for your help!

I could try to delete the DAHDI configuration file and put a new file together. But not sure if the database would allow that. Am I the first ever running into this problem? If you know a solution, please help!

I found a posting saying “Use Tools / Config Edit to change zapata.conf and zapata-channels from context=from-pstn to context=from-zaptel”, but under the FreePBX 2.6, I don’t see “Config Edit” under tools at all. Where do I change this? Thanks for your help!

Should I just edit the file dahdi-channels.conf? Is there any consequences for editing that file only? Thanks!

Don’t start over. We’re in the transition from Zaptel drivers to Dahdi drivers. Basically due to copyright/licensing agreement, Digium had to change the name of the driver. Dahdi is the latest and greatest version. In FreePBX, it still may be referred to as Zaptel (Dahdi emulation or something like that).

If you really want to understand what’s going on, follow this guide on Testing Dahdi hardware. The short version is it runs through

  1. dmesg|more <= that shows if Linux recognizes your hardware

  2. dahdi_tool <= checks that the hardware works

  3. dahdi_genconf <= detects hw and generates a /etc/dahdi/system.conf file

  4. /etc/dahdi/system.conf <= config file that has your channels configured - common problem is that it sets the signaling to loopstart fxo_ls instead of fxo_ks which Asterisk expects

  5. Through FreePBX create your extensions

  6. /etc/asterisk/chan_dahdi_additional.conf <= this has the extension info, the channel number and signaling must match /etc/dahdi/system.conf

A good place to check to see if there is a mismatch is to look at /var/log/asterisk/full. It is the Asterisk status log. It is quite large, you can view it through the FreePBX Log interface or Webmin - File Manager or the Linux command line using a program like nano. After scrolling endlessly, look for the section where the dahdi drivers are loading the channels, there is usually clues as to why the channels didn’t load.

and I had tracked it down to my /etc/asterisk/users.conf file

be sure that at the bottom you specify something similar to (this is mine for user at extension 6910 :

[6910]
extension = 6910
fullname = 6910user
callerid=name of company
email = email address
secret = your password
dahdichan = 5 (if you use dahdi if not delete this line)
hasvoicemail = yes
vmsecret = voicemail password
hassip = no
hasiax = no
hash323 = no
hasmanager = no
context = from-internal
Callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1

when I have changed this I was able to make outbound calls and receive incoming calls. Hope this works for you.

Thanks, blanchae!

I know the hardware card is working, since phone extension on the FXS ports are all working, they can call out through SIP already. the FXO ports connecting to the PSTN is the only thing not working. I posted the full log in the first message in this thread. Which shows Asterisk noticed the ring on DAHDI/6-1 and the context is from-pstn.

What change do I need to make so that FreePBX will let me use from-pstn context for the incoming calls?

Thanks so much!
Joy

I found a thread talking about hand eidting the dahdi-channels.conf could make this work. So I did. However, it is still not working. Looking the full log, it shows even I edit dahdi-channels.conf from-pstn to from-zaptel, somewhere freepbx still referring to from-pstn…

[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, "Entering from-zaptel with DID == ") in new sta
ck
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:2] Ringing(“DAHDI/6-1”, “”) in new stack
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:3] Set(“DAHDI/6-1”, “DID=s”) in new stack
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:4] NoOp(“DAHDI/6-1”, “DID is now s”) in new stack
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:5] GotoIf(“DAHDI/6-1”, “0?zapok:notzap”) in new stack
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Goto (from-zaptel,s,6)
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:6] Goto(“DAHDI/6-1”, “from-pstn,s,1”) in new stack
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Goto (from-pstn,s,1)
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, “No DID or CID Match”) in new stack
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:2] Answer(“DAHDI/6-1”, “”) in new stack
[Jan 12 16:58:04] WARNING[10373] chan_dahdi.c: Unable to enable echo cancellation on channel 6 (No such device)
[Jan 12 16:58:04] VERBOSE[10373] pbx.c: – Executing [[email protected]:3] Wait(“DAHDI/6-1”, “2”) in new stack
[Jan 12 16:58:07] VERBOSE[10373] pbx.c: – Executing [[email protected]:4] Playback(“DAHDI/6-1”, “ss-noservice”) in new stack
[Jan 12 16:58:07] VERBOSE[10373] file.c: – <DAHDI/6-1> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[Jan 12 16:58:12] VERBOSE[10373] pbx.c: – Executing [[email protected]:5] SayAlpha(“DAHDI/6-1”, “”) in new stack
[Jan 12 16:58:12] VERBOSE[10373] pbx.c: – Executing [[email protected]:6] Hangup(“DAHDI/6-1”, “”) in new stack
[Jan 12 16:58:12] VERBOSE[10373] pbx.c: == Spawn extension (from-pstn, s, 6) exited non-zero on ‘DAHDI/6-1’
[Jan 12 16:58:12] VERBOSE[10373] pbx.c: – Executing [[email protected]:1] Hangup(“DAHDI/6-1”, “”) in new stack
[Jan 12 16:58:12] VERBOSE[10373] pbx.c: == Spawn extension (from-pstn, h, 1) exited non-zero on ‘DAHDI/6-1’
[Jan 12 16:58:12] VERBOSE[10373] chan_dahdi.c: – Hungup ‘DAHDI/6-1’

Here’s more info on creating an FXO trunk

Thanks so much for your kindly help. I did created FXO trunk, also created Zap channel DID and inbound route to IVR. But when called in on that line, I always got the message from asterisk “The number you dialed is not in service…” The full log below showing the board has passed that information to the Asterisk. But somehow the in from from-zaptel step 6, it switched to from-pstn, then there is no match in DID…

[Jan 14 12:00:42] VERBOSE[5254] chan_dahdi.c: – Starting simple switch on ‘DAHDI/6-1’
[Jan 14 12:00:44] NOTICE[5254] chan_dahdi.c: Got event 18 (Ring Begin)…
[Jan 14 12:00:45] ERROR[5254] callerid.c: No start bit found in fsk data.
[Jan 14 12:00:45] WARNING[5254] chan_dahdi.c: CallerID feed failed: Success
[Jan 14 12:00:45] WARNING[5254] chan_dahdi.c: CallerID returned with error on channel ‘DAHDI/6-1’
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, "Entering from-zaptel with DID == ") in new stac
k
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:2] Ringing(“DAHDI/6-1”, “”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:3] Set(“DAHDI/6-1”, “DID=s”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:4] NoOp(“DAHDI/6-1”, “DID is now s”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:5] GotoIf(“DAHDI/6-1”, “0?zapok:notzap”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Goto (from-zaptel,s,6)
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:6] Goto(“DAHDI/6-1”, “from-pstn,s,1”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Goto (from-pstn,s,1)
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, “No DID or CID Match”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:2] Answer(“DAHDI/6-1”, “”) in new stack
[Jan 14 12:00:45] VERBOSE[5254] pbx.c: – Executing [[email protected]:3] Wait(“DAHDI/6-1”, “2”) in new stack
[Jan 14 12:00:47] VERBOSE[5254] pbx.c: – Executing [[email protected]:4] Playback(“DAHDI/6-1”, “ss-noservice”) in new stack
[Jan 14 12:00:47] VERBOSE[5254] file.c: – <DAHDI/6-1> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[Jan 14 12:00:52] VERBOSE[5254] pbx.c: – Executing [[email protected]:5] SayAlpha(“DAHDI/6-1”, “”) in new stack
[Jan 14 12:00:52] VERBOSE[5254] pbx.c: – Executing [[email protected]:6] Hangup(“DAHDI/6-1”, “”) in new stack
[Jan 14 12:00:52] VERBOSE[5254] pbx.c: == Spawn extension (from-pstn, s, 6) exited non-zero on ‘DAHDI/6-1’
[Jan 14 12:00:52] VERBOSE[5254] pbx.c: – Executing [[email protected]:1] Hangup(“DAHDI/6-1”, “”) in new stack
[Jan 14 12:00:52] VERBOSE[5254] pbx.c: == Spawn extension (from-pstn, h, 1) exited non-zero on ‘DAHDI/6-1’
[Jan 14 12:00:52] VERBOSE[5254] chan_dahdi.c: – Hungup ‘DAHDI/6-1’

Post /etc/dahdi/system.conf, /etc/asterisk/chan_dahdi.conf, /etc/asterisk/chan_dahdi_additional.conf and /etc/asterisk/chan_dahdi_custom.conf. I don’t care for dahdi_channels.conf because it puts junk in that can conflict with what FreePBX configures.

/etc/dahdi/system.conf:

fxoks=1
echocanceller=oslec,1
fxoks=2
echocanceller=oslec,2
fxoks=3
echocanceller=oslec,3
fxoks=4
echocanceller=oslec,4
fxoks=5
echocanceller=oslec,5
fxsks=6
echocanceller=oslec,6
fxsks=7
echocanceller=oslec,7
fxsks=8
echocanceller=oslec,8
fxsks=9
echocanceller=oslec,9
fxsks=10
echocanceller=oslec,10
fxsks=11
echocanceller=oslec,11
fxsks=12
echocanceller=oslec,12

Global data

loadzone = us
defaultzone = us

/etc/asterisk/chan_dahdi.conf:

[trunkgroups]
[channels]
rxwink=300
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
group=1
callgroup=2
pickupgroup=1
group=1
signalling=fxo_ks
context=from-internal
;callerid=“David”<(123) 456-0901>
channel => 1
;callerid=“John”<(123) 456-0901>
channel => 2
;callerid=“Joy”<(123) 456-0901>
channel => 3
;callerid=“Margaret”<(123) 456-0901>
channel => 4
;callerid=“DDe”<(123) 456-0901>
channel => 5
group=2
signalling=fxs_ks
context=from-zaptel
channel => 6-8
callerid=asreceived
group=3
signalling=fxs_ks
context=from-zaptel
channel => 9
callerid=asreceived
group=0
signalling=fxs_ks
context=from-zaptel
channel => 10
channel => 11
callerid=asreceived
group=4
signalling=fxs_ks
context=from-zaptel
channel => 12
callerid=asreceived

/etc/asterisk/chan_dahdi_additional.conf :
not exist

/etc/asterisk/chan_dahdi_custom.conf:
not exist

port 6-8 currently are for PSTN lines to call in. port 9-12 are for connecting to other incoming phone adapter (they generates ring tones for incoming call but can not call out). I dailed on port 6, 7, and 8, got the same message.

Look at creating an inbound route for the channel. If you have done already, post the details.

Normally, it consists of just the following with includes to link to the other conf files:

You may have to add #include chan_dahdi_custom.conf

chan_dahdi_additional.conf is created by FreePBX when you create FXS extensions. Here’s what extension 1001 would look like:

chan_dahdi_custom.conf is created manually by you and contains your FXO trunks. Here’s what one would look like configured for FXO channel 5:

The following is an excerpt from Ben Sharif’s excellent book called PBX in a Flash without Tears. It uses and documents FreePBX extensively.

Lastly you must create an inbound route based on the Zap DID so that Asterisk knows what to do with the call.

The inbound route: (number edited to not show real but format is exact)
Description: 1234560901
DID Number: 1234560901
Caller ID Number: 1234560901
CID Priority Route: unchecked
Signal RINGING: checked
Privacy Manager: NO
FAX Extension: Disabled
CID lookup source: none
Set Destination IVR: Business hour

However, I don’t have chan_dahdi_additional.conf and chan_dahdi_custom.conf file. The analog extensions on FXS ports are working fine to call each other or call out through SIP line. After reading the post from you, I added those two conf files in, try to make change to extensions on the FXS channels through FreePBX 2.6, saved and applied the changes, nothing was written to those manually added chan_dahdi_additional or custom conf files. Why not?

My original installation was using 2.6rc1 when I started. Now it through module update already updated to version 2.6.01-03. Should I go back to use V2.4 to reinstall then move up to the updated version? Something is missing, but I don’t know which.

My understanding is the FXO channel talking to chan_dahdi logic through the channel number. chan_dahdi talks to asterisk through the from-zaptel context and matching DID. Then matching DID will trigger the proper inbound route. In the specified route, it will then trigger the IVR or timed IVR. In the full log, it seems in my setup, somehow the from-zaptel context switch somehow did not lead to the proper inbound route, then it trys to connect to from-pstn.

Please help me to clear up this, your help is greatly appreciated!

The only thing I can think of is to change from-zaptel to from-pstn

Thanks Blanchae! It was not working with from-pstn. That was why I started change from-pstn to from-zaptel then ran the dahdi-genconf. Why does not my FreePBX have the two additional conf file for the chan_dahdi.conf? If FreePBX create the additional.conf file, how come it did not create it for me(and the extensions are working)?

dahdi_genconf creates the file /etc/asterisk/dahdi_channels.conf, how about you make an include in chan_dahdi.conf that includes it? Add the following line:

#include dahdi_channels.conf

I have added following two lines in chan_dahdi.conf file already, but freepbx does not write to them:

#include chan_dahdi_additional.conf
#include chan_dahdi_custom.conf

I tried add the line you recommend in the chan_dahdi.conf, now it is not even do anything. I looked the log file, nothing being added to the log file with that file included :frowning: