freeswitch的日常命令

 查看freeswitch服务的运行进程

ps -ef | grep freeswitch

查看freeswitch的端口情况

netstat -anp|grep freeswitch

前台启动freeswitch服务

freeswitch

后台启动freeswitch服务(推荐使用)

freeswitch -nc

freeswitch -nc -nonat

详细启动日志并进入控制台模式命令

freeswitch -c -nonat -rp

进入控制台模式命令

fs_cli

 退出详细模式启动命令(控制台模式下)

shutdown

退出控制台命令

/exit
/bye
/quit
Ctrl+D

关闭freeswitch命令

freeswitch -stop

在控制台中查看freeswitch的运行状态

status(控制台模式执行)

查看freeswitch的注册信息

sofia status profile internal

查看注册分机号

sofia status profile internal reg

freeswitch日志查看
https://blog.csdn.net/jiayangang/article/details/79367688

日志级别
直接F8也可以开启loglevel7
console loglevel (0~7)
打开sip详细日志
sofia profile internal siptrace on
关闭sip详细日志
sofia profile internal siptrace off

通过指定网关外呼指定号码并播放回音

originate sofia/gateway/gw1/xxxxxx &echo()
originate sofia/gateway/jdcc-test/123321654 &echo()

其他常用指令

  • 通过命令行执行fs控制台命令:fs_cli -x “reloadxml”
  • 查看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,/exit
  • 查看注册的话机 sofia status profile internal reg
  • 查询分机号是否注册 sofia status profile internal reg num
  • 清空所有注册话机 sofia profile internal flush_inbound_reg
  • 查看已加载的module: unload mod(tab)
  • 设置最大session数:fsctl max_sessions
  • 网关reload:sofia profile external restart
  • 加载模块 reload mod_XXX
  • 设置日志输出等级:fsctl loglevel 7
  • 获取系统参数值:global_getvar name
  • 设置系统参数:global_setvar =
  • 清空所有注册信息:sofia profile internal flush_inbound_reg
  • 订阅pbx所有event事件:/event all
  • 执行js脚本:jsrun test.js
  • 最近1秒的sps:fsctl last_sps
  • 设置sps 上限:fsctl sps [int]
  • 发送info消息:uuid_send_info uuid msg

freeswitch帮助命令:freeswitch -h

	-nf                    -- no forking
	-reincarnate           -- restart the switch on an uncontrolled exit
	-reincarnate-reexec    -- run execv on a restart (helpful for upgrades)
	-u [user]              -- specify user to switch to
	-g [group]             -- specify group to switch to
	-core                  -- dump cores
	-help                  -- this message
	-version               -- print the version and exit
	-rp                    -- enable high(realtime) priority settings
	-lp                    -- enable low priority settings
	-np                    -- enable normal priority settings
	-vg                    -- run under valgrind
	-nosql                 -- disable internal sql scoreboard
	-heavy-timer           -- Heavy Timer, possibly more accurate but at a cost
	-nonat                 -- disable auto nat detection
	-nonatmap              -- disable auto nat port mapping
	-nocal                 -- disable clock calibration
	-nort                  -- disable clock clock_realtime
	-stop                  -- stop freeswitch                              #关闭freeswitch
	-nc                    -- do not output to a console and background    #启动 freeswitch
	-ncwait                -- do not output to a console and background but wait until the system is ready before exiting (implies -nc)
	-c                     -- output to a console and stay in the foreground

	Options to control locations of files:
	-base [basedir]         -- alternate prefix directory
	-cfgname [filename]     -- alternate filename for FreeSWITCH main configuration file
	-conf [confdir]         -- alternate directory for FreeSWITCH configuration files
	-log [logdir]           -- alternate directory for logfiles
	-run [rundir]           -- alternate directory for runtime files
	-db [dbdir]             -- alternate directory for the internal database
	-mod [moddir]           -- alternate directory for modules
	-htdocs [htdocsdir]     -- alternate directory for htdocs
	-scripts [scriptsdir]   -- alternate directory for scripts
	-temp [directory]       -- alternate directory for temporary files
	-grammar [directory]    -- alternate directory for grammar files
	-certs [directory]      -- alternate directory for certificates
	-recordings [directory] -- alternate directory for recordings
	-storage [directory]    -- alternate directory for voicemail storage
	-cache [directory]      -- alternate directory for cache files
	-sounds [directory]     -- alternate directory for sound files

 

目前收集到的就这些,后续继续添加...

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值