如何在Ubuntu 20.04|18.04上安装 FreeSwitch

如何在Ubuntu 20.04|18.04上安装FreeSwitch

  • 什么是 FreeSwitch PBX?
  • FreeSwitch PBX 系统有哪些功能?
  • 开始部署
    • 部署前准备
    • 开始安装freeswitch
  • 安装完成
  • 错误及问题FAQ
  • 常见配置文件及说明
    • 修改默认端口:
    • 防火墙配置
    • 账号密码配置/添加新用户
    • freeswitch后台基础操作指令
    • VoIP客户端工具推荐:
  • freeswitch官方文档https://freeswitch.org/confluence/
  • http://ffmpeg.org/releases/

PBX 是 Private Branch Exchange 的缩写。它是在组织内部使用的专用电话系统,并根据特定组织的需求进行定制。组织中的 PBX 用户可以在内部进行内部通信,也可以与外界进行外部通信。VoIP(IP 语音)、ISDN(综合业务数字网络)或模拟等渠道促进了外部通信。

使用 PBX 电话系统的优点是,您可以获得比物理线路更多的电话、用户之间的免费通话以及呼叫队列、数字接线员、呼叫转移、语音邮件和呼叫录音等大量功能。PBX 电话系统的一些示例包括 FreeSwitch、3cx、Elastix、FreePBX 和 Asterisk。

在本指南中,我们将了解如何在 Ubuntu 20.04/18.04 上安装 FreeSwitch PBX

什么是 FreeSwitch PBX?

FreeSwitch 是一个免费的开源通信平台。它支持实时通信、视频以及 IP 语音和WebRTC。它可以在 Windows、MacOS、Linux 和 FreeBSD 上运行。它用于构建具有聊天和屏幕共享的网络会议、IVR、会话边界控制器、批发最低成本路由等功能的 PBX 系统。

FreeSwitch PBX 系统有哪些功能?

  • 可在 Windows、Linux 和 FreeBSD 上运行
  • 语音应答接口
  • WebRTC 支持
  • 通话录音(立体声呼叫者/被呼叫者左/右)
  • 高性能多线程核心引擎
  • 平行狩猎
  • 连环狩猎
  • 自动服务员
  • 基本 IP/PBX 功能
  • 自定义回铃音(早期媒体)

开始部署

freeswitch1.10.7/freeswitch1.10.8安装情况应该与freeswitch1.10.9相同

部署前准备

sudo apt-get install libavformat-dev
sudo apt-get install libswscale-dev
sudo apt-get install libpq-dev

在 Ubuntu 20.04/18.04 上安装 FreeSwitch PBX
首先更新你的系统包

sudo apt -y update
sudo apt -y upgrade

接下来,安装在 Ubuntu 20.04/18.04 上运行 FreeSwitch PBX 所需的依赖项

sudo apt install -y git subversion build-essential autoconf automake libtool g++ pkg-configlibtiff-dev libncurses5 libncurses5-dev make libjpeg-dev libtool libtool-binlibsqlite3-dev libpcre3-dev libspeexdsp-dev libldns-dev libedit-devyasm uuid uuid-dev liblua5.2-dev libopus-dev cmake

以下软件包是可选的,但我们可以安装它们。

sudo apt install -y libcurl4-nss-dev libcurl4-openssl-dev libexpat1-dev
libgnutls28-dev libtiff5-dev libx11-dev unixodbc-dev libssl-dev python-dev
zlib1g-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev uuid-dev libsndfile1-dev

下载源代码
freeswitch1.10.4及之后的版本freeswitch官方将spandsp 和 sofia-sip单拎出来了,需要单独拉代码编译,如果是编译1.10.4之前的freeswitch(如freeswitch1.10.2版本)不必单独拉spandsp和sofia-sip的代码,直接编译freeswitch即可

