Zap Channel DIDs and Incoming DIDs

I am trying to use the Zap Channel DID, which is supposed to assign a DID to all calls on that particular channel right, but when I put the DID I assigned into the Incoming DID the system rings Wrong Number.

the table simply detects the incoming channel and assigns the DID you gave it and sends the call through the incoming routes with that DID. The mechanism is fundamentally the same as it was before for Channel routing with a bit more flexibility added. If it’s not doing what you think it should be doing, take a look at the CLI to see if the call is really coming in on the desired channel and what it is doing. This is designed for Analog FXO lines.

I have a 4 line Digium FXO card. Here is the CLI:

– Starting simple switch on ‘Zap/1-1’
– Executing [s@from-pstn:1] NoOp(“Zap/1-1”, “No DID or CID Match”) in new stack
– Executing [s@from-pstn:2] Answer(“Zap/1-1”, “”) in new stack
– Executing [s@from-pstn:3] Wait(“Zap/1-1”, “2”) in new stack
– Executing [s@from-pstn:4] Playback(“Zap/1-1”, “ss-noservice”) in new stack
– <Zap/1-1> Playing ‘ss-noservice’ (language ‘en’)
– Executing [s@from-pstn:5] SayAlpha(“Zap/1-1”, “”) in new stack
== Auto fallthrough, channel ‘Zap/1-1’ status is ‘UNKNOWN’
– Hungup ‘Zap/1-1’

Here is the zapata.conf:

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
;echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

group=1

;Include AMP configs
#include zapata_additional.conf

Here is the zapata-auto.conf:

; Autogenerated by /usr/sbin/genzaptelconf – do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;

; Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1” (MASTER)
;;; line="1 WCTDM/0/0"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
context=default

;;; line="2 WCTDM/0/1"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 2
context=default

;;; line="3 WCTDM/0/2"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
context=default

;;; line="4 WCTDM/0/3"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 4
context=default

It works fine for me.

The asterisk system does not know the DID of the analoge line, this function allows you to say, “ok, I know what line (zaptel port) is ringing, and i know that the phone number on that line is ‘0123456789’ so, if that line is ringing, assign the DID of ‘123456789’ to it.”

Then in inbound routes, you route that DID wherever you want it to go. It’s a way of spoofing the DID when it’s not naturally available.

Actually dirk, DID’s work for both Analog and Digital phone trunks. Since a lot of people only use the first number in the trunk instead of DID’s the Zap Channel DID feature does just what you say creating the same DID number for every call coming in on the channels you set it to. The problem is I did set the Zap Channel DID for channel 1 to some number and then I put that same number in for the DID and defined where it should go and it’s not working. The only solution I’ve found is to set the DID to accept any DID/CID and then it will put the call through.

your zapata-auto.conf is setting the wrong context, it’s setting it to “context=default” and it should be from-zaptel.

p_lindheimer I was afraid you were going to say that. I agree, and so I will take this up with trixbox. Thanks for everyones help.

there is nothing to be ‘afraid’ of, just edit the file and change the context to from-zaptel and you should be ok.

I’m having the same symptoms after upgrading to 2.4.0. When I go back in and remove the DID from the zaptel inbound channel it works. I’ve checked zapata.conf, zapata-auto.conf and zapata-additional.conf. I’m using Trixbox 2…2.12, fwiw.

With no DID specified it works like this:

-- Starting simple switch on 'Zap/1-1' -- Executing NoOp("Zap/1-1", "Entering from-zaptel with DID == ") in new stack -- Executing Ringing("Zap/1-1", "") in new stack -- Executing Set("Zap/1-1", "DID=s") in new stack -- Executing NoOp("Zap/1-1", "DID is now s") in new stack -- Executing GotoIf("Zap/1-1", "1?zapok:notzap") in new stack -- Goto (from-zaptel,s,8) -- Executing NoOp("Zap/1-1", "Is a Zaptel Channel") in new stack -- Executing Set("Zap/1-1", "CHAN=1-1") in new stack -- Executing Set("Zap/1-1", "CHAN=1") in new stack -- Executing Macro("Zap/1-1", "from-zaptel-1|s|1") in new stack -- Executing NoOp("Zap/1-1", "Returned from Macro from-zaptel-1") in new stack -- Executing Goto("Zap/1-1", "from-pstn|s|1") in new stack -- Goto (from-pstn,s,1) -- Executing Set("Zap/1-1", "__FROM_DID=s") in new stack -- Executing GotoIf("Zap/1-1", "1 ?cidok") in new stack -- Goto (from-pstn,s,4) -- Executing NoOp("Zap/1-1", "CallerID is NNNNNNNNNNNNNN) in new stack -- Executing Set("Zap/1-1", "FAX_RX=disabled") in new stack -- Executing Goto("Zap/1-1", "ivr-3|s|1") in new stack -- Goto (ivr-3,s,1) -- Executing Set("Zap/1-1", "LOOPCOUNT=0") in new stack -- Executing Set("Zap/1-1", "__DIR-CONTEXT=default") in new stack -- Executing Set("Zap/1-1", "_IVR_CONTEXT_ivr-3=") in new stack -- Executing Set("Zap/1-1", "_IVR_CONTEXT=ivr-3") in new stack -- Executing GotoIf("Zap/1-1", "0?begin") in new stack -- Executing Answer("Zap/1-1", "") in new stack -- Executing Wait("Zap/1-1", "1") in new stack -- Executing Set("Zap/1-1", "TIMEOUT(digit)=3") in new stack -- Digit timeout set to 3 -- Executing Set("Zap/1-1", "TIMEOUT(response)=10") in new stack -- Response timeout set to 10 -- Executing BackGround("Zap/1-1", "custom/UnattendedMenu2") in new stack -- Playing 'custom/UnattendedMenu2' (language 'en')

With DID specified this is the (undesired) result:

-- Starting simple switch on 'Zap/1-1' -- Executing NoOp("Zap/1-1", "Entering from-zaptel with DID == ") in new stack -- Executing Ringing("Zap/1-1", "") in new stack -- Executing Set("Zap/1-1", "DID=s") in new stack -- Executing NoOp("Zap/1-1", "DID is now s") in new stack -- Executing GotoIf("Zap/1-1", "1?zapok:notzap") in new stack -- Goto (from-zaptel,s,8) -- Executing NoOp("Zap/1-1", "Is a Zaptel Channel") in new stack -- Executing Set("Zap/1-1", "CHAN=1-1") in new stack -- Executing Set("Zap/1-1", "CHAN=1") in new stack -- Executing Macro("Zap/1-1", "from-zaptel-1|s|1") in new stack -- Executing NoOp("Zap/1-1", "Returned from Macro from-zaptel-1") in new stack -- Executing Goto("Zap/1-1", "from-pstn|s|1") in new stack -- Goto (from-pstn,s,1) -- Executing NoOp("Zap/1-1", "No DID or CID Match") in new stack -- Executing Answer("Zap/1-1", "") in new stack -- Executing Wait("Zap/1-1", "2") in new stack -- Executing Playback("Zap/1-1", "ss-noservice") in new stack -- Playing 'ss-noservice' (language 'en') -- Executing SayAlpha("Zap/1-1", "") in new stack

I guess I’m missing something obvious …

thanks in advance and thanks in arrears for all the great work on this!

cheers, michael

– Executing Macro(“Zap/1-1”, “from-zaptel-1|s|1”) in new stack
– Executing NoOp(“Zap/1-1”, “Returned from Macro from-zaptel-1”) in new stack

there is no macro-form-zaptel-1 which is what the Zaptel Channel DIDs creates. Create an entry with ‘1’ as your channel and put a DID that corresponds to a route you need to define for that DID in Incoming Routes.

Thanks, that did the trick. I guess if I’d used port 0 to plug the line into instead of port 1, then the upgrade would have magically worked with no intervention… In an ideal world, magic would have happened :slight_smile:

thanks again for the quick response!

PS: I Just donated US$100 - hope most of that gets to the project and doesn’t get eaten by fees along the way.

PPS: Just updated a different box that was using channel 4 as its only channel and everything worked with no adjustments, fyi.

thanks - donations are always appreciated. Paypal does like to take their cut, but there isn’t much bureaucracy beyond that:-)

Yes p_lindheimer, I have modified the zapata-auto.conf file and nothing changed; but I noticed this when I did a re-read configs using trixbox.

