[asterisk-users] AGI perl script set timeout within script?
Steve Edwards
asterisk.org at sedwards.com
Thu Jan 7 21:29:54 CST 2010
>>>> On Thu, Jan 7, 2010 at 6:27 PM, JR Richardson
>> <jmr.richardson at gmail.com>
>>> wrote:
>>>>> 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.
On Thu, 7 Jan 2010, JR Richardson wrote:
> I tried the perl script eval, alarm, $SIG{ALRM} functions till I was
> blue in the face from cussing at the screen. It does not appear that the
> perl script is doing the DNS query, otherwise the eval alarm would
> timeout and pass control back to asterisk. Another indication is that
> '#define MAX_AGI_CONNECT 2000' in res_agi is not being invoked because
> the timeout is around 30 seconds. Is that 30 second timeout built into
> Asterisk? Can I put an absolute timeout on an agi script from the
> dialplan prior to calling the agi application? Maybe I'll fork a macro
> with a timeout, yea, that's it, let start forking, something new to cuss
> at.
What about:
1) Fixing the slow responding DNS server?
2) Tweaking /etc/resolv.conf options?
3) Setting up a caching name server on your Asterisk host?
4) Adding the AGI server host name and IP address to /etc/hosts?
5) Using the IP address of the AGI server in your dialplan?
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list