首页 > 解决方案 > Freeswitch dialplan cURL - 如何设置超时

问题描述

我正在尝试配置 FreeSWITCH 拨号计划,我在这里尝试实现的是在使用外部 Web 服务将呼叫者连接到代理之前获取有关呼叫者的更多信息。我面临的问题是,有时网络服务需要比平时更多的时间来响应请求。那么有没有办法在拨号计划的 cURL 请求上设置超时?下面是 XML 配置:

<condition field="${IS_INTIME}" expression="true">
	<action inline="true" application="curl" data="https://test.com/service?caller_id_number=${caller_id_number}&token=123"/>
	<action application="set" data="IS_VIP=${curl_response_data}" inline="true"/>
</condition>

提前致谢!

标签: curlfreeswitch

解决方案


根据curl 命令的mod_curl 文档语法如下:

curl url [headers|json|content-type <mime-type>|connect-timeout <seconds>|timeout <seconds>] [get|head|post|delete|put [data]]

所以尝试使用data="https://test.com/service?caller_id_number=${caller_id_number}&token=123 timeout 60"/>


推荐阅读