OpenSIPS3.4 load balancer fetch_freeswitch_stats 测试
最近查了下,感觉是这样的:
REGISTER 请求 dispatcher 到 FreeSWITCH
INVITE 请求 load_balancer 到 FreeSWITCH
我不太熟悉 OpenSIPS,可能我讲的不对
此外,留意到手册
https://www.opensips.org/Documentation/Install-DBSchema-3-4#GEN-DB-LOAD-BALANCER
Probing mode (0-none, 1-if disabled, 2-all the time)
讲的很清楚
手册也讲了,channels=fs://:ClueCon@127.0.0.1:8021
到底如何,回头测试下
试了下,貌似不难
#### FREESWITCH module
loadmodule "freeswitch.so"
modparam("freeswitch", "event_heartbeat_interval", 20)
#### LOAD BALANCER module
loadmodule "load_balancer.so"
# modparam("load_balancer", "db_url", "mysql://opensips:opensipsrw@127.0.0.1/opensips") # CUSTOMIZE ME
modparam("load_balancer", "probing_method", "OPTIONS")
modparam("load_balancer", "probing_interval", 30)
modparam("load_balancer", "fetch_freeswitch_stats", 1)
数据库可以这样:
insert into load_balancer (group_id, dst_uri, resources, probe_mode) values (1, 'sip:172.16.99.205:5080', 'channels=fs://:ClueCon@172.16.99.205:8021', 2);
还有个 freeswitch_scripting 模块,以后有机会测试一把