freeswitch常见问题

freeswitch常见问题

压力测试
默认情况下,max_sessions控制最大并发数,默认值1000,sps控制最大的美妙呼叫量,默认值30
系统中可以使用status命令查看这两个值,也可以使用以下命令修改这两个值

freedwitch> fsctl max_sessions 5000
freeswitch> fsctl sps 100

上述命令尽在当前环境生效,如果要永久生效可修改配置文件conf/autoload_configs/switch.conf.xml修改以下两个参数

单机崩溃恢复注意的问题
在freeswicth启动时配置如下参数可自动执行sofia recover

<X-PRE-PROCESS cmd="set" data="api_on_startup=sofia recover"/>

双机HA方案注意的问题
#调整内核参数,允许应用绑定非本机IP

echo 'net.ipv4.ip_nonlocal_bind=1' >> /etc/sysctl.conf
sysctl -p

在freeswitch的Sofia Profile中配置ODBC(或PGSQL)数据库支持,并且开启track_calls参数
还需要注意配置文件中domain的只,需要配诶一个公共的值(如使用浮动IP或者一个域名),不能使用默认的本机固定的IP地址

集群分布式需要注意的问题
安装参考http://blog.51cto.com/908405/2235934
openSIPS+FreeSWITCH

yum install gcc-c++ bison lynx subversion flex curl-devel libxslt libxml2-devel libxml2 pcre-devel mysql-devel wget make
wget -O opensips-2.3.zip https://codeload.github.com/OpenSIPS/opensips/zip/2.3
wget http://opensips.org/pub/opensips/latest/opensips-2.4.4.tar.gz
  1. 解压
unzip opensips-2.3.zip
  1. 编译
cd opensips-2.3/
make all include_modules="db_mysql"
  1. 安装
make include_modules="db_mysql" prefix="/usr/local" install

至此,opensips安装完成,

配置OpenSips 连接MySQL数据库
修改配置文件

vi /usr/local/etc/opensips/opensipsctlrc

删除以下各行前边的#(即取消注释)修改相关的值

DBENGINE=MYSQL
DBPORT=3306  # 默认
DBHOST=localhost  # 数据库地址
DBNAME=opensips  # 数据库名
DBRWUSER=opensips  # 数据库用户,测试为方便建议使用root
DBRWPW="opensipsrw"  # DBRWUSER对应的数据库用户的密码
DBROOTUSER="root"

新建数据库
执行命令

opensipsdbctl create
MySQL password for root: 

输入数据库密码,就可以创建表
登录数据库,查看数据库已创建数据opensips及相关表。

创建启动文件

```bash
cp /usr/src/opensips-2.4.4-tls/packaging/rpm/opensips.init /etc/init.d/opensips
sed -i "s/\/usr\/sbin\/opensips/\/usr\/local\/sbin\/opensips/g" /etc/init.d/opensips
sed -i "s/\/etc\/opensips/\/usr\/local\/etc\/opensips/g" /etc/init.d/opensips
sed -i "s/\/etc\/default\/opensips/\/usr\/local\/etc\/opensips/g" /etc/init.d/opensips
sed -i "s/RUN_OPENSIPS=no/RUN_OPENSIPS=yes/g" /etc/init.d/opensips
chmod +x /etc/init.d/opensips
chkconfig opensips on

编辑配置文件opensips.cfg

mv /usr/local/etc/opensips/opensips.cfg /usr/local/etc/opensips/opensips.cfg.noload
vi /usr/local/etc/opensips/opensips.cfg
  1. UDP<>TCP not working
modparam("rr", "enable_double_rr", 1) # instead of 0, 1 is default
modparam("path", "use_received", 0) # instead of 1, 0 is default
  1. “302 Moved temporarily” not working
# in onreply_route[external_reply]:
# instead of calling nat_test_and_correct unconditionally, do it only for non 302's :
if (!t_check_status("302")) {
   route("nat_test_and_correct");
}

1、如何freeswitch接通后再录音
需求录音时不要将前置媒体录制进去.
用法在拨号规则中增加

<action application="set" data="media_bug_answer_req=true"/>

2、号码透传
在找好配置文件中,通过改动每一个caller_id_name 和caller_id_number确定了问题所在,只有改动effective_caller_id_name时,才可以正确呼叫并显示号码

3、打断mod_vad
http://www.ddrj.com/smartivr/mod_vad.html
4、当第一个网关呼叫不成功 走第二个网关

sofia/gateway/skype/xxxxx|sofia/gateway/other/xxxx
bridge {ignore_early_media=true}sofia/gateway/gw1/xxxx|sofia/gateway/gw2/xxxx 

4、空号检测
http://www.ddrj.com/asr/mod_da2.html
id name alias description
2 关机 power off 关机
3 空号 does not exis 空号
4 停机 out of service 停机
5 正在通话中 hold on 正在通话中
6 用户拒接 not convenient 用户拒接
7 无法接通 is not reachable 无法接通
8 暂停服务 not in service 暂停服务
9 用户正忙 busy now 用户正忙
10 拨号方式不正确 not a local number 拨号方式不正确
11 呼入限制 barring of incoming 呼入限制
12 来电提醒 call reminder 各类秘书服务
13 呼叫转移失败 forwarded 呼叫转移失败
14 网络忙 line is busy 网络忙
15 无人接听 not answer 无人接听
16 欠费 defaulting 欠费
17 无法接听 cannot be connected 无法接听
18 改号 number change 改号
19 线路故障 line fault 线路不能呼出,比如SIM卡欠费
20 稍后再拨 redial later 各种稍后再拨提示

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

正在输入中…………

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值