[Asterisk-Users] Re: FastAGI Command Execution

Douglas Garstang dgarstang at oneeighty.com
Fri Jan 13 09:59:03 MST 2006


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:tony at softins.clara.co.uk]
Sent: Friday, January 13, 2006 9:46 AM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] Re: FastAGI Command Execution


In article <645FEC31A18FE54A8721500CDD55A7B602B425C7 at mail.oneeighty.com>,
Douglas Garstang <dgarstang at oneeighty.com> 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: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - 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



More information about the asterisk-users mailing list