[Freeswitch-users] sangoma a101: can't load freetdm module

Nikolay Kondratyev kond at nstel.ru
Fri Jan 21 13:58:54 MSK 2011


I loaded mod_freetdm.
The problem was in permissions on /dev/wanpipe* files. 
I run frreeswitch as non root user. When i gave him rw access to /dev/wanpipe* files module is loaded.
Thanks to google and list archive - http://lists.freeswitch.org/pipermail/freeswitch-users/2010-February/054359.html.
Rgds, Nikolay.


  _____  

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Nikolay Kondratyev
Sent: Friday, January 21, 2011 10:44 AM
To: 'FreeSWITCH Users Help'
Subject: [Freeswitch-users] sangoma a101: can't load freetdm module


Hi all, 
 
i have a problem with A101 sangoma pri card.
I spent couple of days trying to make it work but alas...
 
My problem is that i can't load mod_freetdm module.
I'm sure i'm doing something wrong, but i can't find out what is my mistake...
So.. please help to solve the problem...
 
I setup my test system according to http://wiki.freeswitch.org/wiki/FreeTDM
I use freeswitch 1.0.7, wanpipe 3.5.18 and libsng_isdn-7.0.0.
 
 
wanrouter can see the card:
 
[root at sipx4 conf]# wanrouter hwprobe
-------------------------------
| Wanpipe Hardware Probe Info |
-------------------------------
1 . AFT-A101-SH : SLOT=4 : BUS=8 : IRQ=177 : CPU=A : PORT=1 : HWEC=32 : V=37
Card Cnt: A101-2=1
 
[root at sipx4 conf]# wanrouter status
Devices currently active:
        wanpipe1
Wanpipe Config:
Device name | Protocol Map | Adapter  | IRQ | Slot/IO | If's | CLK | Baud rate |
wanpipe1    | N/A          | A101/1D/A102/2D/4/4D/8| 177 | 4       | 1    | N/A | 0         |
Wanrouter Status:
Device name | Protocol | Station | Status        |
wanpipe1    | AFT TE1  | N/A     | Connected     |
 
Here is my config files:
 
[root at sipx4 conf]# cat /etc/wanpipe/wanpipe1.conf
#================================================
# WANPIPE1 Configuration File
#================================================
#
# Date: Wed Dec  6 20:29:03 UTC 2006
#
# Note: This file was generated automatically
#       by /usr/local/sbin/setup-sangoma program.
#
#       If you want to edit this file, it is
#       recommended that you use wancfg program
#       to do so.
#================================================
# Sangoma Technologies Inc.
#================================================
 
[devices]
wanpipe1 = WAN_AFT_TE1, Comment
 
[interfaces]
w1g1 = wanpipe1, , TDM_VOICE_API, Comment
 
[wanpipe1]
CARD_TYPE       = AFT
S514CPU         = A
CommPort        = PRI
AUTO_PCISLOT    = NO
PCISLOT         = 4
PCIBUS          = 8
FE_MEDIA        = E1
FE_LCODE        = HDB3
FE_FRAME        = CRC4
FE_LINE         = 1
TE_CLOCK        = MASTER
TE_REF_CLOCK    = 0
TE_SIG_MODE     = CCS
TE_HIGHIMPEDANCE        = NO
TE_RX_SLEVEL    = 430
LBO             = 120OH
FE_TXTRISTATE   = NO
MTU             = 1500
UDPPORT         = 9000
TTL             = 255
IGNORE_FRONT_END        = NO
TDMV_SPAN               = 1
TDMV_DCHAN              = 16
TE_AIS_MAINTENANCE = NO         #NO: defualt  YES: Start port in AIS Blue Alarm and keep line down
                                #wanpipemon -i w1g1 -c Ttx_ais_off to disable AIS maintenance mode
                                                                #wanpipemon -i w1g1 -c Ttx_ais_on to enable AIS maintenance mode
TDMV_HW_DTMF            = YES           # YES: receive dtmf events from hardware
TDMV_HW_FAX_DETECT              = YES           # YES: receive fax 1100hz events from hardware
HWEC_OPERATION_MODE     = OCT_NORMAL    # OCT_NORMAL: echo cancelation enabled with nlp (default)
                                                                                # OCT_SPEECH: improves software tone detection by disabling NLP (echo possible)
                                                                                # OCT_NO_ECHO:disables echo cancelation but allows VQE/tone functions.
HWEC_DTMF_REMOVAL       = NO    # NO: default  YES: remove dtmf out of incoming media (must have hwdtmf enabled)
HWEC_NOISE_REDUCTION    = NO    # NO: default  YES: reduces noise on the line - could break fax
HWEC_ACUSTIC_ECHO       = NO    # NO: default  YES: enables acustic echo cancelation
HWEC_NLP_DISABLE        = NO    # NO: default  YES: guarantees software tone detection (possible echo)
HWEC_TX_AUTO_GAIN       = 0     # 0: disable   -40-0: default tx audio level to be maintained (-20 default)
HWEC_RX_AUTO_GAIN       = 0     # 0: disable   -40-0: default tx audio level to be maintained (-20 default)
HWEC_TX_GAIN            = 0             # 0: disable   -24-24: db values to be applied to tx signal
HWEC_RX_GAIN            = 0             # 0: disable   -24-24: db values to be applied to tx signal
 
[w1g1]
ACTIVE_CH       = ALL
TDMV_HWEC       = YES
MTU             = 80
[root at sipx4 conf]#

[root at sipx4 conf]# cat /usr/local/freeswitch-107/conf/wanpipe.conf  (i installed FS into /usr/local/freeswitch-107)
[defaults]
codec_ms => 20
wink_ms => 150
flash_ms => 750

[root at sipx4 conf]# cat /usr/local/freeswitch-107/conf/freetdm.conf
[span wanpipe wp1]
trunk_type => e1
group=1
b-channel => 1:1-15
b-channel => 1:17-31
d-channel => 1:16

[root at sipx4 conf]# cat /usr/local/freeswitch-107/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}"/>-->
    <!--<param name="enable-analog-option" value="call-swap"/>-->
    <!--<param name="enable-analog-option" value="3-way"/>-->
  </settings>
                <config_profiles>
                <profile name="my_pri_nt_1">
                        <param name="switchtype" value="euroisdn" />
                        <param name="interface" value="net"/>
                </profile>
                </config_profiles>
        <sangoma_pri_spans>
                <span name="wp1" cfgprofile="my_pri_nt_1">
                        <param name="dialplan" value="XML"/>
                        <param name="context" value="default"/>
                </span>
        </sangoma_pri_spans>
        <analog_spans>
        </analog_spans>
</configuration>
[root at sipx4 conf]#

The other side of the E1  connection is mediant 2000 E1 port. Mediant shows d-channel alarm.
 
And here is what i got in the log, when tried to load module:
[freeswitch107 at sipx4 log]$ cat freeswitch.log.2011-01-21-10-24-01.1
2011-01-21 10:23:15.775934 [NOTICE] mod_logfile.c:158 New log started.
2011-01-21 10:23:57.495838 [INFO] mod_enum.c:808 ENUM Reloaded
2011-01-21 10:23:57.495838 [INFO] switch_time.c:954 Timezone reloaded 530 definitions
2011-01-21 10:23:57.495838 [DEBUG] ftdm_config.c:52 New mod directory: /usr/local/freeswitch-107/mod
2011-01-21 10:23:57.495838 [DEBUG] ftdm_config.c:58 New config directory: /usr/local/freeswitch-107/conf
2011-01-21 10:23:57.495838 [DEBUG] ftdm_sched.c:154 Initializing scheduling API
2011-01-21 10:23:57.495838 [DEBUG] ftdm_sched.c:251 Created schedule freetdm-master
2011-01-21 10:23:57.495838 [NOTICE] ftdm_sched.c:178 Launching main schedule thread
2011-01-21 10:23:57.495838 [DEBUG] ftdm_sched.c:187 Running schedule freetdm-master in the main schedule thread
2011-01-21 10:23:57.495838 [DEBUG] ftdm_config.c:80 Configuration file is /usr/local/freeswitch-107/conf/modules.conf.
2011-01-21 10:23:57.495838 [NOTICE] ftdm_io.c:5731 Modules configured: 1
2011-01-21 10:23:57.495838 [DEBUG] ftdm_config.c:80 Configuration file is /usr/local/freeswitch-107/conf/freetdm.conf.
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4676 Reading FreeTDM configuration file
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4692 found config for span
2011-01-21 10:23:57.495838 [INFO] ftdm_io.c:4976 Loading IO from /usr/local/freeswitch-107/mod/ftmod_wanpipe.so [wanpipe]
2011-01-21 10:23:57.495838 [DEBUG] ftdm_config.c:80 Configuration file is /usr/local/freeswitch-107/conf/wanpipe.conf.
2011-01-21 10:23:57.495838 [INFO] ftdm_io.c:800 Auto-loaded I/O module 'wanpipe'
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4706 created span 1 (wp1) of type wanpipe
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4722 span 1 [trunk_type]=[e1]
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4727 setting trunk type to 'E1'
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4722 span 1 [group]=[1]
2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4722 span 1 [b-channel]=[1:1-15]
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 1
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 2
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 3
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 4
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 5
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 6
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 7
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 8
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 9
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 10
2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 11
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 12
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 13
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 14
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 15
2011-01-21 10:23:57.497841 [ERR] ftdm_io.c:4623 1:Failed to configure span2011-01-21 10:23:57.497841 [DEBUG] ftdm_io.c:4722 span 1 [b-channel]=[1:17-31]
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 17
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 18
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 19
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 20
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 21
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 22
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 23
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 24
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 25
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 26
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 27
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 28
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 29
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 30
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 31
2011-01-21 10:23:57.497841 [ERR] ftdm_io.c:4623 1:Failed to configure span2011-01-21 10:23:57.497841 [DEBUG] ftdm_io.c:4722 span 1 [d-channel]=[1:16]
2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel 16
2011-01-21 10:23:57.497841 [ERR] ftdm_io.c:4623 1:Failed to configure span2011-01-21 10:23:57.497841 [INFO] ftdm_io.c:4901 Configured 0 channel(s)
2011-01-21 10:23:57.497841 [ERR] ftdm_io.c:5741 FreeTDM global configuration failed!
2011-01-21 10:23:57.497841 [ERR] mod_freetdm.c:4181 Error configuring FreeTDM
2011-01-21 10:23:57.497841 [CRIT] switch_loadable_module.c:928 Error Loading module /usr/local/freeswitch-107/mod/mod_freetdm.so
**Module load routine returned an error**
2011-01-21 10:23:57.597841 [NOTICE] ftdm_sched.c:147 Main scheduling thread going out ...
[freeswitch107 at sipx4 log]$

Can anybody please help with the problem?
I'm ready to provide additional info if needed.
 
Thanks and regards,
Nikolay.
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110121/d40d38d3/attachment-0001.html 


More information about the FreeSWITCH-users mailing list