重大改动历史:
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Release-Notes/FreeSWITCH-1.10.x-Release-notes_25460878///可直接在上述链接中下载freeswitch的tar包
1.8 -> 1.10.0: pgqsql moved out from FreeSWITCH core to its own module, mod_pgsql .
See 1.10.0 (Release date: 05 August 2019) at the bottom.
1.10.3 -> 1.10.4: SpanDSP and sofia-sip have been removed.
See 1.10.4 (Release date: 05 Aug 2020)​ below.
1.10.6 -> 1.10.7: Default behaviour change: to not skip announcement type apps on recovery, 
not hangup call on SRTP errors, 1000 maximum receiving requests per second, auth-messagesand auth-subscriptions are enabled by default now, freeswitch.log log line prefix modified: will affect fail2ban log line matching until similarly modified in fail2ban (https://github.com/fail2ban/fail2ban/issues/3143).
See 1.10.7 (Release date: 24 Oct 2021)​ below.

安装spandsp、sofia-sip、libks和signalwire

// 安装spandsp
# git clone https://github.com/freeswitch/spandsp.git
# cd spandsp
# ./bootstrap.sh -j
# ./configure
# make
# sudo make install
# ldconfig// 安装sofia-sip
no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
# git clone https://github.com/freeswitch/sofia-sip.git
#cd sofia-sip
# ./bootstrap.sh -j
# ./configure
# make
# make install0
# ldconfigsudo apt install -y cmake
cd /usr/src
sudo git clone https://github.com/signalwire/libks.git
cd libks
sudo cmake .
sudo make
sudo make installcd /usr/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c
sudo cmake .
sudo make
sudo make install

编译freeswitch前将不必要的模块编译禁用掉,如果不禁用则需要安装对应的依赖,否则会报错

cd /usr/local/src/freeswitch
vim module.conf//将mod_signalwire和mod_av内容注释掉#applications/mod_signalwire
#applications/mod_av//mod_verto不禁用可能会编译报错You need to either install libks or disable mod_verto in modules.conf
#endpoints/mod_verto  

开始安装freeswitch

接下来,使用 wget从 freeswitch发布页面 获取最新的 FreeSwitch 版本:

cd /usr/src
sudo wget https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.3.-release.zip
sudo apt -y install unzip
sudo unzip freeswitch-1.10.3.-release.zip
cd freeswitch-1.10.3.-release/

请注意 ,如果您尚未安装 unzip,请通过运行 apt -y install unzip安装它

sudo apt -y install unzip

现在运行标准安装过程

//编译freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh  //如果是GitHub拉的代码有这一步,如果是下载tar包解压的没有这一步
./configure --enable-portable-binary --prefix=/usr/local/freeswitch--with-gnu-ld --with-python --with-openssl--enable-core-odbc-support --enable-zrtp
make

如果在编译过程中遇到错误,您可以注释掉任何引发错误的模块或安装缺少的依赖项。就我而言,我最初注释掉了 languages/mod_lua 和 applications/mod_signalwire ,但您可以根据收到的错误注释更多内容。之后重新启动编译,如下所示:

sudo ./configure && sudo make clean && sudo make

如果编译成功, 接下来,安装 freeswitch:

sudo make install

现在编译声音

sudo make all cd-sounds-install cd-moh-install

安装完成

创建 simlink 以轻松使用服务。

sudo ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/
sudo ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin

添加具有较低权限的新组和用户来运行 FreeSWITCH 服务。

cd /usr/local
sudo groupadd freeswitch
sudo adduser --disabled-password  --quiet --system--home /usr/local/freeswitch --gecos "FreeSWITCH Voice Platform" --ingroup freeswitch freeswitch
sudo chown -R freeswitch:freeswitch /usr/local/freeswitch/
sudo chmod -R ug=rwX,o= /usr/local/freeswitch/
sudo chmod -R u=rwx,g=rx /usr/local/freeswitch/bin/

我们需要将 FreeSwitch 添加为 systemd 单元文件。使用您喜欢的编辑器打开新文件 /etc/systemd/system/freeswitch.service并 粘贴以下内容:

sudo vim /etc/systemd/system/freeswitch.service

粘贴以下内容

[Unit]
Description=freeswitch
Wants=network-online.target
Requires=syslog.socket network.target local-fs.target
After=syslog.socket network.target network-online.target local-fs.target[Service]
Type=forking
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
ExecStartPre=/bin/chown -R freeswitch:freeswitch /usr/local/freeswitch
ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS
TimeoutSec=45s
Restart=always
RestartSec=90
StartLimitInterval=0
StartLimitBurst=6User=root
Group=daemon
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=250000
LimitRTPRIO=infinity
LimitRTTIME=infinity
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007
NoNewPrivileges=false[Install]
WantedBy=multi-user.target

启动 FreeSwitch 服务并在启动时启用它

sudo chmod ugo+x freeswitch.service
sudo systemctl start freeswitch.service
sudo systemctl enable freeswitch.service

现在检查 FreeSWITCH 服务的状态

sudo systemctl status freeswitch.service

如果 freeswitch 已正确安装并运行,输出应如下所示
在这里插入图片描述
现在您可以使用客户端连接到 FreeSWITCH,如下所示

# fs_cli -r

您将看到如下输出:
在这里插入图片描述

错误及问题FAQ

一般是软件或库找不到,有三种解决方法

  1. 使用apt install安装
  2. 从github或gitee上下载源码进行编译安装
  3. freeswitch可以通过编辑module.conf文件禁用相关模块

安装过程中遇到的问题及解决方法

  1. build-requirements: autoconf not found.
    解决方法: sudo apt install autoconf
  2. build-requirements: libtool not found.
    解决方法: sudo apt install libtool-bin
  3. 缺少spandsp
# git clone https://github.com/freeswitch/spandsp.git
# cd spandsp
# ./bootstrap.sh -j
# ./configure
# make
# make install
# ldconfig
  1. 缺少sofia-sip
    no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
# git clone https://github.com/freeswitch/sofia-sip.git
#cd sofia-sip
# ./bootstrap.sh -j
# ./configure
# make
# make install
# ldconfig
  1. fatal error: openssl/ssl.h: No such file or directory
    解决方法: sudo apt install libssl-dev

  2. Package sqlite3 was not found
    解决方法:
    sudo apt install libsqlite3-dev
    sudo apt install sqlite3

  3. libcurl was not found
    解决方法: sudo apt install libcurl4-nss-dev

  4. Package libpcre was not found
    解决方法: sudo apt install libpcre3-dev

  5. Package speex was not found
    sudo apt install libspeexdsp-dev

  6. You need to either install libldns-dev or disable mod_enum in modules.conf
    解决方法: sudo apt install libldns-dev

  7. You need to either install libks or disable mod_verto in modules.conf
    方法一:下载安装 https://github.com/signalwire/libks.git
    方法二:1 禁用 mod_verto1

  sudo vim modules.conf #endpoints/mod_verto
  1. error: You need to either install libedit-dev
    解决方法: sudo apt install libedit-dev

  2. 缺少yasm
    解决方法: sudo apt install yasm

  3. You need to either install signalwire-client-c
    方法一:下载编译安装: https://github.com/signalwire/signalwire-c.git
    方法二: 注释掉modules.conf中的signalwire模块

  4. 编译错误
    ./include/apr_general.h:33:14: error: ‘__DARWIN_NSIG’ undeclared here (not in a function) 33 | #define NSIG __DARWIN_NSIG
    注: 没找到原因,发现没有代码使用该定,直接将该行定义注释掉

  5. 接口过期编译错误
    错误1:

In file included from src/switch_apr.c:79:
/usr/include/openssl/md5.h:49:27: note: declared here49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);|                           ^~~~~~~~
src/switch_apr.c:1177:9: warning: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]1177 |         MD5_Update(&md5_context, input, inputLen);
解决方法:关闭接口过期警告
sudo vim MakefileCFLAGS = -g -O2 -Wno-error=deprecated-declarations

