设为首页 收藏本站
开启辅助访问
注册会员 找回密码

VoIP88

VoIP88 Aster+ 技术文档 查看内容

如何安装FreeSWITCH 和 Sangoma SS7 信令网关

2014-10-21 10:37| 发布者: james.zhu| 查看: 2623| 评论: 0

摘要: Sangoma SS7 网关集成FreeSWITCH。如何配置IUSP和Sangoma E1接口,如何透传ANI X header。

Sangoma NSG SS7 信令网关支持最大支持32E1,支持ISUP中国变种。本文重点介绍如何使用Sangoma SS7 网关和开源FreeSWITCH进行对接。主要执行以下几个步骤:
1) 安装SS7 前准备
1.1)用户必须了解运营商说提供的服务,本网关支持仅SS7 ISUP中国变种,不支持TUP
1.2)现场检查运营商提供的物理接口,是否是120欧姆的,还是75欧姆的。本网关通过RJ48 接口
1.3)获得SS7 软件许可证,联系Sangoma 技术支持,附上许可证序列号,并且提供SPC 点码,MAC 地址,sangoma 将提供一个许可证文件,通过此文件更新系统,这样,系统才能正常工作。
具体获得sangoma许可证的方式,和SPC 信息文件,可以访问:http://wiki.sangoma.com/NSG-Questionnaire 
2)下载NSG SS7 包
2.1)sangoma NSG SS7 通过两种安装方式:1)二进制包安装 2)ISO 光盘安装。
二进制包安装可以和FreeSWITCH 实现一体机的部署方式;ISO 则需要占用整个系统硬盘。具体详情,请访问:
http://wiki.sangoma.com/Software
3)配置SS7
Sangoma SS7 需要Sangoma 工程师帮助配置,所以在安装调试阶段,为了快速部署安装。需要客户打开SSH端口和页面端口。
具体的安装图例如下所示:

在以上图例中,我们可以看到必须确保所有的相关参数设置正确,用户才能进行下一步的配置。

4)在FreeSWITCH端注册Sangoma SS7 网关
在FreeSWITCH 配置sangoma NSG 比较简单,在SIP-profiles 文件夹下 internal.xml 中添加
一行代码:
==========================
       
        <gateways>
     <gateway name="sangoma">
        <param name="username" value="sangoma"/>
        <param name="password" value="sangoma"/>
        <param name="realm" value="192.168.1.109:5062"/>
        <param name="dialplan" value="xml"/>
        <param name="context" value="from-NSG"/>
</gateway>
 
    
       
       
       
       
       
       
       
    
       
============================
重新F6 freeSWITCH 加载sangoma NSG,可以确认成功注册。

5)设置拨号规则
从FreeSWITCH 服务器端设置拨号规则:
5.1)在default.xml 中设置呼入规则:
============================
<context name="from-NSG">
    <extension name="incoming_call">
        <condition field="destination_number" expression="1111" break="never"> // 呼入号码为1111
            <!-- extract the span name from the SIP-X headers -->
            <action application="set" data="span=${sip_h_X-freetdm-SpanName}"/>
            <!-- log that we have an incoming call from NSG and which span the call came in on -->
            <action application="log" data="INFO Incoming call from NSG on span=${span}"/>
            <action application="set" data="domain_name=$${domain}"/>
             <action application="transfer" data="1000 XML default"/>   // 分机振铃
             <!-- answer the call...if this is not run, the "echo" application will run in "early media" -->
            <action application="answer" data=""/>
            <!-- use the "echo" application to confirm there is 2 way audio.  Delay audio by 1s so that echo cancelers don't cause problems -->
            <action application="echo" data="1000"/>
        </condition>
    </extension>
</context>
       
==========================================
                      


5.2)在public.xml 中设置呼出规则:
==========================
 <extension name="outgoing_call">
        <condition field="destination_number" expression="^1111$" break="never">
           <action application="export" data="sip_h_X-Freetdm-ANI=9999"/> // 透传 ANI 号码
            <action application="bridge" data="sofia/external/${destination_number}@192.168.1.109:5062"/> // 呼出到sangoma SS7
        </condition>
    </extension>
 ====================
       
    
