[asterisk-users] Dial out through multiple Zap groups

Vieri rentorbuy at yahoo.com
Tue Jul 24 04:27:43 CDT 2007


Hi,

I'm trying to set a rule to dial out through multiple
Zap groups so that, say, g0 is the cheaper POTS lines
group 
and must be used first. However, if g0 is busy or
disconnected then try dialing out g1.

My g0 group is made up of 4 analog lines connected to
a 4-FXO card. I disconnected the RJ-11 wires from the
FXO card 
to simulate a line disconnection. So theoretically all
calls should immediately go out through g1 but they
don't. 
They get "stuck" on g0 as I can see in the asterisk
CLI:

    -- Executing Dial("SIP/4053-082393a8",
"ZAP/g0/555555555|120|TWm") in new stack
    -- Called g0/555555555
    -- Started music on hold, class 'default', on
SIP/4053-082393a8
    -- Zap/32-1 answered SIP/4053-082393a8
    -- Stopped music on hold on SIP/4053-082393a8
(endless)

Note: Zap channel 32 is part of g0.

I used both FreePBX and a custom made rule.
With FreePBX, the outgoing dialplan includes something
like this:

exten =>
_5XXXXXXXX,1,Macro(dialout-trunk,1,${EXTEN},,)
exten =>
_5XXXXXXXX,n,Macro(dialout-trunk,2,${EXTEN},,)
exten => _5XXXXXXXX,n,Macro(outisbusy,)
; trunk 1 is g0, trunk 2 is g1

If I use a custom dialpan that looks something like
this:

exten => _5XXXXXXXX,1,Dial(Zap/g0/${EXTEN})
exten => _5XXXXXXXX,n,NoOp(${DIALSTATUS})
exten => _5XXXXXXXX,n,Dial(Zap/g1/${EXTEN})
exten => _5XXXXXXXX,n,HangUp()

and then watch the CLI, I get exactly the same
behavior as above, ie. I don't get past
Dial(Zap/g0/${EXTEN}) as
Zap/32 answers when it shouldn't. And obviously I
can't get ${DIALSTATUS} to eventually define some
gotos because it's ANSWERED.

Any ideas as to what I should try?
Maybe change some setting in zapata.conf?

Thanks

Vieri



      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 





More information about the asterisk-users mailing list