错误2:

skinny_protocol.c:685:65: error: array subscript ‘skinny_message_t {aka struct skinny_message}[0]’ is partly outside array bounds of ‘unsigned char[292][-Werror=array-bounds]
CFLAGS = -g -O2 -Wno-error=deprecated-declarations -Wno-error=array-bounds

解决方法:关闭相应告警

sudo vim MakefileCFLAGS = -g -O2  -Wno-error=array-bounds
  1. 没有libavformat-dev and libswscale-dev
    Makefile:1481: *** You must install libavformat-dev and libswscale-dev to build mod_av. Stop.
    解决方法:
sudo apt install libavformat-dev
sudo apt install libswscale-dev

注: 如果编译时还提示找不到,需要重新执行sudo ./configure

  1. 缺少libtiff
    configure: error: "Cannot build without libtiff (does your system require a libtiff-devel package?)"
    解决方法:sudo apt install libtiff-dev

  2. 缺少uuid
    src/switch_apr.c:81:10: fatal error: uuid/uuid.h: No such file or directory
    解决方法:sudo apt install uuid
    如果依旧找不到,查看 一下uuid.h文件的位置, 在笔者环境中,如下

$ ls /usr/include/linux/uuid.h 
/usr/include/linux/uuid.h

可以看出uuid.h在linux目录下,只要相应的创建/usr/lnclude/uuid目录,并将linux/uuid.h拷贝过去可以了

  1. 找不到uuid_xx函数
