freeswitch 控制台使用

本文来自csdn lidphttp://blog.csdn.net/perfectpdl,转载注明出处,谢谢

我建了一个 Freeswitch 内核研究 交流群, 45211986, 欢迎加入, 另外,提供基于SIP的通信服务器及客户端解决方案。


服务器通常作为后台进程运行,这时如果我们想登陆到服务器上做一些交互,就要借助控制台接口,类似asterisk asterisk –r,登陆到一个运行中的freeswitch实例的方法为fs_cli,此程序存放在/usr/local/freeswitch/bin/fs_cli

放在标准目录下:

[root@openser-dev ~]#ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli

这样在命令行上直接输入fs_cli即登陆到freeswitch控制台,执行freeswitch支持的命令。。。。

在此控制台上可以执行两种类型命令,一类为控制freeswitch的命令,不加/,另一类为添加/的命令,此类型命令为控制fs_cli行为的命令,比如输入/help会列出控制fs_cli行为的命令列表

freeswitch@internal>/help

Command Description

-----------------------------------------------

/help Help

/exit, /quit, /bye,... Exit the program.

/event, /noevents,/nixevent Event commands.

/log, /nolog Log commands.

/uuid Filter logs for asingle call uuid

/filter Filter commands.

/debug [0-7] Set debug level.

如果输入 help,则是控制freeswitch的命令,会输出一系列可以控制freeswitch的命令列表。

freeswitch@internal>help

Valid Commands:

...,,shutdown,mod_commands

acl,<ip><list_name>,compare an ip to an acl list,mod_commands

alias,[add|stickyadd]<alias> <command> | del [<alias>|*],Alias,mod_commands

banner,,Returns thesystem banner,mod_commands

bg_system,<command>,Executea system command in the background,mod_commands

bgapi,<command>[<arg>],Execute an api command in a thread,mod_commands

break,<uuid>[all],Break,mod_commands

。。。。。。。。。。。。。。。。。。。。。此处省略200J

对于发给freeswitch的命令,有几个应该熟记于心,

Help- FSAPI列表

version正运行的服务器版本

status统计当前FreeSWITCH状态信息

showchannels显示所有活动的channell(call-leg)

show calls显示所有当前被bridge的呼叫

对于呼叫,有几个概念,即 channel, call-leg, call; channel等同于call-leg,从服务器角度看,

Call-leg或者channle是服务器与客户端之间的单独连接实例,call为两个终端被bridge在一起,是两个call-leg.比如呼叫进入freeswitch,被路由到留言,这是一条call-leg,如果被freeswitch桥接到另一个客户端,则为两个call-leg,by the way, freeswitch对于每个call-legfreeswitch中也叫session)被单独线程处理。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值