yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
查看版本
freeswitch -version
查看版本
FreeSWITCH version: 1.10.6-release.12~64bit (-release.12 64bit)
启动freeswitch
systemctl start freeswitch
2 简单测试
3 默认账号密码配置处
cat /etc/freeswitch/directory/default/1001.xml
<include>
<user id="1001">
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="1001"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="1001"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 1001"/>
<variable name="effective_caller_id_number" value="1001"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
查看定义密码变量的位置
grep default_password /etc/freeswitch/vars.xml
YOU SHOULD CHANGE THIS default_password value if you don't want to be subject to any
<X-PRE-PROCESS cmd="set" data="default_password=1234"/>
创建一个自定义用户
cp /etc/freeswitch/directory/default/1000.xml /etc/freeswitch/directory/default/91023412134.xml
sed -i 's/1000/91023412134/g' /etc/freeswitch/directory/default/91023412134.xml
chown freeswitch:daemon /etc/freeswitch/directory/default/91023412134.xml
重新加载 xml
登录 fs 终端
fs_cli -P 8021 -p ClueCon
reloadxml
退出
/bye
4 再次添加一个用户 并为其设置 dialplan
cat /etc/freeswitch/directory/default/18812345672.xml
<include>
<user id="18812345672">
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="18812345672"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="18812345672"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 18812345672"/>
<variable name="effective_caller_id_number" value="18812345672"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
chown freeswitch:daemon /etc/freeswitch/directory/default/18812345672.xml
为 新用户设置拨号计划
vim /etc/freeswitch/dialplan/default.xml
添加 使 下面的 extension 至于 extension 的第一个位置
<extension name="pstn_Extension18812345672">
<condition field="destination_number" expression="^(18812345672)$">
<action application="export" data="absolute_codec_string=PCMU"/>
<action application="pre_answer"/>
<action application="bridge" data="user/18812345672"/>
</condition>
</extension>
fs_cli -P 8021 -p ClueCon
reloadxml
使用 eyebeam 以18812345672 用户 注册到 fs
在 zoiper 以 91023412134 用户注册到 fs
在 zoiper 上拨打 18812345672