/usr/bin/ld: ./.libs/libfreeswitch.so: undefined reference to `uuid_parse'
/usr/bin/ld: ./.libs/libfreeswitch.so: undefined reference to `uuid_unparse_lower'
/usr/bin/ld: ./.libs/libfreeswitch.so: undefined reference to `uuid_generate'

解决方法:sudo apt install uuid-dev

  1. 报了spandsp相关内容编译的错误error: ‘V18_MODE_5BIT_4545’ undeclared:
making all mod_spandsp
make[4]: Entering directory `/usr/local/src/freeswitch-1.10.9.-release/src/mod/applications/mod_spandsp'CC       mod_spandsp_la-mod_spandsp.loCC       mod_spandsp_la-udptl.loCC       mod_spandsp_la-mod_spandsp_fax.loCC       mod_spandsp_la-mod_spandsp_dsp.lo
mod_spandsp_dsp.c: In function ‘get_v18_mode’:
mod_spandsp_dsp.c:159:10: error: ‘V18_MODE_5BIT_4545’ undeclared (first use in this function)int r = V18_MODE_5BIT_4545;^
mod_spandsp_dsp.c:159:10: note: each undeclared identifier is reported only once for each function it appears in
mod_spandsp_dsp.c:165:8: error: ‘V18_MODE_5BIT_50’ undeclared (first use in this function)r = V18_MODE_5BIT_50;^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_send_session’:
mod_spandsp_dsp.c:216:2: error: too few arguments to function ‘v18_init’tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);^
In file included from /usr/local/include/spandsp.h:111:0,from mod_spandsp.h:50,from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared hereSPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_encode_session’:
mod_spandsp_dsp.c:263:2: error: too few arguments to function ‘v18_init’pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);^
In file included from /usr/local/include/spandsp.h:111:0,from mod_spandsp.h:50,from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared hereSPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_decode_session’:
mod_spandsp_dsp.c:341:2: error: too few arguments to function ‘v18_init’pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt);^
In file included from /usr/local/include/spandsp.h:111:0,from mod_spandsp.h:50,from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared hereSPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,^
make[4]: *** [mod_spandsp_la-mod_spandsp_dsp.lo] Error 1
make[4]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release/src/mod/applications/mod_spandsp'
make[3]: *** [mod_spandsp-all] Error 1
make[3]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release/src/mod'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release'
make: *** [all] Error 2
[root@maomaosPC freeswitch-1.10.9.-release]# 

