freeswitch 心跳 asterisk 心跳

22 篇文章 0 订阅
2 篇文章 0 订阅

心跳

<param name="enable-timer" value="$${session_fstimer_enable}"/>

    <param name="minimum-session-expires" value="90"/>

    <param name="session-timeout" value="120"/>



session-timers=refuse
session-expires=600
session-minse=90
session-refresher=uas

如果您想要使用Kamailio的dispatcher模块将呼叫路由到FreeSWITCH服务器,并且希望Kamailio可以检测FreeSWITCH服务器的可用性,您可以使用SIP OPTIONS方法发送心跳包。 以下是一个基本的Kamailio配置示例,其中dispatcher模块通过发送SIP OPTIONS请求来检测FreeSWITCH服务器的可用性: ``` loadmodule "dispatcher.so" modparam("dispatcher", "db_url", "mysql://username:password@localhost/kamailio") modparam("dispatcher", "ds_ping_interval", 30) modparam("dispatcher", "ds_ping_method", "OPTIONS") modparam("dispatcher", "ds_ping_dst", "sip:freeswitch@freeswitch.domain.com") route { # Route incoming calls to the dispatcher if (is_method("INVITE")) { if (!ds_select_dst("1", "4")) { sl_reply_error() exit } } } # Dispatcher configuration modparam("dispatcher", "dsflags", 9) modparam("dispatcher", "ds_list", "1 sip:freeswitch1.domain.com:5060;lr=on;transport=udp") modparam("dispatcher", "ds_list", "2 sip:freeswitch2.domain.com:5060;lr=on;transport=udp") modparam("dispatcher", "ds_list", "3 sip:freeswitch3.domain.com:5060;lr=on;transport=udp") modparam("dispatcher", "ds_list", "4 sip:freeswitch4.domain.com:5060;lr=on;transport=udp") ``` 在这个例子中,我们配置了dispatcher模块,将其连接到MySQL数据库,并使用SIP OPTIONS方法向“sip:freeswitch@freeswitch.domain.com”发送心跳包。 我们还配置了四个FreeSWITCH服务器,这些服务器将用于呼叫路由。 请注意,此示例中使用的配置可能与您的实际情况不同,您需要根据您的具体需求进行调整。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值