Is it possible to have nested MySQL queries in extensions.conf? Ie, perform a query, grab a value, and then jump to another location in the dialplan and do another query based on that original value. I'm having problems with the result and fetchid's and I'm not sure if it's even possible to do this or not. Thanks, Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060111/45029dd5/attachment.htm
On 11/01/06, Douglas Garstang <dgarstang@oneeighty.com> wrote:> Is it possible to have nested MySQL queries in extensions.conf? > > Ie, perform a query, grab a value, and then jump to another location in the > dialplan and do another query based on that original value. I'm having > problems with the result and fetchid's and I'm not sure if it's even > possible to do this or not.When things start to get that complicated, I reckon it's time for AGI.... Peter -- Peter Bowyer Email: peter@bowyer.org Tel: +44 1296 768003 VoIP: sip:peter@bowyer.org VoIP: *5048707000@sipbroker.com FWD: **275*5048707000 VoipTalk: **473*5048707000
Peter, Too slow! We're going to potentially be doing several MySQL lookups for routing even the most basic of calls, and if every one of those queries has to make a call out to an AGI script, it would become a performance problem. Douglas. -----Original Message----- From: Peter Bowyer [mailto:peeebeee@gmail.com] Sent: Wednesday, January 11, 2006 11:27 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Nested MySQL Commands On 11/01/06, Douglas Garstang <dgarstang@oneeighty.com> wrote:> Is it possible to have nested MySQL queries in extensions.conf? > > Ie, perform a query, grab a value, and then jump to another location in the > dialplan and do another query based on that original value. I'm having > problems with the result and fetchid's and I'm not sure if it's even > possible to do this or not.When things start to get that complicated, I reckon it's time for AGI.... Peter -- Peter Bowyer Email: peter@bowyer.org Tel: +44 1296 768003 VoIP: sip:peter@bowyer.org VoIP: *5048707000@sipbroker.com FWD: **275*5048707000 VoipTalk: **473*5048707000 _______________________________________________ --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
We are trying to implement findme/followme. The dialplan first queries the dialled number in the database and determines if it is OnNet(IP) or OffNet(PSTN). If it is OnNet, it then queries a findme/followme table, which looks like this: mysql> select * from ast_findme; +----+-----------+----------+-------------------------------+-------------------------+ | id | extension | sequence | dial | playback | +----+-----------+----------+-------------------------------+-------------------------+ | 1 | 3254101 | 1 | SIP/3254102&SIP/3254101|10|tr | wait-offensive-sounds | | 2 | 3254101 | 2 | SIP/3254101|10|tr | call-forward | | 3 | 3254101 | 3 | SIP/13033372500 | nbdy-avail-to-take-call | +----+-----------+----------+-------------------------------+-------------------------+ 3 rows in set (0.00 sec) The dialplan will retrieve each record for the called number, one at a time, and attempt to dial the new number. The 'dial' column is passed directly to the Dial() command. However, before it can dial that number it has to check once again and see if the new number is OnNet or OffNet. If it is OffNet, send the call off to the proxy server. If it is OnNet, dial the number directly. As you can see, this isn't trivial. I'm no MySQL expert, and I can't see a way to do this without first obtaining each new number, and then querying it individually to determine if it is OnNet or OffNet before dialling it. Douglas. -----Original Message----- From: Chris Albertson [mailto:chrisalbertson90278@yahoo.com] Sent: Wednesday, January 11, 2006 12:40 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Nested MySQL Commands> ....Send a > query over to the MySql server with only the required > parameters and have it do all the processing for you and > only returns the results.THe above describes the "whole point" of a SQL DBMS Server. WHat else could you ask one to do for you? Back to the original question: "Can you use the result of one query to feed another without going to the DBMS twice? Yes, Of course SQL allows this. In fact Data base experts would be horrified to see any code that querries a value, holds that value and then querries based on that value. Doing this without holding a lock on the relevent tables is just plain wrong and will result in bugs. You should _always_ write the SQL querry such that only one querry gives you the results you need. Manual Locks are not good, they can be the source of very serious performance problems. For more specific advice you would need to post the details of what you are tring to do and a bit of the SQL you are using.> > I know that is a nice feature od Microsoft Sql. But have > not had a chance to read up on the performance of the new > version of MySql...Basically MySQL is very fast when the load is light but scales very poorly with either higher loads or higher conplexity querries. It is good for "flat file like" problems. The larger DBMSes are slower initially but scale better. (Please CC any replies to my direct email) Chris Albertson Home: 310-376-1029 chrisalbertson90278@yahoo.com Cell: 310-990-7550 Office: 310-336-5189 Christopher.J.Albertson@aero.org KG6OMK __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ --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
Peter, I assume you mean something like this in extensions.conf: exten => _X.,1,AGI(master-dial-logic.pl) and then there's only one call. All logic would be performed by the perl script. This has many advantages. One disadvantage however is that potentially, there could be 120 simultaneous instances of this script running (one per call). Douglas. -----Original Message----- From: Peter Bowyer [mailto:peeebeee@gmail.com] Sent: Wednesday, January 11, 2006 1:36 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Nested MySQL Commands On 11/01/06, Douglas Garstang <dgarstang@oneeighty.com> wrote:> Peter, > > Too slow! We're going to potentially be doing several MySQL lookups for routing even the most basic of calls, and if every one of those queries has to make a call out to an AGI script, it would become a performance problem.I mean, an AGI to do the routing. A single call which does all the MySQLing it needs to do in a manner efficient for the environment it's written in, and makes all the call routing desicions as well. Peter -- Peter Bowyer Email: peter@bowyer.org Tel: +44 1296 768003 VoIP: sip:peter@bowyer.org VoIP: *5048707000@sipbroker.com FWD: **275*5048707000 VoipTalk: **473*5048707000 _______________________________________________ --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
jd.... but..... but.... Asterisk still fires up a process each time you make an AGI call in the dialplan. You could still have 120 of these lightweight processes running, in _addition_ to the other process. Doesn't sound like it provides much benefit. -----Original Message----- From: John Daragon [mailto:john@argv.co.uk] Sent: Wednesday, January 11, 2006 2:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Nested MySQL Commands Douglas Garstang wrote:> Peter, I assume you mean something like this in extensions.conf: > > exten => _X.,1,AGI(master-dial-logic.pl) > > and then there's only one call. All logic would be performed by> the perl script. This has many advantages. One disadvantage however > is that potentially, there could be 120 simultaneous instances of > this script running (one per call). Yes, but if you need it to scale efficiently, each of these could be a very lightweight process. If you used each of these to communicate via RPC or shared memory to a process with a small and configurable pool of database connections (which isn't that difficult), you can build a simple and scalable solution. jd -- John Daragon john@argv.co.uk argv[0] limited (Asterisk implementation & consultancy) Lambs Lawn Cottage, Staple Fitzpaine, Taunton, TA3 5SL, UK v +44 (0) 1460 234068 f +44 (0) 1460 234069 m +44 (0) 7836 576127 _______________________________________________ --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
I wouldn't know where to begin to look to research how to write a new Asterisk application command. We're not all C programmers. For now, my AGI script is in perl. -----Original Message----- From: John Daragon [mailto:john@argv.co.uk] Sent: Wednesday, January 11, 2006 3:02 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Douglas Garstang Subject: Re: [Asterisk-Users] Nested MySQL Commands Douglas Garstang wrote:> jd.... but..... but.... Asterisk still fires up a process> each time you make an AGI call in the dialplan. You could > still have 120 of these lightweight processes running, > in _addition_ to the other process. Doesn't sound like it > provides much benefit. Or, you could have the dialplan pass control to app_<access_the_database> and have that do the data manipulation, populating dial plan variables for processing as usual (or, I guess, performing the routing itself). No process overhead. I'd still be inclined to use a pool of running, connected database processes/threads to handle the actual queries. jd -- John Daragon john@argv.co.uk argv[0] limited (Asterisk implementation & consultancy) Lambs Lawn Cottage, Staple Fitzpaine, Taunton, TA3 5SL, UK v +44 (0) 1460 234068 f +44 (0) 1460 234069 m +44 (0) 7836 576127
We have no control over this. Asterisk is the one that starts the new process upon a call to AGI in extensions.conf... -----Original Message----- From: Mike Fedyk [mailto:mfedyk@mikefedyk.com] Sent: Wednesday, January 11, 2006 3:27 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: john@argv.co.uk Subject: Re: [Asterisk-Users] Nested MySQL Commands Chris Albertson wrote:>Under Linux (and other OSes) It's not as bad as that. Even with >128 Perl processes running there is only one copy of the Perl >interpeter in memory. Each of the 128 running processes would >have it's own copy of only it's data segments. With Perl >already in memory the biggest system overhead would be >process creation. > >The best design is the one that minimizes the number of >process that the kernel has to create. Notice that this is >why the Apache Perl modual is so much faster than using >Perl from a CGI script >You will get the best usage of shared pages if all child interpreted processes fork off of one parent process. That way they can share as many data pages as possible also. If they don't fork off of each other, then a new copy of the interpreter will be put into memory. There will be some shared CoW pages between them, but not nearly as many when compared forking off of a common pool of processes. _______________________________________________ --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
So I really wish there was some way to measure how well the worst case scenario would perform. This would be 120 simultaneous calls (don't know how many per second) on a Dual 3.8Ghz Dell PowerEdge 1850 with 2GB RAM. Asterisk would call an AGI script, written in perl, to route all calls. The script would have to perform multiple database queries in order to route a call. -----Original Message----- From: Mike Fedyk [mailto:mfedyk@mikefedyk.com] Sent: Wednesday, January 11, 2006 3:27 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: john@argv.co.uk Subject: Re: [Asterisk-Users] Nested MySQL Commands Chris Albertson wrote:>Under Linux (and other OSes) It's not as bad as that. Even with >128 Perl processes running there is only one copy of the Perl >interpeter in memory. Each of the 128 running processes would >have it's own copy of only it's data segments. With Perl >already in memory the biggest system overhead would be >process creation. > >The best design is the one that minimizes the number of >process that the kernel has to create. Notice that this is >why the Apache Perl modual is so much faster than using >Perl from a CGI script >You will get the best usage of shared pages if all child interpreted processes fork off of one parent process. That way they can share as many data pages as possible also. If they don't fork off of each other, then a new copy of the interpreter will be put into memory. There will be some shared CoW pages between them, but not nearly as many when compared forking off of a common pool of processes. _______________________________________________ --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
I don't get the whole concept of FastAGI. It's nothing special. Asterisk just opens a connection to a TCP port instead of executing a binary. -----Original Message----- From: Mike Fedyk [mailto:mfedyk@mikefedyk.com] Sent: Wednesday, January 11, 2006 4:32 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Re: Nested MySQL Commands Tony Mountifield wrote:>In article <645FEC31A18FE54A8721500CDD55A7B602B425B7@mail.oneeighty.com>, >Douglas Garstang <dgarstang@oneeighty.com> wrote: > > >>Peter, >> >>Too slow! We're going to potentially be doing several MySQL lookups for routing even the >>most basic of calls, and if every one of those queries has to make a call out to an AGI >>script, it would become a performance problem. >> >> > >AGI is only slow if you're calling it repeatedly and implementing it in >a scripting language that needs a big interpreter. > >I have had great success writing AGIs in C and interfacing to MySQL >from within them. They end up nice and small and fast. A single AGI >invocation does all the database transactions necessary to decide >on the disposition of the call, and then jumps to the appropriate >extension and priority in the dialplan. >And if you like writing your AGIs in interpreted languages, there is always FastAGI. _______________________________________________ --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
Well, is Perl DBI thread-safe for a start??? -----Original Message----- From: Leo Ann Boon [mailto:leo@datvoiz.com] Sent: Wednesday, January 11, 2006 5:32 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Nested MySQL Commands Douglas Garstang wrote:>So I really wish there was some way to measure how well the worst case scenario would perform. This would be 120 simultaneous calls (don't know how many per second) on a Dual 3.8Ghz Dell PowerEdge 1850 with 2GB RAM. Asterisk would call an AGI script, written in perl, to route all calls. The script would have to perform multiple database queries in order to route a call. > >Why don't you use FastAGI? Run the lookup 'script' as a standalone application communicating with Asterisk through sockets. Once you're decoupled from the process forking model, you can implement all those nifty thread, connection pooling tricks. You'll probably need to use stored procedures on the SQL side. You should also do some traffic modeling to optimize the resource planning. I don't really think you need 120 threads to handle the load. In traditional PBX, when using host-based routing (or so-called adjunct routing) you get a grace period of about 4 seconds to route the call. Time to dig out the erlang-c calculator :). _______________________________________________ --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
Since about 1992... and the Asterisk docs for FastAGI are pretty rotten. But that's ok, I've come to expect that. -----Original Message----- From: Kevin P. Fleming [mailto:kpfleming@digium.com] Sent: Wed 1/11/2006 8:11 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Re: Nested MySQL Commands Douglas Garstang wrote: > I don't get the whole concept of FastAGI. It's nothing special. Asterisk just opens a connection to a TCP port instead of executing a binary. How long have you been around Unix/Linux systems? Do you have any clue how much less expensive it is to open a TCP socket as compared to forking the Asterisk process, exec()-ing another program, having that program open database/web connections, etc.? _______________________________________________ --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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4446 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060111/76c6c852/attachment.bin
I also don't believe perl DBI is thread safe.... -----Original Message----- From: Douglas Garstang Sent: Wed 1/11/2006 9:08 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: RE: [Asterisk-Users] Re: Nested MySQL Commands Since about 1992... and the Asterisk docs for FastAGI are pretty rotten. But that's ok, I've come to expect that. -----Original Message----- From: Kevin P. Fleming [mailto:kpfleming@digium.com] Sent: Wed 1/11/2006 8:11 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Re: Nested MySQL Commands Douglas Garstang wrote: > I don't get the whole concept of FastAGI. It's nothing special. Asterisk just opens a connection to a TCP port instead of executing a binary. How long have you been around Unix/Linux systems? Do you have any clue how much less expensive it is to open a TCP socket as compared to forking the Asterisk process, exec()-ing another program, having that program open database/web connections, etc.? _______________________________________________ --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
> Is it possible to have nested MySQL queries in extensions.conf? > > Ie, perform a query, grab a value, and then jump to another > location in the dialplan and do another query based on that > original value. I'm having problems with the result and > fetchid's and I'm not sure if it's even possible to do this or not.Just make sure that you use different variable names for each query if the values should stay available after the next query. What we tend to do is grab the data from the database and the stuff that should stay around for a longer time is assigned to a new and appropriately named variable. So the original variable can be used again. We've got loads of queries in our extensions.conf. -- Andreas Sikkema BBned NV Software Engineer Planeetbaan 4 +31 (0)23 7074342 2132 HZ Hoofddorp
Do you have a link to where it says this? The DBI docs that I looked at (perldoc dbi) said that it isn't thread-safe. -----Original Message----- From: Leo Ann Boon [mailto:leo@datvoiz.com] Sent: Thursday, January 12, 2006 12:50 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Re: Nested MySQL Commands Douglas Garstang wrote:>I also don't believe perl DBI is thread safe.... > >The lastest docs says that DBI does support multithread connection pooling. Otherwise, you are always free to implement your AGI in 'modern' :) programming languages like Java or C# that support threads and pooling.> -----Original Message----- > From: Douglas Garstang > Sent: Wed 1/11/2006 9:08 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Cc: > Subject: RE: [Asterisk-Users] Re: Nested MySQL Commands > > > Since about 1992... and the Asterisk docs for FastAGI are pretty rotten. But that's ok, I've come to expect that. > > -----Original Message----- > From: Kevin P. Fleming [mailto:kpfleming@digium.com] > Sent: Wed 1/11/2006 8:11 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Cc: > Subject: Re: [Asterisk-Users] Re: Nested MySQL Commands > > > > Douglas Garstang wrote: > > I don't get the whole concept of FastAGI. It's nothing special. Asterisk just opens a connection to a TCP port instead of executing a binary. > > How long have you been around Unix/Linux systems? Do you have any clue > how much less expensive it is to open a TCP socket as compared to > forking the Asterisk process, exec()-ing another program, having that > program open database/web connections, etc.? > _______________________________________________ > --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 > >_______________________________________________ --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
Andreas. I tried that. Still didn't work. It just appears that Asterisk doesn't like letting you execute another query while it's holding on to the state of a previous one. Doug. -----Original Message----- From: Andreas Sikkema [mailto:andreas.sikkema@bbned.nl] Sent: Thursday, January 12, 2006 2:01 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Nested MySQL Commands> Is it possible to have nested MySQL queries in extensions.conf? > > Ie, perform a query, grab a value, and then jump to another > location in the dialplan and do another query based on that > original value. I'm having problems with the result and > fetchid's and I'm not sure if it's even possible to do this or not.Just make sure that you use different variable names for each query if the values should stay available after the next query. What we tend to do is grab the data from the database and the stuff that should stay around for a longer time is assigned to a new and appropriately named variable. So the original variable can be used again. We've got loads of queries in our extensions.conf. -- Andreas Sikkema BBned NV Software Engineer Planeetbaan 4 +31 (0)23 7074342 2132 HZ Hoofddorp _______________________________________________ --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
Actually, I was thinking about that... I've managed to whip up a simple python fast agi script. It starts a new thread when it gets a connection and uses python MySQLdb. I couldn't create a pool of database connections for the threads because the docs for MySQLdb say that isn't thread safe. It implements a simple findme/followme feature where it tries a sequence of numbers in order, and plays a sound file between each. Anyway, now that everything is performed through one server-side process, if anything goes wrong with it, either in the python internals (threads maybe?), or a exception occurs that I didn't forsee (when you hang up the current call before the SIP messaging completes, python gets a Broken Pipe exception on the socket for example), then the script completely pukes and dies of course at this point. With one server-side process, you don't have the safety net of one system process perl call. If that screws up, only the current call is affected. I'm really not too confident that I can write (or python is capable of) a fast agi script that is so bullet-proof that I'd want to put production calls through it. Doug. -----Original Message----- From: Mike Fedyk [mailto:mfedyk@mikefedyk.com] Sent: Thu 1/12/2006 9:33 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Nested MySQL Commands Simone Cittadini wrote: > Douglas Garstang ha scritto: > >> So I really wish there was some way to measure how well the worst >> case scenario would perform. This would be 120 simultaneous calls >> (don't know how many per second) on a Dual 3.8Ghz Dell PowerEdge 1850 >> with 2GB RAM. Asterisk would call an AGI script, written in perl, to >> route all calls. The script would have to perform multiple database >> queries in order to route a call. >> >> > It will work if you need no transcoding, I tested a python agi doing > something like 6 query to accept / instradate the call and it works > for 150 / 200 simultaneous calls, the machine starts sweating of > course, but the voice quality is still good, no drops. > Mine is just a quick prototype, using fastagi or writing the agi in C > is surely the way to go, imho fastagi will let you have a more > configurable / customizable system since you can write the application > in a object oriented language. Also an ugly hack would be to call the perl bytecode instead of the text script. That would allow for the ease of AGI (everything is cleaned up when the process exits) with lower overhead. FastAGI is of course what you want for production, but this can help in a pinch. Mike _______________________________________________ --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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 6534 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060112/7ba45c94/attachment.bin
No an option. Too slow and too resource intensive. -----Original Message----- From: Gonzalo Servat [mailto:gservat@gmail.com] Sent: Thu 1/12/2006 9:47 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Nested MySQL Commands On 1/13/06, Mike Fedyk <mfedyk@mikefedyk.com> wrote: [..snip..] > Also an ugly hack would be to call the perl bytecode instead of the text > script. That would allow for the ease of AGI (everything is cleaned up > when the process exits) with lower overhead. > > FastAGI is of course what you want for production, but this can help in > a pinch. Also, just a suggestion that was mentioned to me by somebody (whose nick I can't remember, sorry!) on the #asterisk chan, when using AGI to do the sort of thing the original poster is after, it's a good idea to set some "dial" variable and let the AGI exit and Dial from Asterisk using this variable. This way the AGI exits and doesn't stay running for the duration of the call. Regards, Gonzalo _______________________________________________ --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