yum安装freeswitch

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

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值