最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Freeswitch 常用命令

IT圈 admin 0浏览 0评论

Freeswitch 常用命令

sofia global siptrace on # 开启 sip 信息的显示,用 off 可以关闭。
sofia global siptrace off

通过网关外呼手机号
originate sofia/gateway/rtw807/17610763450 &echo

会议呼叫
conference test bgdial sofia/gateway/rtw807/17610763450 &echo

常用命令:
启动:freeswitch

启动并后台运行:freeswitch -nc

进入客户端:fs_cli -H 127.0.0.1 -P 8021 -p password

退出客户端:/exit, /bye, /quit Ctrl+D

停止:freeswitch -stop

查询网关状态: sofia status profile local

重启网关:         sofia profile external restart
重新注册网关:    sofia profile external register rtw807
刷新网关:          sofia profile external rescan
不再重新注册网关:    sofia profile external killgw rtw807


查看freeswitch的端口情况:netstat -anp|grep freeswitch

使用fs_cli进行呼叫:originate user/1003 &echo 其中&echo会把听到的声音返回给发出者

音频编码部分设备不支持可以使用这个bgapi originate {absolute_codec_string=PCMU}user/1009 018162330576 xml default

reloadxml 重新加载xml文件

查看当前注册的用户数量:sofia status profile internal

查找文件夹:find / -name external -type d

复制文件到多个文件夹:echo a b c | xargs -n 1 cp -v ./gwl.xml


ps -ef | grep freeswitch netstat -apn | grep 8021

开启sip消息显示 sofia global siptrace on

关闭sip消息显示 sofia global siptrace off

常用配置文件:

C:\Program Files\FreeSWITCH\conf\autoload_configs\acl.conf.xml        修改访问fsip设置 allow|deny
1. autoload_configs\xml_curl.conf.xml        动态修改网关配置

  <binding name="gateway">
          <param name="gateway-url" value="" bindings="configuration"/>
          
    </binding>

2. vars.xml
   ①<X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,G722,PCMU,PCMA"/>
      <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=OPUS,G722,PCMU,PCMA"/>
   ②<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=192.168.1.98"/> 301
   ③ <X-PRE-PROCESS cmd="stun-set" data="external_sip_ip=192.168.1.98"/>

3. autoload_configs\acl.conf.xml  网络白名单设置

reload mod_xml_curl

回拨
1.originate sofia/gateway/rtw807/17610763450 &playback(file_string://tts/9527.wav) &echo() 

2.originate {ignore_early_media=true,originate_timeout=60}sofia/gateway/rtw807/17610763450 &playback(file_string://tts/1663643790.wav) 

Linux上的freeswitch:

不管FreeSWITCH运行在前面还是后台,都可以使用客户端软件fs_cli连接到它并对它进行控制。使用方法为:
/usr/local/freeswwitch/bin/fs_cli

全局变量查询: eval $${变量名}

Freeswitch 常用命令

sofia global siptrace on # 开启 sip 信息的显示,用 off 可以关闭。
sofia global siptrace off

通过网关外呼手机号
originate sofia/gateway/rtw807/17610763450 &echo

会议呼叫
conference test bgdial sofia/gateway/rtw807/17610763450 &echo

常用命令:
启动:freeswitch

启动并后台运行:freeswitch -nc

进入客户端:fs_cli -H 127.0.0.1 -P 8021 -p password

退出客户端:/exit, /bye, /quit Ctrl+D

停止:freeswitch -stop

查询网关状态: sofia status profile local

重启网关:         sofia profile external restart
重新注册网关:    sofia profile external register rtw807
刷新网关:          sofia profile external rescan
不再重新注册网关:    sofia profile external killgw rtw807


查看freeswitch的端口情况:netstat -anp|grep freeswitch

使用fs_cli进行呼叫:originate user/1003 &echo 其中&echo会把听到的声音返回给发出者

音频编码部分设备不支持可以使用这个bgapi originate {absolute_codec_string=PCMU}user/1009 018162330576 xml default

reloadxml 重新加载xml文件

查看当前注册的用户数量:sofia status profile internal

查找文件夹:find / -name external -type d

复制文件到多个文件夹:echo a b c | xargs -n 1 cp -v ./gwl.xml


ps -ef | grep freeswitch netstat -apn | grep 8021

开启sip消息显示 sofia global siptrace on

关闭sip消息显示 sofia global siptrace off

常用配置文件:

C:\Program Files\FreeSWITCH\conf\autoload_configs\acl.conf.xml        修改访问fsip设置 allow|deny
1. autoload_configs\xml_curl.conf.xml        动态修改网关配置

  <binding name="gateway">
          <param name="gateway-url" value="" bindings="configuration"/>
          
    </binding>

2. vars.xml
   ①<X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,G722,PCMU,PCMA"/>
      <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=OPUS,G722,PCMU,PCMA"/>
   ②<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=192.168.1.98"/> 301
   ③ <X-PRE-PROCESS cmd="stun-set" data="external_sip_ip=192.168.1.98"/>

3. autoload_configs\acl.conf.xml  网络白名单设置

reload mod_xml_curl

回拨
1.originate sofia/gateway/rtw807/17610763450 &playback(file_string://tts/9527.wav) &echo() 

2.originate {ignore_early_media=true,originate_timeout=60}sofia/gateway/rtw807/17610763450 &playback(file_string://tts/1663643790.wav) 

Linux上的freeswitch:

不管FreeSWITCH运行在前面还是后台,都可以使用客户端软件fs_cli连接到它并对它进行控制。使用方法为:
/usr/local/freeswwitch/bin/fs_cli

全局变量查询: eval $${变量名}

与本文相关的文章

发布评论

评论列表 (0)

  1. 暂无评论