_____ From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Deric Page Sent: Thursday, July 15, 2010 2:24 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Asterisk Manager Problem I am originating a call to a Local channel using an Originate Action: Action: Originate Channel: Local/d...@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 -- -- probably not the answer, but you could add these lines to the bottom of [outdial] Exten => *,1,hangup Exten => t,1,hangup Exten => i,1,hangup This would hang-up any call that had an invalid number or did not dial correctly. deric.p...@nisc.coop
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users