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

VoIP88

james.zhu 发表于 2014-6-9 16:59 | 显示全部楼层 |阅读模式
FreeSWITCH +Sangoma W400 GSM语音卡

必要安装支持包:软件包
  • Wanpipe driver >= 7.0.5
[size=13.63636302947998px]      Download here: [size=13.63636302947998px]wanpipe-win-7.0.10.0.zip
  • Freeswitch binary for windows
[size=13.63636302947998px]      Download here: [size=13.63636302947998px]fs-libwat.zip
  • Libwat library for windows (included in above fs-libwat.zip file)
  • FreeTdm binary for windows (included in above fs-libwat.zip file)
硬件
  • W400 卡
  • SIM 卡
创建在windows 系统安装 Sangoma GSM asterisk 卡
[size=13.63636302947998px]Execute command "wanrouter.exe hwprobe" will list all the W400 car and ports installed on the system. This gives a reliable overview of how many cards physically installed.
设置GSM 端口
[size=13.63636302947998px]Sometimes wanpipe driver is incrementing port index, which may cause freeswitch/freetdm configuration invalid to physical port index. Run command "wanrouter.exe reset_port_numbers" in system administrator's privilege to  reset port index. This ensure port index starts from 1.
卸载 wanpipe 驱动
[size=13.63636302947998px]In command line, type "wanrouter.exe unload" to completely stop wanpipe driver. It requires administrator's privilege to execute this command. The executable file is located under system32 directory.


配置GSM 板卡配置文件Wanpipe configuration:
[size=13.63636302947998px]wanpipe conf file is located under C:/Sangoma. The wanpipe configuration for W400 for the first port looks like:
[size=13.63636302947998px][devices]
wanpipe1 = WAN_AFT_GSM, Comment

[interfaces]
w1g1 = wanpipe1, , TDM_CHAN_VOICE_API, Comment

[wanpipe1]
CARD_TYPE       = AFT_GSM
S514CPU         = A
CommPort        = PRI
AUTO_PCISLOT    = NO
PCISLOT         = 4
PCIBUS          = 5
FE_MEDIA        = GSM
FE_LINE         = 1
TDMV_LAW        = MULAW
MTU             = 1500
UDPPORT         = 9000
TDMV_SPAN       = 1

[w1g1]
ACTIVE_CH       = ALL
MTU             = 16

[size=13.63636302947998px]For other wanpipe ports, change wanpipe1 => wanpipeX and w1g1 => wXg1. FE_LINE = X and TDMV_SPAN = X accordingly. Note that PCISLOT and PCIBUS number varies on each system. PCISLOT number and PCIBUS number can be verified in device manager:
[size=13.63636302947998px]For example, the second port's configuration looks like:
[size=13.63636302947998px][devices]
wanpipe2 = WAN_AFT_GSM, Comment

[interfaces]
w2g1 = wanpipe2, , TDM_CHAN_VOICE_API, Comment

[wanpipe2]
CARD_TYPE       = AFT_GSM
S514CPU         = A
CommPort        = PRI
AUTO_PCISLOT    = NO
PCISLOT         = 4
PCIBUS          = 5
FE_MEDIA        = GSM
FE_LINE         = 2
TDMV_LAW        = MULAW
MTU             = 1500
UDPPORT         = 9000
TDMV_SPAN       = 2

[w2g1]
ACTIVE_CH       = ALL
MTU             = 16
[size=13.63636302947998px]
[size=13.63636302947998px]Be noted that each port needs a separate wanpipeX.conf.
Freetdm 配置
[size=13.63636302947998px]To use W400 card in freeswitch, only freetdm related configuration needs to be properly configured.
  • Freetdm.conf
[size=13.63636302947998px][span wanpipe wanpipe1]
group => 1
trunk_type => GSM

b-channel => 1:1
d-channel => 1:2

[span wanpipe wanpipe2]
group => 1
trunk_type => GSM

b-channel => 2:1
d-channel => 2:2

[span wanpipe wanpipe3]
group => 1
trunk_type => GSM

b-channel => 3:1
d-channel => 3:2

[span wanpipe wanpipe4]
group => 1
trunk_type => GSM

