如何在星号中为FastAGI设置超时 [英] How to Set Timeout for FastAGI in Asterisk

查看:74
本文介绍了如何在星号中为FastAGI设置超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台服务器,该服务器通过TCP将FastAGI请求发送到Internet上的另一台服务器.问题在于FastAGI的默认超时时间很短,并且会引发以下错误.

I have a server that sends FastAGI requests over TCP to another server in the Internet. The problem is that the default timeout for FastAGI is very short and the error below is raised.

如何在我的拨号计划中设置FastAGI超时?

 FastAGI connection to 'agi://Myserver/agi' timed out after MAX_AGI_CONNECT (2000) milliseconds.

推荐答案

2秒超时不是很短".我无法想象当应用程序在2秒钟内无法回答的情况.很高兴您对另一方有疑问.

2sec timeout is not "very short". I can't imagine situation when application can't answer in 2 sec. Very likly you have issue with other side.

但是,如果您确定需要超过2秒的超时时间(如果您通过卫星链接在全球范围内上网3次),则可以在星号源中更改该超时时间,然后重新编译星号.

However if you are sure you need timeout more then 2sec(if you internet go 3 times worldwide via satelite links), you can change that timeout in asterisk source and recompile asterisk.

要获得准确的位置,您可以使用类似以下的内容:

To got exactly place you can use something like this:

asterisk-1.8.11.1]# grep MAX_AGI_CONNECT * -rn|grep define
res/res_agi.c:918:#define MAX_AGI_CONNECT 2000

这篇关于如何在星号中为FastAGI设置超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