How to Set Timeout for FastAGI in Asterisk

天大地大妈咪最大 提交于 2019-12-08 14:25:52

问题


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.

How can I set FastAGI timeout in my dialplan?

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

回答1:


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.

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


来源:https://stackoverflow.com/questions/18545914/how-to-set-timeout-for-fastagi-in-asterisk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!