6)测试呼叫
6.1)从外部呼入,呼叫号码为1111,走到相应的路由,日志为:
2014-10-19 16:57:00.634832 [CONSOLE] switch_core.c:2219
[This app Best viewed at 160x60 or more..]
2014-10-19 16:57:00.635316 [ERR] switch_console.c:113 Keybind  is invalid, range is from 1 to 12
freeswitch@ibm> 2014-10-19 16:58:06.772239 [CONSOLE] mod_voicemail.c:4066 Event Thread Started
2014-10-19 16:58:16.752239 [NOTICE] switch_channel.c:1055 New Channel sofia/internal/200@192.168.1.109 [a5fe6ebe-57d2-11e4-9b36-73686695fec4]
2014-10-19 16:58:16.792239 [INFO] mod_dialplan_xml.c:558 Processing 200 <200>->1111 in context from-NSG
2014-10-19 16:58:16.792239 [INFO] mod_dptools.c:1628 Incoming call from NSG on span=wp1
2014-10-19 16:58:16.792239 [NOTICE] switch_ivr.c:1844 Transfer sofia/internal/200@192.168.1.109 to XML[1000@default]
2014-10-19 16:58:16.792239 [INFO] mod_dialplan_xml.c:558 Processing 200 <200>->1000 in context default
2014-10-19 16:58:16.792239 [CRIT] mod_dptools.c:1628 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2014-10-19 16:58:16.792239 [CRIT] mod_dptools.c:1628 Open /usr/local/freeswitch/conf/vars.xml and change the default_password.
2014-10-19 16:58:16.792239 [CRIT] mod_dptools.c:1628 Once changed type 'reloadxml' at the console.
2014-10-19 16:58:16.792239 [CRIT] mod_dptools.c:1628 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2014-10-19 16:58:26.792239 [INFO] switch_ivr_async.c:3658 Bound B-Leg: *1 execute_extension::dx XML features
2014-10-19 16:58:26.792239 [INFO] switch_ivr_async.c:3658 Bound B-Leg: *2 record_session::/usr/local/freeswitch/recordings/200.2014-10-19-16-58-26.wav
2014-10-19 16:58:26.792239 [INFO] switch_ivr_async.c:3658 Bound B-Leg: *3 execute_extension::cf XML features
2014-10-19 16:58:26.792239 [INFO] switch_ivr_async.c:3658 Bound B-Leg: *4 execute_extension::att_xfer XML features
2014-10-19 16:58:26.812247 [NOTICE] switch_channel.c:1055 New Channel sofia/internal/sip:1000@192.168.1.103:58804 [abfcb546-57d2-11e4-9b5b-73686695fec4]
2014-10-19 16:58:26.952240 [NOTICE] sofia.c:6668 Ring-Ready sofia/internal/sip:1000@192.168.1.103:58804!
2014-10-19 16:58:26.972239 [INFO] switch_ivr_originate.c:1192 Sending early media
2014-10-19 16:58:26.972239 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/200@192.168.1.109!
2014-10-19 16:58:28.492239 [NOTICE] sofia.c:7425 Channel [sofia/internal/sip:1000@192.168.1.103:58804


6.2) 从内部分机1000拨打1111,呼出日志:
freeswitch@ibm>
freeswitch@ibm> 2014-10-19 17:11:55.492240 [NOTICE] switch_channel.c:1055 New Channel sofia/internal/1000@192.168.1.210 [8e011742-57d4-11e4-9b70-73686695fec4]
2014-10-19 17:11:55.492240 [INFO] mod_dialplan_xml.c:558 Processing 1000 <1000>->1111 in context public
2014-10-19 17:11:55.492240 [NOTICE] switch_channel.c:1055 New Channel sofia/external/1111@192.168.1.109:5062 [8e01ac0c-57d4-11e4-9b78-73686695fec4]
2014-10-19 17:11:55.832242 [INFO] sofia.c:1203 sofia/external/1111@192.168.1.109:5062 Update Callee ID to "1111"
2014-10-19 17:11:55.832242 [NOTICE] sofia.c:6668 Ring-Ready sofia/external/1111@192.168.1.109:5062!
2014-10-19 17:11:55.852243 [NOTICE] mod_sofia.c:2077 Ring-Ready sofia/internal/1000@192.168.1.210!
2014-10-19 17:11:55.852243 [NOTICE] switch_ivr_originate.c:527 Ring Ready sofia/internal/1000@192.168.1.210!
2014-10-19 17:11:58.432241 [INFO] sofia.c:1203 sofia/external/1111@192.168.1.109:5062 Update Callee ID to "Outbound Call"
2014-10-19 17:11:58.452241 [NOTICE] sofia.c:7425 Channel [sofia/external/1111@192.168.1.109:5062] has been answered
2014-10-19 17:11:58.452241 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/1000@192.168.1.210!
2014-10-19 17:11:58.452241 [NOTICE] switch_ivr_originate.c:3494 Channel [sofia/internal/1000@192.168.1.210] has been answered
2014-10-19 17:12:16.572238 [NOTICE] sofia.c:952 Hangup sofia/internal/1000@192.168.1.210 [CS_EXECUTE] [NORMAL_CLEARING]
2014-10-19 17:12:16.572238 [NOTICE] switch_ivr_bridge.c:754 Hangup sofia/external/1111@192.168.1.109:5062 [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]
2014-10-19 17:12:16.592239 [NOTICE] switch_core_session.c:1633 Session 6 (sofia/external/1111@192.168.1.109:5062) Ended
2014-10-19 17:12:16.592239 [NOTICE] switch_core_session.c:1637 Close Channel sofia/external/1111@192.168.1.109:5062 [CS_DESTROY]
2014-10-19 17:12:16.592239 [NOTICE] switch_core_session.c:1633 Session 5 (sofia/internal/1000@192.168.1.210) Ended
2014-10-19 17:12:16.592239 [NOTICE] switch_core_session.c:1637 Close Channel sofia/internal/1000@192.168.1.210 [CS_DESTROY]



鲜花

握手

雷人

路过

鸡蛋
关闭

站长推荐上一条 /1 下一条

手机版|VoIP88 ( 粤ICP备11095982号   填写您的邮件地址,订阅我们的精彩内容:

GMT+8, 2017-9-22 17:39 , Processed in 0.277223 second(s), 24 queries .

Powered by VoIP88

© 2001-2017 VoIP88

返回顶部