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
-- 
[email protected]
-- 
_____________________________________________________________________
-- 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

Reply via email to