[asterisk-users] Asterisk Manager Problem

Deric Page Deric.Page at nisc.coop
Thu Jul 15 14:24:11 CDT 2010


I am originating a call to a Local channel using an Originate Action:

		Action: Originate
		Channel: Local/dial at outdial
		Context: outdial
		Exten: answer
		Priority: 1
		Timeout: 45000
		ActionID: some_id

In my dialplan, I have this:


		[outdial]
		exten => dial,1,Dial(${DIAL_STRING}, ${DIAL_TIMEOUT})
		exten => dial,n,NoOp(Dial Status = ${DIALSTATUS})
		exten => dial,n,Agi(agi://localhost/Outdial.agi,
${DIAL_STRING})
		exten => dial,n,Hangup()

		exten => answer,1,NoOp(Dial Status = ${DIALSTATUS})
		exten => answer,n,Playback(${GREETING_NAME})
		exten => answer,n,WaitForSilence(2000)
		exten => answer,n,Agi(agi://localhost/Outdial.agi)
		exten => answer,n,Hangup()


Everything seems to work fine so long as the Dial command executes
successfully.  For example, if someone picks up the other end after the
Dial command completes, processing jumps to the "answer" extension as
expected.  If no one ever answers and the Dial command times out,
processing continues on with the next priority of the "dial" extension,
again as expected.

However, if someone sets a bad DIAL_STRING (such as using a channel that
doesn't exist), things start to behave oddly.  It continues on in the
next priority of the "dial" extension (as I would expect).  However, as
soon as it executes the call to the AGI script, it also starts
processing the "answer" extension at the same time.  As a result, I end
up with two calls into my AGI script.  Unfortunately, I don't know what
I'm doing wrong here.

Thanks,

Deric Page
-- 
deric.page at nisc.coop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100715/09986834/attachment.htm 


More information about the asterisk-users mailing list