On Wed, 13 Apr 2011, A J Stiles wrote:

I want, when a call comes in on someone's DDI number (which the person who dialled it can only possibly have obtained by dialling 1471 after we called them), to be able to look up the caller's details from one of our databases (where the number ought to be stored, because we already dialled it).

Now, this search is going to take some time; so I'd like for the AGI script to fork a clone of itself, so the parent process can exit and the dialplan continue on to ring the person's phone, while the database lookup is done in the background (the script doesn't need to have any further contact with Asterisk -- it will initiate any necessary future communication via other channels).

I solved a similar problem with a multi-threaded AGI.

I created a thread to play 'Please wait while we verify your card details' while the main program did the database look ups and sent the auth out to our card processor.

By the time the prompt finished, I had the response back from the card processor so the 'wait' appeared to the caller to be instantaneous.

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

--
_____________________________________________________________________
-- 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