FreeSWITCH--常用指令

参考

  • freeswitch官方网站:http://www.freeswitch.org.cn/

1. FS控制台常用指令

  • 查看sofia模块状态:sofia status
  • 查看freeswitch状态:status
  • 查看通话命令: show calls
  • 查看channel命令: show channels
  • 打开log命令:console loglevel 7
  • 关闭log命令:console loglevel 0
  • 重新加载xml: reloadxml
  • 开启全局信令追踪:sofia global siptrace on
  • 关闭全局信令追踪:sofia global siptrace off
  • 发起一个通话:originate 呼叫字符串 &fsApp
  • 挂断所有通话:hupall
  • 退出fs_cli:/bye
  • 网关的重新加载:sofia profile external reload
  • 查看已注册分机:

2. Freeswitch API

注意uuid_API类的指令只能通过控制台或者ESL使用,无法在dialplan中使用

2.1 T

  • three_way:第三方入会

2.2 U

  • user_spy:监听

3. 不同场景使用的指令

3.1 外拨两个电话并桥接

originate sofia/gateway/gw1/tel_1 &park
originate sofia/gateway/gw1/tel_2 &park
show channels
uuid_brige uuid_1 uuid_2

// 向用户播放音频文件
uuid_broadcast uuid_1 <wav_path> both/aleg/bleg
uuid_kill uuid_1 [cause]

If no cause code is specified, NORMAL_CLEARING will be used.

3.2 通过网关外拨并桥接

originate {
    
    some parameters}user/dn_number &bridge({
    
    some parameters}sofia/gateway/gw-test/target_phone_number)

通过网关外呼电话并进入指定freeswitch流程

originate sofia/gateway/gw-test/185******** &bridge({
    
    some parameters}sofia/external/sip:route_point@freeswitch_ip:5060)

猜你喜欢

转载自blog.csdn.net/qawsedrf123lala/article/details/124289332
今日推荐