Tony,

It isn't that simple. I was trying to implemt findme/followme functionality. A 
user dials a number, and then the agi looks up that dialled extension in MySQL. 
For that extension, there is a list of numbers to try in sequence. Any step in 
the sequence could even involve dialling multiple numbers at the same time. 

If extensions.conf calls out to a Fast AGI script to retrieve the first number 
to dial, and then the Fast AGI script sets certain variables before returning 
control to extensions.conf to actually perform the dial, that might work for 
the first number, but I can't think of any way for the state to be maintained, 
such that if all this was in a loop in extensions.conf, on the next call to the 
Fast AGI script, it could remember it's state and retrieve the next number in 
the list.

Oh if only it where simple!

-----Original Message-----
From: Tony Mountifield [mailto:[EMAIL PROTECTED]
Sent: Friday, January 13, 2006 9:46 AM
To: [email protected]
Subject: [Asterisk-Users] Re: FastAGI Command Execution


In article <[EMAIL PROTECTED]>,
Douglas Garstang <[EMAIL PROTECTED]> wrote:
> I've noticed that with FastAGI (and maybe AGI) that when you
> sequentially send a sequence of dial commands, if the call is picked
> up, that after the call ends, the Fast AGI script keeps executing the
> commands!
> 
> Is there anyway to stop execution once a call is picked up? I think
> looking at the result codes after the Dial to determine if the call
> was picked up or not is not a good idea... if it even works.

I would suggest putting the Dial commands in the dialplan itself.

Have the AGI do all the call routing decision making based upon its
database lookups, but then instead of calling Dial with EXEC, just do
SET PRIORITY, SET EXTENSION and even SET CONTEXT to choose the required
part of the dialplan, then exit the AGI. Have the sequence of extensions
in the dialplan, which allows a successful Dial to terminate the
sequence.

Hope this helps

Cheers
Tony
-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to