== Manager ‘admin’ logged off from 127.0.0.1
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Connect attempt from ‘127.0.0.1’ unable to authenticate
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1

I restarted asterisk and things started to work; do you know what this error is?

any please post there ZAP CHANNEL DIDs & INBOUND ROUTE.

thanks

hello

i have a A200 sangoma and my trixbox config everything well i can use the 4 lines well
if the first is busy use the netx and beyon

my question is how can use a outboun route with just one of those lines
because i pay a celular plan on one line and i want to send all the traffic of celular tru that line in specific, but that line is inside the group ZAP/g0

so how can i do that use for specific line ?

Felon,
answered in the other thread you posted the question in.

Hi

I have an 8 port analog card. I have a problem and its that for my inbound calls it always sounds busy, i checked the call report, and it seems that the problem is that i am receiving calls from sip/zap from the system, and they don´t release the lines. How can i solve this???

. 2008-08-03 21:43:37 SIP/104-b7… 104 “EXT.104” <104> 96741787 ANSWERED 00:11
2. 2008-08-03 21:41:22 SIP/103-b7… 103 “EXT.103” <103> 95354447 ANSWERED 00:09
3. 2008-08-03 21:40:45 SIP/104-b7… 104 “EXT.104” <104> 96875762 NO ANSWER 00:01
4. 2008-08-03 21:17:14 Zap/4-1… s ANSWERED 00:47
5. 2008-08-03 21:16:07 Zap/4-1… s ANSWERED 01:01
6. 2008-08-03 21:15:47 Zap/1-1… s ANSWERED 02:06
7. 2008-08-03 21:04:51 Zap/1-1… s ANSWERED 10:46
8. 2008-08-03 20:45:57 Zap/4-1… s ANSWERED 29:50
9. 2008-08-03 20:34:33 Zap/1-1… s ANSWERED 11:31
10. 2008-08-03 20:34:09 Zap/2-1… s ANSWERED 43:06
11. 2008-08-03 20:26:39 Zap/1-1… s ANSWERED 04:42
12. 2008-08-03 20:25:06 Zap/2-1… s ANSWERED 06:08
13. 2008-08-03 20:20:33 Zap/2-1… 104 ANSWERED 00:34
14. 2008-08-03 20:19:03 Zap/2-1… 104 ANSWERED 00:37
15. 2008-08-03 17:58:01 Zap/1-1… s ANSWERED 147:11
16. 2008-08-03 17:35:52 Zap/2-1… 104 ANSWERED 04:17
17. 2008-08-03 17:31:08 Zap/1-1… 104 ANSWERED 03:25
18. 2008-08-03 17:24:25 Zap/2-1… 104 ANSWERED 04:40
19. 2008-08-03 17:23:49 Zap/3-1… s ANSWERED 187:32
20. 2008-08-03 16:47:57 SIP/104-b7… 104 “EXT.104” <104> 103 NO ANSWER 00:01
21. 2008-08-03 16:47:31 SIP/103-b7… 103 “EXT.103” <103> 104 NO ANSWER 00:03
22. 2008-08-03 16:46:21 SIP/104-b7… 104 “EXT.104” <104> 95354447 ANSWERED 00:09
23. 2008-08-03 16:45:43 SIP/102-b7… 102 “EXT.102” <102> 95354447 ANSWERED 00:17
24. 2008-08-03 16:00:37 Zap/1-1… s ANSWERED 83:12
25. 2008-08-03 15:54:57 Zap/2-1… s ANSWERED 88:42

gsnltda,

Please don’t hijack a thread with another one. Please repost as a new question. When you do …

You have provided almost details so it will be hard to answer. More info…

Who’s card?
Which model?
Where are you in the world as different telco’s have different standards that effect a card and how it operates.
Who’s distro, and/or Hand Build? Please provide details as to which and instructions you might have followed.

Most common reason for what you have is that you are in a country that the card needs to be specially configured for. by Default Digium tdm based cards default to US standards, so if you are NOT in the US then it is likely that you need to configure your country to start.

am not so sure about whats going on i’m unable to see calls going to askterisk its not showing on the cli nothing happens am not srure what i did wrong please help am in serious need of it ty