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

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

问题描述

我有一台服务器,它通过 TCP 向 Internet 中的另一台服务器发送 FastAGI 请求.问题是 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

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

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