Hi All,

I'm running an AGI, calling a perl script the does number lookups to a
remote server.  I would like to put a timeout in the script.  The
problem I'm running into is if the DNS server is not responding, the
script hangs and waits for 30 seconds before returning to the Asterisk
dialplan.  I would like a timeout of 1 second, then return.

Here is my clean script:

***********************************************************
#!/usr/bin/perl
$|=1;
#####################    Modules to Use       ###############
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
# Set variables according to supplied arguments
$number = $ARGV[0];
$AGI->exec("agi","agi://agi.server.com/script.agi?user=username&number=$number");
***********************************************************

Any assistance will be appreciated.

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Reply via email to