ZAP Dialling Error

Hi,

I am running Asterisk 1.4.1 and am having problems with outbound dialling via zap. I get the following error when trying :-

-- Executing [9674035@internal-nonuri:1] Dial("SIP/uxbod-00666190", "Zap/g0/123456") in new stack [Mar 3 18:00:05] WARNING[26731]: app_dial.c:1090 dial_exec_full: Unable to create channel of type 'Zap' (cause 0 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Executing [9123456@internal-nonuri:2] Congestion("SIP/uxbod-00666190", "") in new stack == Spawn extension (internal-nonuri, 9123456, 2) exited non-zero on 'SIP/uxbod-00666190'

Dial(${PSTN}${EXTEN:1})

PSTN has been set too Zap/g0 which is my FXO module on a TDM11B.

Incoming works fine.

Here is my zapata.conf :-

[code][channels]
;
language=en
context=incoming
switchtype=national
sendcalleridafter=2

signalling=fxo_ks
context=internal
channel => 1
callerid=“Office” <1000>
mailbox=1000
group=5

signalling=fxs_ks
context=incoming
channel => 4
callerid=asreceived
group=0
[/code]

Any ideas ?

Note: Real number has been replaced with 123456!

Try the following in extensions.conf:

[code]Under your [internal] section put:

include => outbound

Remove your Dial(${PSTN}${EXTEN:1}) then add a section like this:

[outbound]
exten => _0XXXXXXXXXX,1,Dial(Zap/4/${EXTEN})
exten => _0XXXXXXXXXX,2,Congestion()
exten => _0XXXXXXXXXX,102,Congestion()
[/code]

:smile:

Tried and get a engaged tone :frowning: yet the line is available :-

Connected to Asterisk 1.4.1 currently running on mailhub (pid = 28666) Verbosity was 0 and is now 4 -- Starting simple switch on 'Zap/1-1' -- Executing [9123456@internal:1] GotoIf("Zap/1-1", "1?6") in new stack -- Goto (internal,9123456,6) -- Executing [9123456@internal:6] Goto("Zap/1-1", "internal-nonuri|9123456|1") in new stack -- Goto (internal-nonuri,9674035,1) -- Executing [91234565@internal-nonuri:1] Dial("Zap/1-1", "Zap/4/123456") in new stack -- Called 4/123456 -- Hungup 'Zap/4-1' == Everyone is busy/congested at this time (1:0/0/1) -- Executing [9123456@internal-nonuri:2] Congestion("Zap/1-1", "") in new stack == Spawn extension (internal-nonuri, 9123456, 2) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1'

You have “GotoIf” and “Goto” in your output which tells me you still have a dialplan with old stuff in it.

Remove all the old stuff and do an “extensions reload” in the asterisk cli or restart asterisk

Hi Uxbod

Could you post the actual section of the extensions.conf.
The dbug shows us whats happening but we need to see what you are expecting to happen.

Ian

[code][general]
;
static=yes
writeprotect=no
clearglobalvars=no
;
[globals]

CONSOLE=Console/dsp ; Console interface for demo
PSTN=Zap/g0 ; Trunk interface
OFFICE=Zap/1
FQDN=mailhub.splatnix.net

[incoming]

exten => s,1,GoToIfTime(17:00-09:00|mon-fri||?outofhours,s,1)
exten => s,2,GoToIfTime(|sat-sun||*?outofhours,s,1)
exten => s,3,Answer()
exten => s,4,Dial(Zap/1,20)
exten => s,5,Playback(cybermog)
exten => s,6,VoiceMail(1000@incoming,s)
exten => s,7,Hangup()
[outofhours]
exten => s,1,Answer()
exten => s,2,Playback(cybermog)
exten => s,3,VoiceMail(1000@incoming,s)
exten => s,4,Hangup()

[internal]
exten => _.,1,GotoIf($[${LEN(${SIPDOMAIN})} = 0]?6)
exten => _.,2,GotoIf($[${SIPDOMAIN} = ${FQDN}]?6)
exten => _.,3,GotoIf($[${SIPDOMAIN} = ${FQDN}:5060]?6)
exten => _.,4,Macro(uridial,${EXTEN}@${SIPDOMAIN})
exten => _.,5,HangUp()
exten => _.,6,Goto(internal-nonuri,${EXTEN},1)
exten => h,1,HangUp()

[internal-nonuri]
include => internal-extensions
include => outbound-local
include => outbound-national

[internal-extensions]
exten => 5000,1,VoiceMailMain(@incoming)
exten => 5000,2,Hangup()
exten => 1000,1,Dial(${OFFICE},20)
exten => 1000,2,VoiceMail(1000@incoming)
exten => 1000,3,Hangup()
exten => 1000,101,VoiceMail(1000@incoming)
exten => 1000,102,Hangup()
exten => 1001,1,Dial(sip/uxbod,20)
exten => 1001,2,VoiceMail(1001@incoming,u)
exten => 1001,3,Hangup()
exten => 1001,101,VoiceMail(1001@incoming,u)
exten => 1001,102,Hangup()

[outbound-local]
exten => _9NXXXXX,1,Dial(${PSTN}/${EXTEN:1})
exten => _9NXXXXX,2,Congestion()
exten => _9NXXXXX,102,Congestion()

[outbound-national]
exten => _9XXXXXNXXXXX,1,Dial(${PSTN}/${EXTEN:1})
exten => _9XXXXXNXXXXX,2,Congestion()
exten => _9XXXXXNXXXXX,102,Congestion()

[macro-uridial]
exten => s,1,Dial(SIP/${ARG1})
exten => s,2,Congestion()

[inbound-sip]
exten => uxbod,1,Dial(sip/uxbod,20)
exten => uxbod,2,VoiceMail(1001@incoming)
exten => uxbod,3,Hangup()
[/code]

you should specify a group= in zapata.conf before the channel= line.

Can you change:

PSTN=Zap/g0 to PSTN=Zap/4

reload and see what happens?

In my box i have Zap/4 as the connection to my phone line, and Zap/1 as the connection to my analogue phone.

I don’t see why yours would be Zap/g0 ( but then i am a semi-newbie)

Just trying to help

Hi

Basicly you havent defined group zero.

In zapata.conf seting are inherited from above unless specified.

Try

[code][channels]
;
language=en
sendcalleridafter=2

signalling=fxo_ks
context=internal
callerid=“Office” <1000>
mailbox=1000
group=5
channel => 1

signalling=fxs_ks
context=incoming
callerid=asreceived
group=0
channel => 4

[quote]

[/quote][/code]

Ian,

If you look at my original posting group 0 is defined in zapata.conf for the FXO module. But even if I dont use Zap/go and just use Dial(Zap/4/${EXTEN}) that doesn’t work neither :frowning:

Hmmm, I reckon it is something in 1.4.X release. Will drop back too 1.2.15 as it has worked in that release fine.

I have the same setup as you.

Asterisk 1.4
Zaptel 1.4

I have my PSTN line on channel=4
I have my analogue phone on channel=1

I have group=1 above channel=1
I have group=2 above channel=4

All my dialing out goes on Zap/4

Have you tried makeing a simple extension like so:

exten => 1471,1,Dial(Zap/4/1471,10,r) exten => 1471,2,Hangup()

Or try changing Zap/4 to Zap/g0

Why is your PSTN line Zap/g0 and mine is Zap/4 do you know?

Zap/g0 should hunt for group 0 and find the first line available, if you have more than one PSTN, but I have also tried with Zap/4/ on a extension and that fails aswell :frowning:

So the PSTN line is definately on channel 4 then, (physically)

Looking at the card, is the Green module on channel 1 & the Red module on channel 4?

I presume you are already sure but sometimes it’s a simple mistake that can baffle us for days.

Hi

Whats in zaptel.conf?

What does zap show channels say ?

also what is shown in dmesg.

Ian

Yes the modules are correct, as if I dial a extension that goes to Zap/1 it works fine :wink: I am just trying release 1.2.16 as it has worked before. Only seems to fail on 1.4.1. Just wondering if it is to do with the fact that in UK.

Nah, I’m in the UK using asterisk 1.4 & zaptel 1.4 as well

Okay, I have just deleted everything and have reinstalled. Damn things wants to work now :smile:

Here is my zapata.conf :-

[code][channels]
context=internal

signalling=fxo_ks
callerid=“Office” <1000>
mailbox=1000
group=5
context=internal
channel => 1
callerid=
mailbox=
group=0

;;; line="4 WCTDM/0/3 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
cidsignalling=v23
cidstart=polarity
context=incoming
channel => 4
[/code]

One thing I did notice though when re-installing was that with the default samples if you ran genzaptelconf it does not find zapata-channels.conf.

Thanks very much for everyones help though.

Glad it works now.

On a side note, do you get callerid on your analogue phone?
For me, Asterisk sees the callerid and passes it to my sip phone, but not my analgue phone

:frowning:

Just tried it and no it does not get passed to the analogue extension :frowning: