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

VoIP88

toasterisk 发表于 2015-1-8 11:41 | 显示全部楼层 |阅读模式
Linux/FreeSwitch/FreeTDM/Sangoma安装

目录 [显示]

介绍
本文章介绍如何在FreeSWITCH linux 环境下安装配置Sangoma A200/A400。本例中使用了A400的2FXO 板卡,可以拓展到24 口。 现在我们介绍如何安装Sangoma wanpile 驱动,FreeTDM,FreeSWITCH,并且介绍如何配置相关的文件,和如何做简单的呼叫路由规则。
准备工作下载安装Sangoma 板卡驱动 wanpipe安装板卡之前使用系统命令lspci -vvv 是否检测到板卡05:04.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card        Subsystem: NEC Corporation Device 1300        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <ERR- INTx-        Latency: 255 (1250ns min, 3750ns max)        Interrupt: pin A routed to IRQ 185        Region 0: Memory at f7200000 (32-bit, non-prefetchable) [size=64K]
如果系统命令没有检测到sangoma 板卡,把卡拔出来,重新清理板卡金手指部分,重新固定在PCI 插槽。
下载最新Sangoma 板卡驱动wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-current.tgz解压压缩包tar xfz wanpipe-current.tgzcd wanpipe-<version>.tgz编译板卡驱动和freetdm
执行编译安装命令
make freetdmmake install下载安装配置FreeSWITCH安装Centos 支持包yum install expat-devel openssl-devel libtiff-devel libX11-devel unixODBC-devel libssl-devel python-devel \                 zlib-devel libzrtpcpp-devel alsa-lib-devel libogg-devel libvorbis-devel perl-libs gdbm-devel \                 libdb-devel uuid-devel @development-tools
安装git 以后,使用git 安装
安装FreeSWITCHgit clone git://git.freeswitch.org/freeswitch.git  cd freeswitch  ./bootstrap.sh
编译前,添加freetdm 模块,编辑modules.conf 文件,注释掉libs/freetdm/mod_freetdm 模块,保存文件。 执行
./configure makemake installmake all install cd-sounds-install cd-moh-install // 安装 语音文件 和语音等待文件配置Sangoma 板卡
执行 /usr/sbin/wancfg_fs 命令,启动配置脚本,通过选项来一步步配置板卡
[root@localhost sbin]# wancfg_fs#########################################################################                          Sangoma Wanpipe                                  ##        Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script             ##                             v2.39                                    ##                     Sangoma Technologies Inc.                        ##                        Copyright(c) 2013.                            #########################################################################Would you like to change FreeSWITCH Configuration Directory?Default: /usr/local/freeswitch/conf1. NO2. YES[1-2, ENTER='NO']:1  // 选择默认安装目录-------------------------------------------------------Configuring T1/E1 cards [A101/A102/A104/A108/A116/T116]-------------------------------------------------------No Sangoma ISDN T1/E1 cards detectedPress any key to continue:-------------------------------------------Configuring ISDN BRI cards [A500/B500/B700]-------------------------------------------No Sangoma ISDN BRI cards detectedPress any key to continue:------------------------------------Configuring GSM cards [W400]------------------------------------No Sangoma GSM cards detectedPress any key to continue:------------------------------------Configuring analog cards [A200/A400/B600/B610/B700/B800]-----------------------------------------------------------------------------------------------A400 detected on slot:4 bus:3-----------------------------------------------------------Would you like to configure AFT-400 on slot:4 bus:31. YES2. NO[1-2]:1   // 选择yesWhich codec will be used?1. MULAW - North America2. ALAW - Europe[1-2]:2  // ALAWWhich Operation Mode will be used?1. FCC2. TBR213. AUSTRALIA[1-3, ENTER='FCC']: 1   // 无中国制式,暂时选择FCC。 如果修改到中国制式,修改/etc/wanpipe/wanpipe1.conf 文件 的 TDMV_OPERMODE   = CHINAPress any key to continue:AFT-400 configured on slot:4 bus:3 span:1Analog card configuration completePress any key to continue:------------------------------------Configuring USB devices [U100]------------------------------------####################################################################                             SUMMARY                             ####################################################################  0 T1/E1 port(s) detected, 0 configured  0 ISDN BRI port(s) detected, 0 configured  1 analog card(s) detected, 1 configured  0 GSM card(s) detected, 0 configured  0 usb device(s) detected, 0 configuredConfigurator will create the following files:        1. Wanpipe config files in /etc/wanpipe        2. freetdm config file /usr/local/freeswitch/conf/freetdm.conf        3. freetdm_xml config file /usr/local/freeswitch/conf/freetdm.conf.xmlYour configuration has been saved in /etc/wanpipe/debug-2013-07-31.tgz.When requesting support, email this file to techdesk@sangoma.com###################################################################Configuration Complete! Please select following:1. YES - Continue2. NO - Exit[1-2]:1  // 选择继续Wanpipe configuration complete: choose action1. Save cfg: Stop Wanpipe now2. Do not save cfg: Exit[1-2]:1  // 选择立即停止wanpipesh: asterisk: command not foundsh: asterisk: command not foundStopping Wanpipe...Removing old configuration files...Copying new Wanpipe configuration files...Copying new freetdm configuration files (/usr/local/freeswitch/conf/freetdm.conf)...Copying new freetdm configuration files (/usr/local/freeswitch/conf/autoload_configs/freetdm.conf.xml)...Wanrouter start complete...Current boot level is 3Wanrouter boot scripts configuration...Removing existing wanrouter boot scripts...OKWould you like wanrouter to start on system boot?1. YES2. NO[1-2]:1   // 选择系统自动启动Verifying Zaptel boot scripts...Enabling wanrouter boot scripts ...(level:8)Enabling wanrouter shutdown scripts ...(level:91)Sangoma cards configuration complete, exiting...[root@localhost sbin]# rebootBroadcast message from root (pts/1) (Wed Jul 31 20:13:04 2013):The system is going down for reboot NOW![root@localhost sbin]#检测板卡硬件
执行以下命令,检查板卡状态,如果用户购买的是带硬件回声的卡,显示HWEC=32
[root@localhost ~]# wanrouter hwprobe-------------------------------| Wanpipe Hardware Probe Info |-------------------------------1 . AFT-A400-SH : SLOT=4 : BUS=3 : IRQ=5 : CPU=A : PORT=PRI : HWEC=0 : V=11Sangoma Card Count: A200=1[root@localhost ~]#[root@localhost bin]# wanrouter statusDevices currently active:        wanpipe1Wanpipe Configevice name | Protocol Map | Adapter  | IRQ | Slot/IO | If's | CLK | Baud rate |wanpipe1    | N/A          | A200/A400/B600/B700/B800/B610| 169 | 4       | 1    | N/A | 0         |Wanrouter Statusevice name | Protocol | Station | Status        |wanpipe1    | A-ANALOG | N/A     | Connected     |[root@localhost bin]#检查配置freetdm.conf文件
这是FreeTDM 配置文件.这里的举例说安装的2FXO/2FXS
编辑:/usr/local/freeSWITCH/conf/freetdm.conf 文件
[span wanpipe FXS]name => freetdmtrunk_type => fxsgroup => grp1fxs-channel => 1:1number => 200  // 设置FXS 分机号码trunk_type => fxsgroup => grp1fxs-channel => 1:2[span wanpipe FXO]name => freetdmtrunk_type => fxogroup => grp2fxo-channel => 1:3trunk_type => fxogroup => grp2fxo-channel => 1:4number =>89700910  // PSTN 模拟线路的号码编辑freetdm.conf.xml 和tone.conf 文件
autoload_configs/freetdm.conf.xml
<configuration name="freetdm.conf" description="FreeTDM Configuration">  <settings>    <param name="debug" value="0"/>    <param name="hold-music" value="$${moh_uri}"/>  </settings>  <!-- one entry here per freetdm span -->   <analog_spans>                <span name="FXO">                        <!--<param name="hold-music" value="$${moh_uri}"/>-->                        <param name="dialplan" value="XML"/>                        <param name="context" value="public"/>                         <!-- regex to stop dialing when it matches -->                        <!--<param name="dial-regex" value="5555"/>-->                        <!-- regex to stop dialing when it does not match -->                        <!--<param name="fail-dial-regex" value="^5"/>-->                        <param name="tonegroup" value="cn"/>  // 设置中国振铃制式                       <param name="enable_callerid" value="true"/>                </span>                <span name="FXS">                        <!--<param name="hold-music" value="$${moh_uri}"/>-->                        <param name="dialplan" value="XML"/>                        <param name="context" value="default"/>                         <!-- regex to stop dialing when it matches -->                        <!--<param name="dial-regex" value="5555"/>-->                        <!-- regex to stop dialing when it does not match -->                        <!--<param name="fail-dial-regex" value="^5"/>-->                </span>        </analog_spans> </configuration>
在 /usr/local/freeswitch/conf/tones.conf 文件中添加支持中国忙音,拨号音
[cn]generate-dial => v=-7;%(1000,0,450)detect-dial => 450generate-ring => v=-7;%(1000,4000,460)detect-ring => 460generate-busy => v=-7;%(350,350,460)detect-busy => 460generate-attn => v=0;%(100,100,1400,2060,2450,2600)detect-attn => 460generate-callwaiting-sas => v=0;%(300,0,440)detect-callwaiting-sas => 460generate-callwaiting-cas => v=0;%(80,0,2750,2130)detect-callwaiting-cas => 460detect-fail1 => 913.8detect-fail2 => 1370.6detect-fail3 => 1776.7在默认的FreeSWITCH 启动模块中添加添加freetdm 模块
编辑文件 vi /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml 删除注释,确认freetdm 模块已经被添加
<load module="mod_freetdm"/>检查ftdm 模块加载状态
运行 fs_cli 命令,进入到freeSWITCH CLI,显示的是2FXO 和2FXS 状态
freeswitch@internal> ftdm listfreeswitch@localhost.localdomain> ftdm list+OKspan: 1 (FXS)type: analogphysical_status: oksignaling_status: UPchan_count: 2dialplan: XMLcontext: defaultdial_regex:fail_dial_regex:hold_music:analog_options: none+OKspan: 2 (FXO)type: analogphysical_status: oksignaling_status: UPchan_count: 2dialplan: XMLcontext: publicdial_regex:fail_dial_regex:hold_music:analog_options: none// 检查模拟板卡 span 2 上面的端口 2freeswitch@localhost.localdomain> ftdm dump 2 2span_id: 2chan_id: 2physical_span_id: 1physical_chan_id: 4physical_status: okphysical_status_red: 0physical_status_yellow: 0physical_status_rai: 0physical_status_blue: 0physical_status_ais: 0physical_status_general: 0signaling_status: UPtype: FXOstate: DOWNlast_state: DOWNtxgain: 0.00rxgain: 0.00cid_date:cid_name:cid_num:ani:aniII:dnis:rdnis:cause: NONEsession: (none)-- States --                   -- Function --                 -- Location --                 -- Time Offset --RING  => HANGUP                [channel_on_hangup]            [mod_freetdm.c:590]            0msHANGUP => DOWN                 [ftdm_analog_channel_run]      [ftmod_analog.c:562]           515msDOWN  => DIALING               [analog_fxo_outgoing_call]     [ftmod_analog.c:62]            161968msDIALING => UP                  [ftdm_analog_channel_run]      [ftmod_analog.c:509]           7900msUP    => HANGUP                [channel_on_hangup]            [
确认freetdm 模块已经加载。
设置呼入路由规则呼入路由设置
修改拨号规则的配置文件 dialplan/public/00_inbound_did.xml,修改成如下例子,任何从外线呼入的号码转到FXS 端口1。
<include>  <extension name="public_did">    <condition field="destination_number" expression="^(.*)$">      <!--          If you're hosting multiple domains you will want to set the          target_domain on these calls so they hit the proper domain after you          transfer the caller into the default context.          $${domain} is the default domain set from vars.xml but you can set it          to any domain you have setup in your user directory.      -->      <action application="set" data="domain_name=$${domain}"/>      <!-- This example maps the DID 5551212 to ring 1000 in the default context -->      <action application="bridge" data="freetdm/1/1"/>   // 这里是让呼入的来电转到板卡端口 span 1 上面的端口1    </condition>  </extension></include>
此设置会让一个FXO 线路呼入的电话转接到FXS span 1 的端口1.通过打印信息可以看到呼入来电的具体流程。这里仅显示部分日志信息。 如果用户没有FXS 模块,可以添加一个SIP帐号,让呼入的电话transfer到SIP分机。当然用户必须做相应的呼叫路由添加。
OK console log level set to DEBUGfreeswitch@localhost.localdomain> 2015-01-08 03:26:29.088388 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_START] in state [DOWN]2015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:1027 [s2c2][1:4] Changed state from DOWN to GET_CALLERID2015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:437 [s2c2][1:4] ANALOG CHANNEL thread starting. //启动通道事件线程2015-01-08 03:26:29.088388 [DEBUG] ftmod_wanpipe.c:749 [s2c2][1:4] Enabled DTMF events  // 开启DTMF 检测事件2015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:457 [s2c2][1:4] Initialized DTMF detection2015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from DOWN to GET_CALLERID in 0 ms2015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for GET_CALLERID2015-01-08 03:26:29.088388 [DEBUG] ftmod_analog.c:780 [s2c2][1:4] Initializing cid data!  // 获得来电显示的电话号码数据,然后解析2015-01-08 03:26:29.108388 [DEBUG] ftmod_wanpipe.c:1002 [s2c2][1:4] First packet read stats: Rx queue len: 0, Rx queue size: 102015-01-08 03:26:30.188392 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 192015-01-08 03:26:30.188392 [DEBUG] ftmod_wanpipe.c:1566 [s2c2][1:4] Got polarity reverse2015-01-08 03:26:30.188392 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [POLARITY_REVERSE] in state [GET_CALLERID]2015-01-08 03:26:30.188392 [DEBUG] ftmod_analog.c:1139 [s2c2][1:4] Ignoring polarity reversal because this channel is not configured for it2015-01-08 03:26:30.208389 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:30.208389 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_STOP] in state [GET_CALLERID]2015-01-08 03:26:30.208389 [DEBUG] ftmod_analog.c:1163 [s2c2][1:4] Ignoring event [RING_STOP] in state [GET_CALLERID]2015-01-08 03:26:31.288389 [DEBUG] ftdm_io.c:4158 FSK: TYPE DATETIME LEN 8 VAL [01010043]  // 获得来电显示的类型 此处是FSK 类型2015-01-08 03:26:31.288389 [DEBUG] ftdm_io.c:4158 FSK: TYPE PHONE_NUM LEN 11 VAL [18665301040]   // 获得电话号码2015-01-08 03:26:31.288389 [DEBUG] ftmod_analog.c:495 [s2c2][1:4] Changed state from GET_CALLERID to RING2015-01-08 03:26:31.308392 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from GET_CALLERID to RING in 20 ms2015-01-08 03:26:31.308392 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for RING2015-01-08 03:26:31.308392 [DEBUG] mod_freetdm.c:2262 got FXO sig 2:2 [START]2015-01-08 03:26:31.308392 [DEBUG] ftmod_wanpipe.c:749 [s2c2][1:4] Enabled DTMF events2015-01-08 03:26:31.308392 [DEBUG] mod_freetdm.c:403 Set codec PCMA 20ms2015-01-08 03:26:31.308392 [DEBUG] mod_freetdm.c:1899 Connect inbound channel FreeTDM/2:2/2015-01-08 03:26:31.308392 [NOTICE] switch_channel.c:1054 New Channel FreeTDM/2:2/ [158b9e5a-96a3-11e4-9f88-1571e7432ade]2015-01-08 03:26:31.308392 [DEBUG] mod_freetdm.c:2102 (FreeTDM/2:2/) State Change CS_NEW -> CS_INIT2015-01-08 03:26:31.308392 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/ [BREAK]2015-01-08 03:26:31.308392 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/) Running State Change CS_INIT2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/2:2/) State INIT2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:430 (FreeTDM/2:2/) State Change CS_INIT -> CS_ROUTING2015-01-08 03:26:31.328548 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/ [BREAK]2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/2:2/) State INIT going to sleep2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/) Running State Change CS_ROUTING2015-01-08 03:26:31.328548 [DEBUG] switch_channel.c:2178 (FreeTDM/2:2/) Callstate Change DOWN -> RINGING2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/2:2/) State ROUTING2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:453 FreeTDM/2:2/ CHANNEL ROUTING2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:456 [s2c2][1:4] Indicating PROCEED in state RING2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:164 FreeTDM/2:2/ Standard ROUTING2015-01-08 03:26:31.328548 [INFO] mod_dialplan_xml.c:558 Processing unknown <18665301040>-> in context publicDialplan: FreeTDM/2:2/ parsing [public->unloop] continue=falseDialplan: FreeTDM/2:2/ Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-falseDialplan: FreeTDM/2:2/ Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-falseDialplan: FreeTDM/2:2/ parsing [public->outside_call] continue=trueDialplan: FreeTDM/2:2/ Absolute Condition [outside_call]Dialplan: FreeTDM/2:2/ Action set(outside_call=true) Dialplan: FreeTDM/2:2/ Action export(RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}) Dialplan: FreeTDM/2:2/ parsing [public->call_debug] continue=trueDialplan: FreeTDM/2:2/ Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=neverDialplan: FreeTDM/2:2/ parsing [public->public_extensions] continue=falseDialplan: FreeTDM/2:2/ Regex (FAIL) [public_extensions] destination_number() =~ /^(10[01][0-9])$/ break=on-falseDialplan: FreeTDM/2:2/ parsing [public->public_did] continue=falseDialplan: FreeTDM/2:2/ Regex (PASS) [public_did] destination_number() =~ /^(.*)$/ break=on-falseDialplan: FreeTDM/2:2/ Action set(domain_name=192.168.1.221) Dialplan: FreeTDM/2:2/ Action bridge(freetdm/1/1)  // 匹配到呼入的流程,转接到第一个FXS 口2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:214 (FreeTDM/2:2/) State Change CS_ROUTING -> CS_EXECUTE2015-01-08 03:26:31.328548 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/ [BREAK]2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/2:2/) State ROUTING going to sleep2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/) Running State Change CS_EXECUTE2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:530 (FreeTDM/2:2/) State EXECUTE2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:473 FreeTDM/2:2/ CHANNEL EXECUTE2015-01-08 03:26:31.328548 [DEBUG] switch_core_state_machine.c:256 FreeTDM/2:2/ Standard EXECUTEEXECUTE FreeTDM/2:2/ set(outside_call=true)2015-01-08 03:26:31.328548 [DEBUG] mod_dptools.c:1435 FreeTDM/2:2/ SET [outside_call]=[true]EXECUTE FreeTDM/2:2/ export(RFC2822_DATE=Thu, 08 Jan 2015 03:26:31 +0800)2015-01-08 03:26:31.328548 [DEBUG] switch_channel.c:1246 EXPORT (export_vars) [RFC2822_DATE]=[Thu, 08 Jan 2015 03:26:31 +0800]EXECUTE FreeTDM/2:2/ set(domain_name=192.168.1.221)2015-01-08 03:26:31.328548 [DEBUG] mod_dptools.c:1435 FreeTDM/2:2/ SET [domain_name]=[192.168.1.221]EXECUTE FreeTDM/2:2/ bridge(freetdm/1/1)2015-01-08 03:26:31.328548 [DEBUG] switch_channel.c:1200 FreeTDM/2:2/ EXPORTING[export_vars] [RFC2822_DATE]=[Thu, 08 Jan 2015 03:26:31 +0800] to event2015-01-08 03:26:31.328548 [DEBUG] switch_ivr_originate.c:2078 Parsing global variables2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:403 Set codec PCMA 20ms2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:1251 Connect outbound channel FreeTDM/1:1/2015-01-08 03:26:31.328548 [NOTICE] switch_channel.c:1054 New Channel FreeTDM/1:1/ [158ccb54-96a3-11e4-9f90-1571e7432ade]2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:1260 (FreeTDM/1:1/) State Change CS_NEW -> CS_INIT2015-01-08 03:26:31.328548 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/ [BREAK]2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:1279 Attached session 158ccb54-96a3-11e4-9f90-1571e7432ade to channel 1:12015-01-08 03:26:31.328548 [DEBUG] ftmod_analog.c:83 [s1c1][1:1] Changed state from DOWN to GENRING2015-01-08 03:26:31.328548 [DEBUG] ftmod_analog.c:437 [s1c1][1:1] ANALOG CHANNEL thread starting.2015-01-08 03:26:31.328548 [DEBUG] ftmod_wanpipe.c:749 [s1c1][1:1] Enabled DTMF events2015-01-08 03:26:31.328548 [DEBUG] ftmod_analog.c:457 [s1c1][1:1] Initialized DTMF detection2015-01-08 03:26:31.328548 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from DOWN to GENRING in 0 ms2015-01-08 03:26:31.328548 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for GENRING2015-01-08 03:26:31.328548 [DEBUG] mod_freetdm.c:2372 got FXS sig [PROGRESS]2015-01-08 03:26:31.328548 [NOTICE] mod_freetdm.c:2389 Ring-Ready FreeTDM/1:1/!2015-01-08 03:26:31.328548 [DEBUG] switch_channel.c:3271 (FreeTDM/1:1/) Callstate Change DOWN -> RINGING2015-01-08 03:26:31.348387 [DEBUG] ftmod_wanpipe.c:1002 [s1c1][1:1] First packet read stats: Rx queue len: 0, Rx queue size: 102015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/) Running State Change CS_INIT2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/1:1/) State INIT2015-01-08 03:26:31.828393 [DEBUG] mod_freetdm.c:430 (FreeTDM/1:1/) State Change CS_INIT -> CS_ROUTING2015-01-08 03:26:31.828393 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/ [BREAK]2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/1:1/) State INIT going to sleep2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/) Running State Change CS_ROUTING2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/1:1/) State ROUTING2015-01-08 03:26:31.828393 [DEBUG] mod_freetdm.c:453 FreeTDM/1:1/ CHANNEL ROUTING2015-01-08 03:26:31.828393 [DEBUG] switch_ivr_originate.c:67 (FreeTDM/1:1/) State Change CS_ROUTING -> CS_CONSUME_MEDIA2015-01-08 03:26:31.828393 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/ [BREAK]2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/1:1/) State ROUTING going to sleep2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/) Running State Change CS_CONSUME_MEDIA2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:542 (FreeTDM/1:1/) State CONSUME_MEDIA2015-01-08 03:26:31.828393 [DEBUG] switch_core_state_machine.c:542 (FreeTDM/1:1/) State CONSUME_MEDIA going to sleep2015-01-08 03:26:31.828393 [DEBUG] switch_core_session.c:907 Send signal FreeTDM/2:2/ [BREAK]2015-01-08 03:26:31.828393 [NOTICE] switch_ivr_originate.c:527 Ring Ready FreeTDM/2:2/!2015-01-08 03:26:31.828393 [NOTICE] switch_ivr_originate.c:527 Ring-Ready FreeTDM/2:2/!2015-01-08 03:26:34.108389 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:34.108389 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_START] in state [RING]2015-01-08 03:26:34.828393 [DEBUG] ftmod_wanpipe.c:938 [s1c1][1:1] First packet write stats: Tx queue len: 1, Tx queue size: 5, Tx idle: 35002015-01-08 03:26:35.228392 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:35.228392 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_STOP] in state [RING]2015-01-08 03:26:35.228392 [DEBUG] ftmod_analog.c:1163 [s2c2][1:4] Ignoring event [RING_STOP] in state [RING]2015-01-08 03:26:39.068389 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:39.068389 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_START] in state [RING]2015-01-08 03:26:40.228407 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:40.228407 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_STOP] in state [RING]2015-01-08 03:26:40.228407 [DEBUG] ftmod_analog.c:1163 [s2c2][1:4] Ignoring event [RING_STOP] in state [RING]2015-01-08 03:26:44.068392 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:44.068392 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_START] in state [RING]2015-01-08 03:26:45.208392 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 72015-01-08 03:26:45.208392 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [RING_STOP] in state [RING]2015-01-08 03:26:45.208392 [DEBUG] ftmod_analog.c:1163 [s2c2][1:4] Ignoring event [RING_STOP] in state [RING]2015-01-08 03:26:47.328392 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 52015-01-08 03:26:47.328392 [DEBUG] ftmod_wanpipe.c:1461 [s1c1][1:1] Got wanpipe OFFHOOK2015-01-08 03:26:47.328392 [DEBUG] ftmod_wanpipe.c:1684 [s1c1][1:1] Ignoring event for now2015-01-08 03:26:47.468392 [DEBUG] ftmod_wanpipe.c:1641 [s1c1][1:1] Diff since last event = 151 ms, delivering OFFHOOK now2015-01-08 03:26:47.468392 [DEBUG] ftmod_analog.c:999 [s1c1][1:1] Received event [OFFHOOK] in state [GENRING]2015-01-08 03:26:47.468392 [DEBUG] ftmod_analog.c:1087 [s1c1][1:1] Changed state from GENRING to UP2015-01-08 03:26:47.488390 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from GENRING to UP in 8 ms2015-01-08 03:26:47.488390 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for UP2015-01-08 03:26:47.488390 [DEBUG] mod_freetdm.c:2372 got FXS sig [UP]2015-01-08 03:26:47.488390 [DEBUG] switch_channel.c:3629 Send signal FreeTDM/2:2/ [BREAK]2015-01-08 03:26:47.488390 [NOTICE] mod_freetdm.c:2379 Channel [FreeTDM/1:1/] has been answered  // 对FXO 2 呼入的通话应答2015-01-08 03:26:47.488390 [DEBUG] switch_channel.c:3683 (FreeTDM/1:1/) Callstate Change RINGING -> ACTIVE2015-01-08 03:26:47.488390 [DEBUG] ftmod_wanpipe.c:749 [s1c1][1:1] Enabled DTMF events2015-01-08 03:26:47.488390 [DEBUG] mod_freetdm.c:1053 [s2c2][1:4] Indicating ANSWER in state RING2015-01-08 03:26:47.488390 [DEBUG] mod_freetdm.c:1053 [s2c2][1:4] Changed state from RING to PROGRESS2015-01-08 03:26:47.488390 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from RING to PROGRESS in 9 ms2015-01-08 03:26:47.488390 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for PROGRESS2015-01-08 03:26:47.488390 [DEBUG] ftmod_wanpipe.c:982 [s2c2][1:4] Rx Queue length exceeded 80% threshold (9/10)2015-01-08 03:26:47.488390 [DEBUG] mod_freetdm.c:1053 [s2c2][1:4] Changed state from PROGRESS to PROGRESS_MEDIA2015-01-08 03:26:47.488390 [DEBUG] ftmod_wanpipe.c:982 [s2c2][1:4] Rx Queue length exceeded 80% threshold (8/10)2015-01-08 03:26:47.488390 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from PROGRESS to PROGRESS_MEDIA in 0 ms设置呼出路由规则呼出路由设置
修改呼出设置文件 dialplan/default.xml file, 添加一段呼叫规则,使用模拟分机 FXS 1 拨打100 号码,通过span 2 的FXO 2 呼出到测试号码。
  < <extension name="freetdm.example.com">    <condition field="destination_number" expression="^(100)$">    <action application="tone_detect" data="busy 450 r 0 hangup 'normal_clearing' 3"/>    <action application="bridge" data="freetdm/2/2/018665301040"/> // 呼出测试    </condition>  </extension>
以上设置可以通过FXS 模拟分机博打100,然后呼出到一个测试的手机号码。当然用户也可以注册一个SIP分机,修改拨号规则做进一步测试。
reeswitch@localhost.localdomain> freeswitch@localhost.localdomain> 2015-01-08 03:38:44.448393 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 52015-01-08 03:38:44.448393 [DEBUG] ftmod_wanpipe.c:1461 [s1c1][1:1] Got wanpipe OFFHOOK // 获得摘机相应事件2015-01-08 03:38:44.448393 [DEBUG] ftmod_wanpipe.c:1684 [s1c1][1:1] Ignoring event for now2015-01-08 03:38:44.588387 [DEBUG] ftmod_wanpipe.c:1641 [s1c1][1:1] Diff since last event = 151 ms, delivering OFFHOOK now2015-01-08 03:38:44.588387 [DEBUG] ftmod_analog.c:999 [s1c1][1:1] Received event [OFFHOOK] in state [DOWN]2015-01-08 03:38:44.588387 [DEBUG] ftmod_analog.c:1092 [s1c1][1:1] Changed state from DOWN to DIALTONE2015-01-08 03:38:44.588387 [DEBUG] ftmod_analog.c:437 [s1c1][1:1] ANALOG CHANNEL thread starting.2015-01-08 03:38:44.588387 [DEBUG] ftmod_wanpipe.c:749 [s1c1][1:1] Enabled DTMF events2015-01-08 03:38:44.588387 [DEBUG] ftmod_analog.c:457 [s1c1][1:1] Initialized DTMF detection2015-01-08 03:38:44.588387 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from DOWN to DIALTONE in 0 ms2015-01-08 03:38:44.588387 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for DIALTONE2015-01-08 03:38:44.608387 [DEBUG] ftmod_wanpipe.c:1002 [s1c1][1:1] First packet read stats: Rx queue len: 0, Rx queue size: 102015-01-08 03:38:44.608387 [DEBUG] ftmod_wanpipe.c:938 [s1c1][1:1] First packet write stats: Tx queue len: 1, Tx queue size: 5, Tx idle: 202015-01-08 03:38:45.928392 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 32015-01-08 03:38:46.008394 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 32015-01-08 03:38:46.008394 [DEBUG] ftmod_wanpipe.c:1546 [s1c1][1:1] Queuing wanpipe DTMF: 12015-01-08 03:38:46.008394 [DEBUG] ftdm_io.c:3778 [s1c1][1:1] Queuing DTMF 1 (debug = 0)2015-01-08 03:38:46.028391 [DEBUG] ftmod_analog.c:828 [s1c1][1:1] Changed state from DIALTONE to COLLECT2015-01-08 03:38:46.028391 [DEBUG] mod_freetdm.c:2372 got FXS sig [COLLECTED_DIGIT]2015-01-08 03:38:46.028391 [DEBUG] mod_freetdm.c:2542 got DTMF sig [1]2015-01-08 03:38:46.048393 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from DIALTONE to COLLECT in 20 ms2015-01-08 03:38:46.048393 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for COLLECT2015-01-08 03:38:46.628392 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 32015-01-08 03:38:46.688392 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 32015-01-08 03:38:46.688392 [DEBUG] ftmod_wanpipe.c:1546 [s1c1][1:1] Queuing wanpipe DTMF: 02015-01-08 03:38:46.688392 [DEBUG] ftdm_io.c:3778 [s1c1][1:1] Queuing DTMF 0 (debug = 0)2015-01-08 03:38:46.688392 [DEBUG] mod_freetdm.c:2372 got FXS sig [COLLECTED_DIGIT]2015-01-08 03:38:46.688392 [DEBUG] mod_freetdm.c:2542 got DTMF sig [10]2015-01-08 03:38:46.848392 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 32015-01-08 03:38:46.928391 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 32015-01-08 03:38:46.928391 [DEBUG] ftmod_wanpipe.c:1546 [s1c1][1:1] Queuing wanpipe DTMF: 02015-01-08 03:38:46.928391 [DEBUG] ftdm_io.c:3778 [s1c1][1:1] Queuing DTMF 0 (debug = 0)2015-01-08 03:38:46.928391 [DEBUG] mod_freetdm.c:2372 got FXS sig [COLLECTED_DIGIT]2015-01-08 03:38:46.928391 [DEBUG] mod_freetdm.c:2542 got DTMF sig [100]2015-01-08 03:38:48.948392 [DEBUG] ftmod_analog.c:849 [s1c1][1:1] Number obtained [100]2015-01-08 03:38:48.948392 [DEBUG] ftmod_analog.c:850 [s1c1][1:1] Changed state from COLLECT to RING2015-01-08 03:38:48.968392 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from COLLECT to RING in 19 ms2015-01-08 03:38:48.968392 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for RING2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:2372 got FXS sig [START]2015-01-08 03:38:48.968392 [DEBUG] ftmod_wanpipe.c:749 [s1c1][1:1] Enabled DTMF events2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:403 Set codec PCMA 20ms2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:1899 Connect inbound channel FreeTDM/1:1/1002015-01-08 03:38:48.968392 [NOTICE] switch_channel.c:1054 New Channel FreeTDM/1:1/100 [cd39358e-96a4-11e4-9f95-1571e7432ade]2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:2102 (FreeTDM/1:1/100) State Change CS_NEW -> CS_INIT2015-01-08 03:38:48.968392 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/100) Running State Change CS_INIT2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/1:1/100) State INIT2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:430 (FreeTDM/1:1/100) State Change CS_INIT -> CS_ROUTING2015-01-08 03:38:48.968392 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/1:1/100) State INIT going to sleep2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/100) Running State Change CS_ROUTING2015-01-08 03:38:48.968392 [DEBUG] switch_channel.c:2178 (FreeTDM/1:1/100) Callstate Change DOWN -> RINGING2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/1:1/100) State ROUTING2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:453 FreeTDM/1:1/100 CHANNEL ROUTING2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:456 [s1c1][1:1] Indicating PROCEED in state RING2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:164 FreeTDM/1:1/100 Standard ROUTING2015-01-08 03:38:48.968392 [INFO] mod_dialplan_xml.c:558 Processing freetdm <0000000000>->100 in context defaultDialplan: FreeTDM/1:1/100 parsing [default->freetdm.example.com] continue=falseDialplan: FreeTDM/1:1/100 Regex (PASS) [freetdm.example.com] destination_number(100) =~ /^(100)$/ break=on-falseDialplan: FreeTDM/1:1/100 Action tone_detect(busy 450 r 0 hangup 'normal_clearing' 3) Dialplan: FreeTDM/1:1/100 Action bridge(freetdm/2/2/018665301040) // 通过FXO 端口2 呼出2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:214 (FreeTDM/1:1/100) State Change CS_ROUTING -> CS_EXECUTE2015-01-08 03:38:48.968392 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/1:1/100) State ROUTING going to sleep2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/100) Running State Change CS_EXECUTE2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:530 (FreeTDM/1:1/100) State EXECUTE2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:473 FreeTDM/1:1/100 CHANNEL EXECUTE2015-01-08 03:38:48.968392 [DEBUG] switch_core_state_machine.c:256 FreeTDM/1:1/100 Standard EXECUTE2015-01-08 03:38:48.968392 [DEBUG] switch_core_session.c:2712 Application tone_detect Requires media! pre_answering channel FreeTDM/1:1/1002015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:1085 [s1c1][1:1] Indicating ANSWER in state RING2015-01-08 03:38:48.968392 [DEBUG] mod_freetdm.c:1085 [s1c1][1:1] Changed state from RING to PROGRESS2015-01-08 03:38:48.988462 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from RING to PROGRESS in 20 ms2015-01-08 03:38:48.988462 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for PROGRESS2015-01-08 03:38:48.988462 [DEBUG] mod_freetdm.c:1085 [s1c1][1:1] Changed state from PROGRESS to PROGRESS_MEDIA2015-01-08 03:38:49.008391 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from PROGRESS to PROGRESS_MEDIA in 19 ms2015-01-08 03:38:49.008391 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for PROGRESS_MEDIA2015-01-08 03:38:49.008391 [DEBUG] mod_freetdm.c:1085 [s1c1][1:1] Changed state from PROGRESS_MEDIA to UP2015-01-08 03:38:49.028394 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from PROGRESS_MEDIA to UP in 20 ms2015-01-08 03:38:49.028394 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for UP2015-01-08 03:38:49.028394 [DEBUG] mod_freetdm.c:2372 got FXS sig [UP]2015-01-08 03:38:49.028394 [NOTICE] mod_freetdm.c:2379 Channel [FreeTDM/1:1/100] has been answered2015-01-08 03:38:49.028394 [DEBUG] switch_channel.c:3683 (FreeTDM/1:1/100) Callstate Change RINGING -> ACTIVE2015-01-08 03:38:49.028394 [DEBUG] ftmod_wanpipe.c:749 [s1c1][1:1] Enabled DTMF events2015-01-08 03:38:49.028394 [DEBUG] switch_core_session.c:907 Send signal FreeTDM/1:1/100 [BREAK]EXECUTE FreeTDM/1:1/100 tone_detect(busy 450 r 0 hangup 'normal_clearing' 3)2015-01-08 03:38:49.028394 [NOTICE] mod_dptools.c:2070 Enabling tone detection 'busy' '450'2015-01-08 03:38:49.028394 [DEBUG] switch_ivr_async.c:3226 Adding tone spec 450 index 0 hits 32015-01-08 03:38:49.048392 [DEBUG] switch_core_media_bug.c:532 Attaching BUG to FreeTDM/1:1/100EXECUTE FreeTDM/1:1/100 bridge(freetdm/2/2/018665301040)2015-01-08 03:38:49.048392 [DEBUG] switch_channel.c:1767 (FreeTDM/1:1/100) Callstate Change ACTIVE -> RING_WAIT2015-01-08 03:38:49.048392 [DEBUG] switch_ivr_originate.c:2078 Parsing global variables2015-01-08 03:38:49.048392 [DEBUG] mod_freetdm.c:403 Set codec PCMA 20ms2015-01-08 03:38:49.048392 [DEBUG] mod_freetdm.c:1251 Connect outbound channel FreeTDM/2:2/0186653010402015-01-08 03:38:49.048392 [NOTICE] switch_channel.c:1054 New Channel FreeTDM/2:2/018665301040 [cd44a34c-96a4-11e4-9f9b-1571e7432ade]2015-01-08 03:38:49.048392 [DEBUG] mod_freetdm.c:1260 (FreeTDM/2:2/018665301040) State Change CS_NEW -> CS_INIT2015-01-08 03:38:49.048392 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:38:49.048392 [DEBUG] mod_freetdm.c:1279 Attached session cd44a34c-96a4-11e4-9f9b-1571e7432ade to channel 2:22015-01-08 03:38:49.048392 [DEBUG] ftmod_analog.c:62 [s2c2][1:4] Changed state from DOWN to DIALING2015-01-08 03:38:49.048392 [DEBUG] ftmod_analog.c:437 [s2c2][1:4] ANALOG CHANNEL thread starting.2015-01-08 03:38:49.048392 [DEBUG] ftmod_wanpipe.c:749 [s2c2][1:4] Enabled DTMF events2015-01-08 03:38:49.048392 [DEBUG] ftmod_analog.c:457 [s2c2][1:4] Initialized DTMF detection2015-01-08 03:38:49.048392 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from DOWN to DIALING in 0 ms2015-01-08 03:38:49.048392 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for DIALING2015-01-08 03:38:49.068389 [DEBUG] ftmod_wanpipe.c:1002 [s2c2][1:4] First packet read stats: Rx queue len: 0, Rx queue size: 102015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/018665301040) Running State Change CS_INIT2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/2:2/018665301040) State INIT2015-01-08 03:38:49.548394 [DEBUG] mod_freetdm.c:430 (FreeTDM/2:2/018665301040) State Change CS_INIT -> CS_ROUTING2015-01-08 03:38:49.548394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:507 (FreeTDM/2:2/018665301040) State INIT going to sleep2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/018665301040) Running State Change CS_ROUTING2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/2:2/018665301040) State ROUTING2015-01-08 03:38:49.548394 [DEBUG] mod_freetdm.c:453 FreeTDM/2:2/018665301040 CHANNEL ROUTING2015-01-08 03:38:49.548394 [DEBUG] switch_ivr_originate.c:67 (FreeTDM/2:2/018665301040) State Change CS_ROUTING -> CS_CONSUME_MEDIA2015-01-08 03:38:49.548394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:523 (FreeTDM/2:2/018665301040) State ROUTING going to sleep2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/018665301040) Running State Change CS_CONSUME_MEDIA2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:542 (FreeTDM/2:2/018665301040) State CONSUME_MEDIA2015-01-08 03:38:49.548394 [DEBUG] switch_core_state_machine.c:542 (FreeTDM/2:2/018665301040) State CONSUME_MEDIA going to sleep2015-01-08 03:38:49.568392 [DEBUG] ftmod_wanpipe.c:982 [s1c1][1:1] Rx Queue length exceeded 80% threshold (9/10)2015-01-08 03:38:49.568392 [DEBUG] switch_core_io.c:526 Setting BUG Codec PCMA:82015-01-08 03:38:49.568392 [DEBUG] ftmod_wanpipe.c:982 [s1c1][1:1] Rx Queue length exceeded 80% threshold (8/10)2015-01-08 03:38:49.568392 [DEBUG] ftmod_wanpipe.c:986 [s1c1][1:1] Rx Queue length reduced 80% threshold (7/10)2015-01-08 03:38:49.768393 [DEBUG] ftmod_analog.c:873 [s2c2][1:4] Detected tone DIAL on 2:22015-01-08 03:38:49.768393 [DEBUG] ftdm_io.c:3033 [s2c2][1:4] Created DTMF buffer2015-01-08 03:38:49.788393 [DEBUG] ftdm_io.c:3974 [s2c2][1:4] Generating DTMF [018665301040]2015-01-08 03:38:49.788393 [DEBUG] ftmod_wanpipe.c:938 [s2c2][1:4] First packet write stats: Tx queue len: 1, Tx queue size: 5, Tx idle: 7402015-01-08 03:38:55.368396 [DEBUG] ftmod_analog.c:509 [s2c2][1:4] Changed state from DIALING to UP2015-01-08 03:38:55.388395 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from DIALING to UP in 21 ms2015-01-08 03:38:55.388395 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for UP2015-01-08 03:38:55.388395 [DEBUG] mod_freetdm.c:2262 got FXO sig 2:2 [UP]2015-01-08 03:38:55.388395 [DEBUG] switch_channel.c:3629 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:38:55.388395 [NOTICE] mod_freetdm.c:2292 Channel [FreeTDM/2:2/018665301040] has been answered2015-01-08 03:38:55.388395 [DEBUG] switch_channel.c:3683 (FreeTDM/2:2/018665301040) Callstate Change DOWN -> ACTIVE2015-01-08 03:38:55.388395 [DEBUG] ftmod_wanpipe.c:749 [s2c2][1:4] Enabled DTMF events2015-01-08 03:38:55.388395 [DEBUG] switch_ivr_originate.c:3551 Originate Resulted in Success: [FreeTDM/2:2/018665301040]2015-01-08 03:38:55.388395 [DEBUG] switch_channel.c:1977 (FreeTDM/1:1/100) Callstate Change RING_WAIT -> ACTIVE2015-01-08 03:38:55.388395 [DEBUG] switch_core_session.c:907 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:38:55.388395 [DEBUG] switch_core_session.c:907 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:38:55.388395 [DEBUG] switch_ivr_bridge.c:1460 (FreeTDM/2:2/018665301040) State Change CS_CONSUME_MEDIA -> CS_EXCHANGE_MEDIA2015-01-08 03:38:55.388395 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:38:55.388395 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/018665301040) Running State Change CS_EXCHANGE_MEDIA2015-01-08 03:38:55.388395 [DEBUG] switch_core_state_machine.c:533 (FreeTDM/2:2/018665301040) State EXCHANGE_MEDIA2015-01-08 03:38:55.388395 [DEBUG] mod_freetdm.c:675 CHANNEL EXCHANGE_MEDIA2015-01-08 03:38:55.388395 [DEBUG] switch_core_session.c:969 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:38:55.388395 [DEBUG] switch_core_session.c:969 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:39:04.368392 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 192015-01-08 03:39:04.368392 [DEBUG] ftmod_wanpipe.c:1566 [s2c2][1:4] Got polarity reverse2015-01-08 03:39:04.368392 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [POLARITY_REVERSE] in state [UP]2015-01-08 03:39:04.368392 [DEBUG] ftmod_analog.c:1139 [s2c2][1:4] Ignoring polarity reversal because this channel is not configured for it2015-01-08 03:39:08.708395 [DEBUG] ftmod_wanpipe.c:1677 [s2c2][1:4] read wanpipe event 192015-01-08 03:39:08.708395 [DEBUG] ftmod_wanpipe.c:1566 [s2c2][1:4] Got polarity reverse2015-01-08 03:39:08.708395 [DEBUG] ftmod_analog.c:999 [s2c2][1:4] Received event [POLARITY_REVERSE] in state [UP]2015-01-08 03:39:08.708395 [DEBUG] ftmod_analog.c:1139 [s2c2][1:4] Ignoring polarity reversal because this channel is not configured for it2015-01-08 03:39:09.688391 [DEBUG] ftmod_wanpipe.c:1677 [s1c1][1:1] read wanpipe event 52015-01-08 03:39:09.688391 [DEBUG] ftmod_wanpipe.c:1461 [s1c1][1:1] Got wanpipe ONHOOK2015-01-08 03:39:09.688391 [DEBUG] ftmod_wanpipe.c:1684 [s1c1][1:1] Ignoring event for now2015-01-08 03:39:10.448394 [DEBUG] ftmod_wanpipe.c:1660 [s1c1][1:1] Diff since last event = 752 ms, delivering ONHOOK now2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:999 [s1c1][1:1] Received event [ONHOOK] in state [UP]2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:1052 [s1c1][1:1] Changed state from UP to DOWN2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:638 [s1c1][1:1] Completed state change from UP to DOWN in 4 ms2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:644 [s1c1][1:1] Executing state handler on 1:1 for DOWN2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:2372 got FXS sig [STOP]2015-01-08 03:39:10.448394 [NOTICE] mod_freetdm.c:2464 Hangup FreeTDM/1:1/100 [CS_EXECUTE] [NORMAL_CLEARING]2015-01-08 03:39:10.448394 [DEBUG] switch_channel.c:3216 Send signal FreeTDM/1:1/100 [KILL]2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] ftdm_io.c:3180 [s1c1][1:1] DTMF debug is already disabled2015-01-08 03:39:10.448394 [DEBUG] ftdm_io.c:3212 [s1c1][1:1] No need to disable input dump2015-01-08 03:39:10.448394 [DEBUG] ftdm_io.c:3243 [s1c1][1:1] No need to disable output dump2015-01-08 03:39:10.448394 [DEBUG] ftdm_io.c:6800 Cleared call with id 32015-01-08 03:39:10.448394 [DEBUG] ftdm_io.c:2985 [s1c1][1:1] channel done2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:972 [s1c1][1:1] ANALOG CHANNEL 1:1 thread ended.2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:578 FreeTDM/1:1/100 ending bridge by request from write function2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:659 BRIDGE THREAD DONE [FreeTDM/2:2/018665301040]2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:689 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:39:10.448394 [NOTICE] switch_ivr_bridge.c:753 Hangup FreeTDM/2:2/018665301040 [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]2015-01-08 03:39:10.448394 [DEBUG] switch_channel.c:3216 Send signal FreeTDM/2:2/018665301040 [KILL]2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:533 (FreeTDM/2:2/018665301040) State EXCHANGE_MEDIA going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/018665301040) Running State Change CS_HANGUP2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:730 (FreeTDM/2:2/018665301040) Callstate Change ACTIVE -> HANGUP2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:732 (FreeTDM/2:2/018665301040) State HANGUP2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:544 [2:2] FreeTDM/2:2/018665301040 CHANNEL HANGUP ENTER2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:590 [s2c2][1:4] Changed state from UP to HANGUP2015-01-08 03:39:10.448394 [WARNING] ftdm_io.c:4286 [s1c1][1:1] cannot read from channel that is not open2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:796 Failed to read from dead channel FreeTDM/1:1/100 device 1:12015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:584 FreeTDM/1:1/100 ending bridge by request from read function2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:659 BRIDGE THREAD DONE [FreeTDM/1:1/100]2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:689 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:1558 FreeTDM/2:2/018665301040 skip receive message [UNBRIDGE] (channel is hungup already)2015-01-08 03:39:10.448394 [DEBUG] switch_ivr_bridge.c:1561 FreeTDM/1:1/100 skip receive message [UNBRIDGE] (channel is hungup already)2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:2875 FreeTDM/1:1/100 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:530 (FreeTDM/1:1/100) State EXECUTE going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/100) Running State Change CS_HANGUP2015-01-08 03:39:10.448394 [DEBUG] switch_core_media_bug.c:780 Removing BUG from FreeTDM/1:1/1002015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:730 (FreeTDM/1:1/100) Callstate Change ACTIVE -> HANGUP2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:732 (FreeTDM/1:1/100) State HANGUP2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:544 [1:1] FreeTDM/1:1/100 CHANNEL HANGUP ENTER2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:569 Device [1:1] is no longer attached to FreeTDM/1:1/100. Nothing to do.2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:643 [1:1] FreeTDM/1:1/100 CHANNEL HANGUP EXIT2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:58 FreeTDM/1:1/100 Standard HANGUP, cause: NORMAL_CLEARING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:732 (FreeTDM/1:1/100) State HANGUP going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:499 (FreeTDM/1:1/100) State Change CS_HANGUP -> CS_REPORTING2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/1:1/100) Running State Change CS_REPORTING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:818 (FreeTDM/1:1/100) State REPORTING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:102 FreeTDM/1:1/100 Standard REPORTING, cause: NORMAL_CLEARING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:818 (FreeTDM/1:1/100) State REPORTING going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:493 (FreeTDM/1:1/100) State Change CS_REPORTING -> CS_DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/1:1/100 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1614 Session 3 (FreeTDM/1:1/100) Locked, Waiting on external entities2015-01-08 03:39:10.448394 [NOTICE] switch_core_session.c:1632 Session 3 (FreeTDM/1:1/100) Ended2015-01-08 03:39:10.448394 [NOTICE] switch_core_session.c:1636 Close Channel FreeTDM/1:1/100 [CS_DESTROY]2015-01-08 03:39:10.448394 [DEBUG] ftdm_io.c:490 [s2c2][1:4] Enabling ec back on call end in channel state HANGUP2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from UP to HANGUP in 2 ms2015-01-08 03:39:10.448394 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for HANGUP2015-01-08 03:39:10.448394 [DEBUG] mod_freetdm.c:643 [2:2] FreeTDM/2:2/018665301040 CHANNEL HANGUP EXIT2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:58 FreeTDM/2:2/018665301040 Standard HANGUP, cause: NORMAL_CLEARING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:732 (FreeTDM/2:2/018665301040) State HANGUP going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:499 (FreeTDM/2:2/018665301040) State Change CS_HANGUP -> CS_REPORTING2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:467 (FreeTDM/2:2/018665301040) Running State Change CS_REPORTING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:618 (FreeTDM/1:1/100) Callstate Change HANGUP -> DOWN2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:818 (FreeTDM/2:2/018665301040) State REPORTING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:102 FreeTDM/2:2/018665301040 Standard REPORTING, cause: NORMAL_CLEARING2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:621 (FreeTDM/1:1/100) Running State Change CS_DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:818 (FreeTDM/2:2/018665301040) State REPORTING going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:631 (FreeTDM/1:1/100) State DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:109 FreeTDM/1:1/100 Standard DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:631 (FreeTDM/1:1/100) State DESTROY going to sleep2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:493 (FreeTDM/2:2/018665301040) State Change CS_REPORTING -> CS_DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1387 Send signal FreeTDM/2:2/018665301040 [BREAK]2015-01-08 03:39:10.448394 [DEBUG] switch_core_session.c:1614 Session 4 (FreeTDM/2:2/018665301040) Locked, Waiting on external entities2015-01-08 03:39:10.448394 [NOTICE] switch_core_session.c:1632 Session 4 (FreeTDM/2:2/018665301040) Ended2015-01-08 03:39:10.448394 [NOTICE] switch_core_session.c:1636 Close Channel FreeTDM/2:2/018665301040 [CS_DESTROY]2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:618 (FreeTDM/2:2/018665301040) Callstate Change HANGUP -> DOWN2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:621 (FreeTDM/2:2/018665301040) Running State Change CS_DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:631 (FreeTDM/2:2/018665301040) State DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:109 FreeTDM/2:2/018665301040 Standard DESTROY2015-01-08 03:39:10.448394 [DEBUG] switch_core_state_machine.c:631 (FreeTDM/2:2/018665301040) State DESTROY going to sleep2015-01-08 03:39:10.968392 [DEBUG] ftmod_analog.c:562 [s2c2][1:4] Changed state from HANGUP to DOWN2015-01-08 03:39:10.988392 [DEBUG] ftmod_analog.c:638 [s2c2][1:4] Completed state change from HANGUP to DOWN in 21 ms2015-01-08 03:39:10.988392 [DEBUG] ftmod_analog.c:644 [s2c2][1:4] Executing state handler on 2:2 for DOWN2015-01-08 03:39:10.988392 [DEBUG] ftdm_io.c:6169 [s2c2][1:4] Ignoring SIGEVENT_STOP since user already requested hangup2015-01-08 03:39:10.988392 [DEBUG] ftmod_analog.c:945 [s2c2][1:4] Going onhook2015-01-08 03:39:10.988392 [DEBUG] ftdm_io.c:3180 [s2c2][1:4] DTMF debug is already disabled2015-01-08 03:39:10.988392 [DEBUG] ftdm_io.c:3212 [s2c2][1:4] No need to disable input dump2015-01-08 03:39:10.988392 [DEBUG] ftdm_io.c:3243 [s2c2][1:4] No need to disable output dump2015-01-08 03:39:10.988392 [DEBUG] ftdm_io.c:6800 Cleared call with id 42015-01-08 03:39:10.988392 [DEBUG] ftdm_io.c:2985 [s2c2][1:4] channel done2015-01-08 03:39:10.988392 [DEBUG] ftmod_analog.c:972 [s2c2][1:4] ANALOG CHANNEL 2:2 thread ended.常见问题排查
1)板卡启动以后,模块的灯会自动显示不同的颜色:FXO 为红色,FXS 为绿色。方便辨认。
2)如何检测模拟板卡的摘挂机状态(onhook/offhook)和电压变化:wanpipemon -i w1g1 -c astats -m 1 // -i 代表接口,-c 代表 执行的命令,-m 代表 接口通道。这里检测到是接口1的通道1.这里显示的是我们板卡上的两个FXS(1,2)和两个FXO(3,4)的状态情况。
没有电话互相接听时代每个端口(1,2,3,4)的电压状态[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 1        ------- Voltage Status  (FXS,port 0) -------TIP     : - 5.6400 VoltsRING    : -54.5200 VoltsVBAT    : -63.5440 Volts[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 2        ------- Voltage Status  (FXS,port 1) -------TIP     : - 6.0160 VoltsRING    : -54.1440 VoltsVBAT    : -63.5440 Volts[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 3        ------- Voltage Status  (FXO,port 2) -------VOLTAGE : 1 Volts        ------- Line Status  (FXO,port 2) -------Line    : disconnected// 没有接电话线[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 4        ------- Voltage Status  (FXO,port 3) -------VOLTAGE : 47 Volts        ------- Line Status  (FXO,port 3) -------Line    : connected// 已经接连电话线
开始通话的状态,注意 端口1 和端口4,现在端口1(FXS)接听了端口4(FXO)的通话
[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 4        ------- Voltage Status  (FXO,port 3) -------VOLTAGE : 5 Volts  // 电压已经发生了变化        ------- Line Status  (FXO,port 3) -------Line    : connected[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 1        ------- Voltage Status  (FXS,port 0) -------TIP     : - 5.2640 VoltsRING    : -13.9120 Volts   VBAT    : -22.9360 Volts[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 2        ------- Voltage Status  (FXS,port 1) -------TIP     : - 6.0160 VoltsRING    : -54.1440 VoltsVBAT    : -63.5440 Volts[root@localhost ~]# wanpipemon -i w1g1 -c astats -m 3        ------- Voltage Status  (FXO,port 2) -------VOLTAGE : 0 Volts        ------- Line Status  (FXO,port 2) -------Line    : disconnected
3)如何检测硬件回声芯片的打印信息
wan_ec_client wanpipe1 stats_full 4[root@localhost ~]# wan_ec_client wanpipe1 stats_full 4wanpipe1: Running Get stats command to Echo Canceller device... Done!  wanpipe1: 4: Echo Channel Operation Mode                      : NORMAL  wanpipe1: 4: Enable Tone Disabler                                     : TRUE  wanpipe1: 4: Mute Ports                                       : NONE  wanpipe1: 4: Enable Extended Tone Detection                           : FALSE  wanpipe1: 4: Current Echo Return Loss                         : Invalid  wanpipe1: 4: Current Echo Return Loss Enhancement             : Invalid  wanpipe1: 4: Maximum value of the ERL                         : Invalid  wanpipe1: 4: Maximum value of the ERLE                        : Invalid  wanpipe1: 4: Number of Echo Path changes                      : 2  wanpipe1: 4: Current Echo Delay                               : Invalid  wanpipe1: 4: Maximum Echo Delay                               : Invalid  wanpipe1: 4: Tone Disabler Status                             : Enabled  wanpipe1: 4: Voice activity is detected on SIN port           : FALSE  wanpipe1: 4: Echo canceller has detected and converged        : FALSE  wanpipe1: 4: Average power of signal level on RIN             : -57 dBm0  wanpipe1: 4: Average power of signal level on SIN             : -66 dBm0  wanpipe1: 4: Current gain applied to signal level on RIN      : 0 dB  wanpipe1: 4: Current gain applied to signal level on SOUT     : 0 dB  wanpipe1: 4: Average power of the comfort noise injected      : -66 dBm0  wanpipe1: 4: (TDM) PCM Law type on SIN                        : ALAW  wanpipe1: 4: (TDM) TDM timeslot on SIN port                   : 1  wanpipe1: 4: (TDM) TDM stream on SIN port                     : 6  wanpipe1: 4: (TDM) PCM Law type on RIN                        : ALAW  wanpipe1: 4: (TDM) TDM timeslot on RIN port                   : 1  wanpipe1: 4: (TDM) TDM stream on RIN port                     : 4  wanpipe1: 4: (TDM) PCM Law type on SOUT                       : ALAW  wanpipe1: 4: (TDM) TDM timeslot on SOUT port                  : 1  wanpipe1: 4: (TDM) TDM stream on SOUT port                    : 7  wanpipe1: 4: (TDM) PCM Law type on ROUT                       : ALAW  wanpipe1: 4: (TDM) TDM timeslot on ROUT port                  : 1  wanpipe1: 4: (TDM) TDM stream on ROUT port                    : 5  wanpipe1: 4: (VQE) NLP status                                 : TRUE  wanpipe1: 4: (VQE) Enable Tail Displacement                   : FALSE  wanpipe1: 4: (VQE) Offset of the Echo Cancellation window (ms)        : 0  wanpipe1: 4: (VQE) Maximum tail length                        : 128 ms  wanpipe1: 4: (VQE) Rin Level control mode                     : TRUE  wanpipe1: 4: (VQE) Rin Control Signal gain                    : 0 dB  wanpipe1: 4: (VQE) Sout Level control mode                    : TRUE  wanpipe1: 4: (VQE) Sout Control Signal gain                   : 0 dB  wanpipe1: 4: (VQE) RIN Automatic Level Control                : FALSE  wanpipe1: 4: (VQE) RIN Target Level Control                   : -20 dBm0  wanpipe1: 4: (VQE) SOUT Automatic Level Control               : FALSE  wanpipe1: 4: (VQE) SOUT Target Level Control                  : -20 dBm0  wanpipe1: 4: (VQE) Comfort noise mode                         : NORMAL  wanpipe1: 4: (VQE) Remove any DTMF tone detection on SIN port : FALSE  wanpipe1: 4: (VQE) Acoustic Echo                              : FALSE  wanpipe1: 4: (VQE) Non Linearity Behavior A                   : 1  wanpipe1: 4: (VQE) Non Linearity Behavior B                   : 0  wanpipe1: 4: (VQE) Double Talk algorithm                      : NORMAL  wanpipe1: 4: (VQE) Default ERL (not converged)                : -6 dB  wanpipe1: 4: (VQE) Acoustic Echo Cancellation default ERL     : 0 dB  wanpipe1: 4: (VQE) Maximum Acoustic Echo tail length          : 128 ms  wanpipe1: 4: (VQE) Attenuation Level applied to the noise signal      : -18 dB  wanpipe1: 4: (VQE) Silence period before the re-activation of VQE features    : 1836 ms  wanpipe1: 4: (CODEC) Encoder channel port                     : SOUT  wanpipe1: 4: (CODEC) Encoder rate                             : G.711 64 kBps  wanpipe1: 4: (CODEC) Decoder channel port                     : RIN  wanpipe1: 4: (CODEC) Decoder rate                             : G.711 64 kBps[root@localhost ~]# wan_ec_client wanpipe1 statswanpipe1: Running Get stats command to Echo Canceller device... Done!****** Echo Canceller Chip Get Stats wanpipe1 ******  wanpipe1: Number of channels currently open                   4  wanpipe1: Number of conference bridges currently open         0  wanpipe1: Number of playout buffers currently loaded          0  wanpipe1: Number of framing error on H.100 bus                0  wanpipe1: Number of errors on H.100 clock CT_C8_A             0  wanpipe1: Number of errors on H.100 frame CT_FRAME_A          0  wanpipe1: Number of errors on H.100 clock CT_C8_B             0  wanpipe1: Number of internal read timeout errors              0  wanpipe1: Number of SDRAM refresh too late errors             0  wanpipe1: Number of PLL jitter errors                         0  wanpipe1: Number of HW tone event buffer has overflowed       0  wanpipe1: Number of SW tone event buffer has overflowed       0  wanpipe1: Number of SW Playout event buffer has overflowed    0
4) 如何关闭一个通道的回声抑制功能,开启回声抑制功能。如果用户不确定这些命令的使用结果,请不要进行以下操作。
wan_ec_client wanpipe1 mpd 1  // mpd 代表 Mode Power Downwan_ec_client wanpipe1 mn 1  // mn 代表 Mode Normal 模式wan_ec_client wanpipe1 msr 1 // msr 代表 Mode Speech Recognition 模式


您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

关闭

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

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

GMT+8, 2017-11-24 11:52 , Processed in 0.230692 second(s), 27 queries .

Powered by VoIP88

© 2001-2017 VoIP88

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