[Asterisk-Users] Strange problem with Dial

Michael George george at mutualdata.com
Mon Aug 23 14:02:00 MST 2004


On Fri, Aug 20, 2004 at 07:14:06PM -0400, Michael George wrote:
> I'm trying to add an emergency dial to my context.  However, when I try to
> dial it, I get caught in an endless loop.
> 
> For debugging, I have pared out nearly all the control flow and just have
> ChanIsAvail() and Dial() called.  Using two different extensions to call teh
> same number, I get two different actions by *.
> 
> Here is the vvverbose output:
> 
>     -- Starting simple switch on 'Zap/3-1'
>     -- Executing Dial("Zap/3-1", "Zap/1/5932336||T") in new stack
>     -- Called 1/5932336
>     -- Zap/1-1 answered Zap/3-1
>     -- Attempting native bridge of Zap/3-1 and Zap/1-1
>     -- Hungup 'Zap/1-1'
>   == Spawn extension (internal, 95932336, 1) exited non-zero on 'Zap/3-1'
>     -- Hungup 'Zap/3-1'
>     -- Starting simple switch on 'Zap/3-1'
>     -- Executing ChanIsAvail("Zap/3-1", "Zap/1") in new stack
>     -- Hungup 'Zap/1-1'
>     -- Executing NoOp("Zap/3-1", "avail: Zap/1-1") in new stack
>     -- Executing Dial("Zap/3-1", "Zap/1/5932336||T") in new stack
> Aug 20 19:09:27 NOTICE[294926]: app_dial.c:714 dial_exec: Unable to create
> channel of type 'Zap'
>   == Everyone is busy/congested at this time
>     -- Executing NoOp("Zap/3-1", "busy") in new stack
>     -- Hungup 'Zap/3-1'
> 
> the first way, I'm matching this context:
> exten => _9NXXXXXX,1,Dial(${TrunkLocal}/${EXTEN:${TrunkMSD}},,T)
> exten => _9NXXXXXX,2,Congestion
> exten => _9517XXXXXXX,1,Dial(${TrunkLocal}/${EXTEN},,T})
> exten => _9517XXXXXXX,2,Congestion
> 
> The second way I'm mathing this one:
> exten => 911,1,ChanIsAvail(Zap/1)
> exten => 911,2,NoOp(avail: ${AVAILCHAN})
> exten => 911,3,Dial(Zap/1/5932336,,T)
> exten => 911,102,NoOp(None Avail)
> exten => 911,104,NoOp(busy)
> 
> Why does the latter fail at the Dial()?

I am still having a problem with this call flow.  I just updated my * source
and rebuilt and reinstalled.

I want to implement the feature I saw in Tips & Tricks where before calling an
emergency number, the outgoing channel(s) are checked for availability so one
can be cleared before trying to dial.  The example code is this:

exten => 911,1,ChanIsAvail(Zap/1)
exten => 911,2,Dial(Zap/1/911)
exten => 911,3,Hangup()
exten => 911,102,SoftHangup(Zap/1-1)
exten => 911,103,Wait(1)
exten => 911,104,Goto(1)

However, every time I try this flow, the Dial() called immediately after the
ChanIsAvail() will fail as busy (return to prio+101).  I know the channel is
available because I see that ChanIsAvail() went to prio+1.

Has there been a change in the code that might cause this?  Perhaps an issue
in the zaptel driver?

Thanks!

-- 
-M

There are 10 kinds of people in this world:
	Those who can count in binary and those who cannot.



More information about the asterisk-users mailing list