将源代码放到Source Insight工程中搜索相关关键词检查发现是spandsp中的内容导致的编译错误,freeswitch相关部分的代码和spandsp模块代码不匹配,去GitHub上查看提交记录,刚好是23年6月底提交的,离我编译就隔了几天的时间,真是个倒霉蛋哦。言归正传,这时候考虑回退spandsp的代码到之前代码匹配的版本,然后重新编译就可以编译成功。
具体步骤:

//先切到对应目录下删除相关内容
cd /usr/local/src/freeswitch
rm -rf spandsp
//重新拉取代码
git clone https://github.com/freeswitch/spandsp.git
//spandsp目录下执行git log或者gitlab上查看对应commit id并切换
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
//按照之前的步骤重新编译安装
//在Github上反馈了这个问题后, 维护人员2023/07/19回复:
mod_spandsp uses the defines you change, e.g. V18_MODE_5BIT_4545 from v18.h,
so it is broken now as it hasn't been updated. It needs to be updated with new defines.

常见配置文件及说明

文件说明
vars.xml一些常用变量
dialplan/default.xml缺省的拨号计划
directory/default/*.xmlSIP用户,每用户一个文件
sip_profiles/internal.xml一个SIP
sip_profiles/externa.xml另一个SIP-UA,用作外部连接,端口5080
autoload_configs/modules.conf.xml配置当FreeSWITCH启动时自动装载哪些模块

修改默认端口:

cd /usr/local/freeswitch/conf
#(freeswitch1.10.9在/usr/local/freeswitch/etc/freeswitch目录下)
#找到vars.xml修改:(可以copy一份存为vars.xml.bak备份)
#修改默认端口
#<X-PRE-PROCESS cmd="set" data="internal_sip_port=5060"/>
#5060默认为freswitch 的sip信令内部端口

防火墙配置

1、在var.xml中修改
<!--X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=stun:stun.freeswitch.org"/--> 
这里没有使用stun功能,而是直接把公网ip填在这里<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip="阿里云分配的公网ip"/>
(freeswitch1.10.9好像如果是默认的端口不用配置这个也能正常使用,修改xml文件后无法访问需要设置stun再reloadxml)在var.xml中修改了之后,就无需在conf/sip_profiles/internal.xml 和 external.xml中修改了,
网上有很多例子都是直接在这两个文件改其实不用,var中改好了之后,这两个文件直接引用external_rtp_ip这个变量即可。

防火墙配置完成后应该就可以了,使用设备注册上服务器拨打下回音电话9196试试能不能听到回音。

FreeSwitch常用默认号码:

号码说明
9664保持音乐
9191注册CluCon
9192调用info在log中显示Channel信息
9195echo, 回音测试,延迟5秒
9196echo,回音测试
9197milliwatte extention, 铃音生成
9198TGML铃音生成示例
9180铃音测试,使用远端生成的回铃音
9181铃音测试,产生英式铃音
9182铃音测试,使用音乐当铃音,彩铃
9183先应答,然后发送英式铃音
9184先应答,然后发送音乐铃音
9178收传真
9179发传真
5000IVR实例
4000听取主意信箱
33xx电话会议,48Hz(其中xx为00~99,下同)
32xx电话会议,32Hz(其中xx为00~99,下同)
31xx电话会议,16Hz(其中xx为00~99,下同)
30xx电话会议,8Hz(其中xx为00~99,下同)
2000-2002呼叫组
1000-1019默认分机号码(默认密码1234)

FreeSwitch默认号码大部分是拨号计划的名称,具体定义在conf/diaplan/default.xml中

账号密码配置/添加新用户

修改默认密码:vars.xml
<X-PRE-PROCESS cmd="set" data="default_password=1234"/>
freeswitch批量添加用户
参考:https://blog.51cto.com/u_15049794/3833216
(freeswitch1.10.9在/usr/local/freeswitch/etc/freeswitch目录下寻找)
/usr/local/freeswitch/conf/directory/default 下有1000.xml~1019.xml 这20个默认用户的配置文件
创建用户的xml后,要加载这些新用户的xml,需要修改/usr/local/freeswitch/conf/dialplan/default.xml这个文件里的拨号规则(正则表达式):

<extension name="Local_Extension">
<!-- 这里可以修改正则范围,允许所有分机号-->
<!--默认为  <condition field="destination_number" expression="^(10[01][0-9])$">   -->
<condition field="destination_number" expression="^([0-9]\d+)$">
<!-- ... -->
<action application="set" data="call_timeout=120"/>
<!-- ... -->
</condition>
</extension>

主要是改下正则表达式,允许所有数字。另外,默认还有一个N秒不接认为超时的配置,默认是30秒,如果有需要调整的,也可以一并修改。
调整/usr/local/freeswitch/conf/dialplan/public.xml

<extension name="public_extensions"><!-- 允许所有分机号 --><condition field="destination_number" expression="^([0-9]\d+)$"><action application="transfer" data="$1 XML default"/></condition>
</extension>

批量生成用户xml文件:

import org.apache.commons.lang3.StringUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;public class CreateFreeswitchUser {public static void main(String[] args) throws IOException {String template = "D:\\soft\\FreeSWITCH\\conf\\directory\\default\\";String templateContent = read(template + "1000.xml");//创建99个用户for (int i = 1; i < 100; i++) {String newUser = "1" + StringUtils.leftPad(i + "", 3, '0');String newContent = templateContent.replaceAll("1000", newUser);String newFileName = template + newUser + ".xml";write(newFileName, newContent);System.out.println(newFileName + " done!");}}static String read(String fileName) throws IOException {File f = new File(fileName);if (!f.exists()) {return null;}FileInputStream fs = new FileInputStream(f);String result = null;byte[] b = new byte[fs.available()];fs.read(b);fs.close();result = new String(b);return result;}static void write(String fileName, String fileContent) throws IOException {File f = new File(fileName);if (f.exists()) {f.delete();}FileOutputStream fs = new FileOutputStream(f);fs.write(fileContent.getBytes());fs.flush();fs.close();}
}

然后将生成的用户文件拷贝到/usr/local/freeswitch/conf/directory/default目录下

freeswitch后台基础操作指令

ps -ef | grep freeswithch 查看进程号
netstat -an | grep 5060 查询FreeSWITCH 监听在哪个IP地址上(默认5060端口的情况下)
whereis freeswitch 查看freeswitch安装路径freeswitch -help可查看帮助信息
freeswitch  启动并前台运行
freeswitch -nc  启动并后台运行
freeswitch -stop 停止fs_cli 进入freeswitch控制台后:
show registrations 查看注册用户情况
sofia status profile internal reg 显示在线注册用户信息
status 查看freeswitch的运行状态
/exit 或 /quit 或 /bye  退出fs_cli
shutdown 关闭freeswitch
reloadxml 重新加载xml配置
console loglevel 7 开启控制台日志级别, 0-7, 数字越大日志越多
version 显示版本信息

VoIP客户端工具推荐:

推荐portsip-uc和linphone,Android和Windows均有安装包,portsip在IOS上应该也是有客户端的,可自行搜索下载使用

freeswitch官方文档https://freeswitch.org/confluence/

http://ffmpeg.org/releases/

1、官网下载ffmpeg4.1。
2、进入ffmpeg4.1根目录执行`./configure --enable-shared --enable-gpl  --enable-libx264 --enable-libspeex`
3、执行make和make install。如果出现类似make: Warning: File  ffbuild/config.mak' has modification time 8011 s in the future的警告执行find . -type f | xargs -n 5 touch。
4、执行ldconfig加载。
5、执行ffmpeg -codecs如果能返回编码,表示编译成功。备注:先要安装`libx264。`
如果无法执行有可能是路径错误,尝试设置环境变量LD_LIBRARY_PATH={安装路径},
查找安装路径的方法:`find / -name ffmpeg`

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/70443.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Nginx从安装到使用,反向代理,负载均衡

什么是Nginx&#xff1f; 文章目录 什么是Nginx&#xff1f;1、Nginx概述1.1、Nginx介绍1.2、Nginx下载和安装1.3、Nginx目录结构 2、Nginx命令2.1、查看版本2.2、检查配置文件正确性2.3、启动和停止2.4、重新加载配置文件2.5、环境变量的配置 3、Nginx配置文件结构4、Nginx具体…

【ES】笔记-Class类剖析

Class Class介绍与初体验ES5 通过构造函数实例化对象ES6 通过Class中的constructor实列化对象 Class 静态成员实例对象与函数对象的属性不相通实例对象与函数对象原型上的属性是相通的Class中对于static 标注的对象和方法不属于实列对象&#xff0c;属于类。 ES5构造函数继承Cl…

HTML emoji整理 表情符号

<!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8" /><title>测试</title></head><body><div style"font-size: 50px;">&#128276</div><script>let count 0d…

Linux 系统服务日志查询 journalctl:查询 systemd 日记

journalctl&#xff1a;查询 systemd 日记 systemd 在取代 SUSE Linux Enterprise 12 中的传统 init 脚本时&#xff08;参见第 13 章 “systemd 守护程序”&#xff09;&#xff0c;引入了自身的称为日记的日志记录系统。由于所有系统事件都将写入到日记中&#xff0c;因此&a…

3.运行项目

克隆项目 使用安装的git克隆vue2版本的若依项目&#xff0c;博主使用的版本是3.8.6. git clone https://gitee.com/y_project/RuoYi-Vue.git目录结构如下图所示&#xff0c;其中ruoyi-ui是前端的内容&#xff0c;其它均为后端的内容。 配置mysql数据库 在数据库里新建一个…

【ARM CoreLink 系列 1 -- CoreLink 系列 产品介绍】

文章目录 ARM CoreLink 介绍ARM CoreLink InterconnectARM CoreLink 处理器外设ARM CoreLink Memory Controllers ARM CoreLink 介绍 ARM的CoreLink系列产品是一套能够进行高效互联的组件和工具&#xff0c;它们用于构建高性能、低功耗的嵌入式和消费电子设备。CoreLink产品系…

vue3组件通信学习笔记

1、Prop 父组件 <template><div class"parent"><h1>我是父元素</h1><Child :msg"msg"></Child></div> </template><script setup> import Child from ./Child.vue let msg ref(我是父组件的数据…

逆向工程-架构真题(二十)

结构化程序设计采用自顶向下、逐步求精及模块化程序设计方法&#xff0c;通过&#xff08;&#xff09;三种基本控制结构可以构造出任何单入口单出口程序。 顺序、选择和嵌套顺序、分支和循环分支、并发和循环跳转、选择和并发 答案&#xff1a;B 解析&#xff1a; 结构化设…

循环(while do...while for)介绍

3.循环 1.while循环 while循环是先判断后执行 while循环一般都会有: 循环初始值, 循环条件 和 循环变量增量(或者减量) 语法: while(表达式){逻辑代码块 }// 计算123...100之和var num 1;//循环初始值var sum 0;//统计结果//循环条件while (num < 100) {console.log(n…

【MySQL】表的增删改查(进阶)

表的增删改查&#xff08;进阶&#xff09; 一. 数据库约束1. 约束类型2. NULL约束3. UNIQUE&#xff1a;唯一约束4. DEFAULT&#xff1a;默认值约束5. PRIMARY KEY&#xff1a;主键约束6. FOREIGN KEY&#xff1a;外键约束7. CHECK约束 二. 表的设计1. 一对一2. 一对多3. 多对…

对象存储 OSS

大家好 , 我是苏麟 , 今天聊聊OSS . 这里使用阿里云的OSS对象存储. 首先大家得有一个阿里云账号 , 注册大家都会 这里不多介绍 . 阿里云官网 : 阿里云登录页 (aliyun.com) 首页产品目录下存储集合里对象存储OSS 进入对象存储OSS页面 点击管理控制台(新用户应该有免费试用期的)…

huggingface 使用入门笔记

概念 Hugging Face Hub​​和 Github 类似&#xff0c;都是Hub(社区)。Hugging Face可以说的上是机器学习界的Github。Hugging Face为用户提供了以下主要功能&#xff1a; ​模型仓库&#xff08;Model Repository&#xff09;​​&#xff1a;Git仓库可以让你管理代码版本、…

CATIA Composer软件安装包分享(附安装教程)

目录 一、软件简介 二、软件下载 一、软件简介 CATIA&#xff08;Computer-Aided Three-dimensional Interactive Application&#xff09;是一款由法国达索系统公司开发的三维计算机辅助设计&#xff08;CAD&#xff09;软件。它是一种全面的产品开发解决方案&#xff0c;广泛…

docker save docker export 区别

docker save用于导出镜像到文件&#xff0c;包含镜像元数据和历史信息&#xff1b;docker export用于将当前容器状态导出至文件&#xff0c;类似快照&#xff0c;所以不包含元数据及历史信息&#xff0c;体积更小&#xff0c;此外从容器快照导入时也可以重新指定标签和元数据信…

Redis-1.4-过期策略

1 设置带过期时间的 key # 时间复杂度&#xff1a;O&#xff08;1&#xff09;&#xff0c;最常用方式 expire key seconds# 字符串独有方式 setex(String key, int seconds, String value)除了string独有设置过期时间的方法&#xff0c;其他类型都需依靠expire方法设置时间&a…

TCP IP网络编程(四) 基于TCP的服务器端、客户端

文章目录 理解TCP、UDPTCP/IP协议栈链路层IP层TCP/UDP层应用层 实现基于TCP的服务器端、客户端TCP服务器端的默认函数调用顺序进入等待连接请求状态受理客户端连接请求TCP客户端的默认函数调用顺序基于TCP的服务器端、客户端函数调用关系 实现迭代服务器端、客户端实现迭代服务…

Java File类和IO流

1. File类 1.1 File对象创建 注意&#xff1a; 路径中"\"要写成"\\"&#xff0c; 路径中"/"可以直接用 File对象可以指代一个不存在的文件路径路径中带盘符是绝对路径&#xff0c;不带盘符是相对路径 1.2 File判断和获取方法 1.3 创建和删除方…

GitHubGiteeGitlab极狐(JihuLab)配置SSH公私钥详细过程

GitHub-微软-github.com Gitee-开源中国- gitee.com Gitlab-乌克兰GitLab 公司-gitlab.com 极狐(JihuLab)-中国代理商运营的Gitlab -gitlab.cn或者jihulab.com 一、生成SSH公钥和私钥 1.1 取消全局设置 $ git config --global user.name "你的名字" $ git confi…

【STM32】FSMC接口的复用和非复用

问题背景 在阅读《零死角玩转STM32—F103指南者》&#xff0c;以及《STM32F10x-中文参考手册》关于FSMC一章节的时候&#xff0c;对于在控制NOR/SRAM的时候使用到的引脚,在提到NOR器件的时候提到了地址复用和非复用接口&#xff0c;一时间没明白是什么东西。 结论 非复用模式…

IMAU鸿蒙北向开发-2023年9月5日学习日志

1. 5种调试方式 1.1 Previewer 在侧边 Previewer 选项卡内可以预览Entry。 如果要单独预览组件&#xff0c;可以在给组件加Preview 装饰器 1.2 Local Emulator&#xff08;本地模拟&#xff09; 1.3 Remote Emulator&#xff08;远程模拟&#xff09; 使用时需要登录华为开发…