Help needed with iinbound routes

I have a ZAP line and have set up a ZAP Channel DID. However, when I ring into the PBX it says it is not in service. It works fine if I setup an inbound route with no DID. The log says No DID or CID Match. It didn’t seem too tough to setup a ZAP Channel DID - just put in the channel number and a DID - but somehow I screwed it up?

[2012-07-18 20:40:57] VERBOSE[7987] logger.c: – Executing [[email protected]:1] NoOp(“Zap/3-1”, “No DID or CID Match”) in new stack
[2012-07-18 20:40:57] VERBOSE[7987] logger.c: – Executing [[email protected]:2] Answer(“Zap/3-1”, “”) in new stack
[2012-07-18 20:40:57] DEBUG[7987] chan_zap.c: Took Zap/3-1 off hook
[2012-07-18 20:40:57] DEBUG[7987] chan_zap.c: Engaged echo training on channel 3
[2012-07-18 20:40:57] VERBOSE[7987] logger.c: – Executing [[email protected]:3] Wait(“Zap/3-1”, “2”) in new stack
[2012-07-18 20:40:59] VERBOSE[7987] logger.c: – Executing [[email protected]:4] Playback(“Zap/3-1”, “ss-noservice”) in new stack
[2012-07-18 20:40:59] VERBOSE[7987] logger.c: – <Zap/3-1> Playing ‘ss-noservice’ (language ‘en’)
[2012-07-18 20:41:02] VERBOSE[7995] logger.c: == Parsing ‘/etc/asterisk/manager.conf’: [2012-07-18 20:41:02] VERBOSE[7995] logger.c: Found
[2012-07-18 20:41:02] VERBOSE[7995] logger.c: == Parsing ‘/etc/asterisk/manager_additional.conf’: [2012-07-18 20:41:02] VERBOSE[7995] logger.c: Found
[2012-07-18 20:41:02] VERBOSE[7995] logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: [2012-07-18 20:41:02] VERBOSE[7995] logger.c: Found
[2012-07-18 20:41:02] WARNING[7995] manager.c: Invalid writetimeout value ‘’ at line 10
[2012-07-18 20:41:02] VERBOSE[7995] logger.c: == Manager ‘admin’ logged on from 127.0.0.1
[2012-07-18 20:41:04] VERBOSE[7995] logger.c: == Manager ‘admin’ logged off from 127.0.0.1
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:5] SayAlpha(“Zap/3-1”, “”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:6] Hangup(“Zap/3-1”, “”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: == Spawn extension (from-pstn, s, 6) exited non-zero on ‘Zap/3-1’
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:1] Macro(“Zap/3-1”, “hangupcall|”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:1] GotoIf(“Zap/3-1”, “1?skiprg”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Goto (macro-hangupcall,s,3)
[2012-07-18 20:41:04] DEBUG[7987] app_macro.c: Executed application: GotoIf
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:3] GotoIf(“Zap/3-1”, “1?skipblkvm”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Goto (macro-hangupcall,s,5)
[2012-07-18 20:41:04] DEBUG[7987] app_macro.c: Executed application: GotoIf
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:5] GotoIf(“Zap/3-1”, “1?theend”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Goto (macro-hangupcall,s,7)
[2012-07-18 20:41:04] DEBUG[7987] app_macro.c: Executed application: GotoIf
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:7] ExecIf(“Zap/3-1”, “0|Set|CDR(recordingfile)=”) in new stack
[2012-07-18 20:41:04] DEBUG[7987] app_macro.c: Executed application: ExecIf
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Executing [[email protected]:8] Hangup(“Zap/3-1”, “”) in new stack
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: == Spawn extension (macro-hangupcall, s, 8) exited non-zero on ‘Zap/3-1’ in macro ‘hangupcall’
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: == Spawn extension (macro-hangupcall, s, 8) exited non-zero on ‘Zap/3-1’
[2012-07-18 20:41:04] VERBOSE[7987] logger.c: – Hungup ‘Zap/3-1’
[20

Your Zap/DAHDI trunk needs to be in the from-zaptel context not from-pstn.

Thanks,

How do I go about rectifying this? Do I manually edit this in zapata.conf?

I have no idea what kind of system you are running so I can’t answer that.

Need Asterisk/FreePBX versions, how it was installed (distro or by hand)

I guess I don’t understand. FreePBX requires Asterisk 1.8. Zapata was replaced with DAHDI technology at the end of 1.4 life.

What version of Asterisk do you have?

Clearly you need to change toe from-pstn to from-zaptel and do an amportal restart.

Thanks for the response. I am running FreePBX 2.10.1.1. I originally installed through a Trixbox all-in-one distribution a long time ago. I have always managed the system through the web interface - never editing the configuration files manually. I have one POTS line coming in as ZAP channel 3. I only ran into this problem recently as I am switching from having all DID/CID go to one route - to individual routing. From your note it appears that my POTS line is not configured correctly to allow this to happen. I can only find the setting you mention in the .conf file? I don’t see anything in the FreePBX web interface to change these settings? Thanks.

My full zapata.conf is as follows:

;# Flash Operator Panel will parse this file for zap trunk buttons
;# AMPLABEL will be used for the display labels on the buttons

;# %c Zap Channel number
;# %n Line number
;# %N Line number, but restart counter
;# Example:
;# ;AMPLABEL:Channel %c - Button %n

;# For Zap/* buttons use the following
;# (where x=number of buttons to dislpay)
;# ;AMPWILDCARDLABEL(x):MyLabel

[channels]
language=en

; include zap extensions defined in AMP
#include zapata_additional.conf

; XTDM20B Port #1,2 plugged into PSTN
;AMPLABEL:Channel %c - Button %n

signalling = fxs_ks
callerid = asreceived
context = from-pstn
channel => 3

signalling = fxs_ks
callerid = asreceived
context = from-pstn
channel => 4

;faxdetect=incoming
;usecallerid=yes
;echocancel=yes
;echocancelwhenbridged=no
;echotraining=800
;group=0
;channel=1-2

My Asterisk version is 1.4.18.1-2. Should I upgrade my Asterisk version? Thanks.