mod_callcenter模块:
callcenter_config agent add [name] [type]
callcenter_config agent del [name]
callcenter_config agent reload [name]
callcenter_config agent set status [agent_name] [status]
callcenter_config agent set state [agent_name] [state]
callcenter_config agent set contact [agent_name] [contact]
callcenter_config agent set ready_time [agent_name] [wait till epoch]
callcenter_config agent set reject_delay_time [agent_name] [wait second]
callcenter_config agent set busy_delay_time [agent_name] [wait second]
callcenter_config agent set no_answer_delay_time [agent_name] [wait second]
callcenter_config agent get status [agent_name]
callcenter_config agent get state [agent_name]
callcenter_config agent get uuid [agent_name]
callcenter_config agent list [[agent_name]]
callcenter_config tier add [queue_name] [agent_name] [[level]] [[position]]
callcenter_config tier set state [queue_name] [agent_name] [state]
callcenter_config tier set level [queue_name] [agent_name] [level]
callcenter_config tier set position [queue_name] [agent_name] [position]
callcenter_config tier del [queue_name] [agent_name]
callcenter_config tier reload [queue_name] [agent_name]
callcenter_config tier list
callcenter_config queue load [queue_name]
callcenter_config queue unload [queue_name]
callcenter_config queue reload [queue_name]
callcenter_config queue list
callcenter_config queue list agents [queue_name] [status] [state]
callcenter_config queue list members [queue_name]
callcenter_config queue list tiers [queue_name]
callcenter_config queue count
callcenter_config queue count agents [queue_name] [status] [state]
callcenter_config queue count members [queue_name]
callcenter_config queue count tiers [queue_name]
拨号计划:
continue_on_fail bleg拨号失败后是否继续执行,不继续就直接挂断aleg
hangup_after_bridge bleg挂断后是否挂断aleg
transfer_after_bridge bleg挂断后,aleg transfer目的的
park_after_bridge bleg挂断后,aleg是否park,esl开发接口非常有用
exec_after_bridge_app bleg挂断后后,aleg执行一个APP
api_after_bridge bleg挂断后后,aleg执行一个API
查看注册分机;
sofia status profile internal reg
打包命令:
tcpdump -s 0 -i ens192 -w /tmp/.pcap port 5060 --i指定网卡 port指定端口
控制台sip日志:
sofia profile internal siptrace on
sofia profile external siptrace on
sofia global siptrace on sofia global siptrace off
端口使用情况:
netstat -ano|findstr "63472"
tasklist |findstr “pid”
防火墙:
systemctl status firewalld 或 firewall-cmd --state
iptables -L
获取录音文件:
vm_fsdb_msg_get 0 default 10.61.29.8 1009 " + paramMap.get("uuid")
一.命令
0.使用fs命令 uuid_send_dtmf uuid dtmfs 发送按键信息
1.version //显示当前freeswitch版本号
2.status //显示当前freeswitch状态
3./event //开启事件接收
4./event plain ALL //订阅所有事件
5./event plain CHANNEL_ANSWER //订阅某类事件
6./noevents //关闭事件接收
7./log //设置log
8./nolog //关闭 log
9.loadxml //加载xml模块
10.reloadxml //重新加载xml模块
11.load mod_portaudio //加载portaudio模块
12.reload mod_portaudio //重新加载portaudio模块
13.freeswitch //启动
14.freeswitch -nc //freeswitch启动到后台
freeswitch -nc -nonat -conf /usr/share/freeswitch/conf -log /var/log/freeswitch -db /var/lib/freeswitch/db -recordings /usr/share/freeswitch/records
15./exit 、/quit 、/bye //退出fs_cli
16.reload mod_event_socket //重新加载mod_event_socket模块
17.originate user/1000 &echo //发启呼叫 ,自呼叫
18.originate user/1000 &park //发启呼叫 ,实现挂起(无声音提示)
19.originate user/1000 &hold //发启呼叫 ,实现挂起(有声音提示)
20.originate user/1000 &playback(/root/welocome.wav) //发启呼叫 ,播放特定声音文件
21.originate user/1000 &record(/tmp/voice_of_alice.wav) //发启呼叫 ,录音
22.show channels //获取channel的uuid
23.uuid_bridge <a_uuid> <b_uuid> 桥接两个channel
24.sofia status //显示sofia状态 xmlstatus
25.sofia status profile internal reg //查看坐席工号注册信息 xmlstatus
26.sofia global siptrace on 打开跟踪功能抓sip包 xmlstatus
27.sofia global siptrace off 关闭跟踪功能抓sip包 xmlstatus
28.sofia status gateway mx8g 列出网关mx8g状态 xmlstatus
sofia profile internal siptrace on/off //打开指定profile抓包
29.sofia profile internal start //启动internal profile 修改xml不需要reload,profile相关命令隐含reloadxml
30.sofia profile internal stop //停止internal profile
31.sofia profile internal restart //重启internal profile
sofia profile external killgw mx8g //删除external 的mx8g网关
sofia profile internal rescan //修改xml后,并不是所有参数都能生效, 重读sofia的配置
sofia profile xeternal register/unregister mx8g //注册或注销网关
sofia profile internal flush_inbound_reg [email protected] //清除[email protected]注册用户,也可以清除其Call-ID
sofia loglevel all 9 //打开级别的调试器 0-9从低到高, 0关闭调试器
若存在NAT,stun服务器能返回外网ip和端口号
uuid_debug_media uuid both on //查看调试uuid对应的输出 both、read、write, on、off
originate {var1=1}{var2=2}{var3=3}user/1000 &echo //全局通道变量设置
originate {ignore_early_media=true}sofia/gateway/gw/138000000 &playback(/tmp/test.wav) //忽略返回的Early Media,直到收到应答信号才返回并播放test.wav
originate user/1000 &bridge({origination_caller_id_number=8888}user/1001) //修改主叫号码为8888,origination_caller_id_number可以设置在a-leg、b-leg,影响本leg的来电显示
originate {effective_caller_id_number=8888}user/1000 &bridge(user/1001) //修改主叫号码,
sox record.wav -c 1 record-1.wav //录音只能单一声道录音,sox可将声音文件混为一个声道
luarun 1.lua //执行lua脚本
修改 最大并发呼叫数 命令临时生效: fsctl max_sessions 5000 fsctl sps 100 永久生效: switch.xml文件中 max-sessions sessions-per-second
二.dialplain
1.extension condition:
2.condition: break //分支,149
3.extension: continue //分支,151
4.extension condition
5.action: application=“set” //变量只设置到当前channel a-leg ,unset取消赋值,或赋值为_undef_
6.action: application=“export” //变量设置到两个channel上 a-leg、b-leg,b-leg不存在不生效,创建时设置。data=“nolocal:ss=12”只设置b-leg
7.action: application=“hash” //变量保存到内存
8.action:
9.action:application=“bridge” //相当于一座桥,建立b-leg,把a-leg、b-leg桥接起来 进行阻塞,知道通话结束,156
10.
11.
12.extension:
13.
14.
15.P.S. 一定要删除上面的内容,不用简单的用 注释,FreeSWITCH 识别
lua
session:ready() //判断电话是否已挂断(目标号码返回180消息之后,挂断之前)
session:setInputCallback('onInputCBF', '');//在放音或录音时,用户按下的DTMF可以用于触发一些功能,设置一个回调函数
播报数字:
到FreeSWITCH的源代码目录中,编译模块
make mod_say_zh-install
然后在FreeSWITCH控制台上加载该模块
load mod_say_zh
for i in `seq 1020 1399`; do sed -e "s/1000/$i/" 1000.xml > $i.xml ; done
标签:name,sofia,agent,queue,常用命令,freeswitch,callcenter,config
From: https://www.cnblogs.com/caicaibucai/p/16919254.html