b-channel => 4:1
d-channel => 4:2
[size=13.63636302947998px]List all the ports which are expected to be used in this file. Freetdm look for wanpipe W400 ports inside this file to open wanpipe driver's ports accordingly. wanpipe1 in [span wanpipe wanpipe1]is the wanpipe device name configured in driver's wanpipe1.conf. Make sure this mapping is properly set.
[size=13.63636302947998px]Please be noted that b-channel is always before d-channel in the config file.
  • Freetdm.conf.xml
[size=13.63636302947998px]In autoload_configs directory, freetdm.conf.xml is actually the part of GSM/libwat signaling configuration.
[size=13.63636302947998px]<?xml version="1.0"?>
<settings>
    <param name="debug" value="1"/>
</settings>
[size=13.63636302947998px]<analog_spans> </analog_spans>
<r2_spans> </r2_spans>
<sangoma_pri_spans> </sangoma_pri_spans>
<pritap_spans> </pritap_spans>

<gsm_spans>
    <span name="wanpipe1">
        <param name="context" value="default"/>
        <param name="dialplan" value="XML"/>
    </span>
    <span name="wanpipe2">
        <param name="context" value="default"/>
        <param name="dialplan" value="XML"/>
    </span>
    <span name="wanpipe3">
        <param name="context" value="default"/>
        <param name="dialplan" value="XML"/>
    </span>
    <span name="wanpipe4">
        <param name="context" value="default"/>
        <param name="dialplan" value="XML"/>
    </span>
</gsm_spans>
</configuration>
[size=13.63636302947998px]That's it!
[size=13.63636302947998px]执行加载命令 "wanrouter.exe load", then "wanrouter.exe start wanpipe1", "wanrouter.exe start wanpipe2", "wanrouter.exe start wanpipe3", ....... of all the wanpipe ports configured (start manually for the first time and driver will automatically start these ports aferwards).

[size=13.63636302947998px]Physically on W400 card, there are 4 LED indicating the port status. If a port has been started properly, the according LED will start blinking. It's always good to check the LED status after wanpipe has been started.


启动freeswitch 和 mod_freetdm
[size=13.63636302947998px]Run "FreeSwitchConsole.exe" to start Freeswitch.
[size=13.63636302947998px]Under freeswitch command line, execute "load mod_freetdm" if freetdm is not configured to start automatically.
[size=13.63636302947998px]To check port status, under freeswitch console , run "ftdm gsm status 1" to check wanpipe1's signaling status. If signaling is ready for use, it shows like:

[size=13.63636302947998px]freeswitch@win7-32-gsm-dev> ftdm gsm status 1

[size=13.63636302947998px]Span 1 (wanpipe1):
[size=13.63636302947998px]CHIP type - Telit (GC864-QUAD-V2), revision 10.00.053, serial  359551030293590
[size=13.63636302947998px]SIM - Subscriber type TELEPHONE, imsi 302720407395792
[size=13.63636302947998px]Subscriber - Number +16472677949, Plan international, validity ISDN
[size=13.63636302947998px]Network - status Registered Home, Area Code 0,  Cell ID 0, Operator ROGERS

[size=13.63636302947998px]+OK.


测试呼叫测试呼叫
[size=13.63636302947998px]在 freeswitch console, 运行 "originate freetdm/1/1/2187562789 &echo" to make call and echo back the voice to the callee. 2187562789 is the phone number to dial. Replace phone number with a real one you want to call.
发送 SMS
[size=13.63636302947998px]Under freeswitch console, run:  "ftdm gsm sms 1 2187562789  test james gsm card" to send out message. I this command, 1 is the span number 2187562789  is the cell phone number you want to SMS to.
LED 状态显示
[size=13.63636302947998px]W400's LED has meaning of card status as below:
  • Off: 端口没有启动
  • 快闪 (period 1s, ton 0.5s): 寻找网络,或SIM卡没有注册,或者在处理状态.
  • 慢闪 (period 3s, Ton 0.3s): 已经注册.
  • On: call is active.





阿凤隔举 发表于 2016-5-24 08:33 | 显示全部楼层
的确好帖子,推荐加精华











feijipiaoyuding.com/  4399ai67k7kn94.com/  tehranmusic313.com/  feijipiaodinggouwang.com/
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

关闭

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

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

GMT+8, 2017-7-26 00:38 , Processed in 0.186549 second(s), 28 queries .

Powered by VoIP88

© 2001-2017 Goode.古德云企

快速回复 返回顶部 返回列表