<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=140425110-21012011><FONT color=#0000ff
size=2 face=Arial>I loaded mod_freetdm.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140425110-21012011><FONT color=#0000ff
size=2 face=Arial>The problem was in permissions on /dev/wanpipe* files.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140425110-21012011><FONT color=#0000ff
size=2 face=Arial>I run frreeswitch as non root user. When i gave him rw access
to /dev/wanpipe* files module is loaded.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140425110-21012011><FONT color=#0000ff
size=2 face=Arial>Thanks to google and list archive - <A
href="http://lists.freeswitch.org/pipermail/freeswitch-users/2010-February/054359.html">http://lists.freeswitch.org/pipermail/freeswitch-users/2010-February/054359.html</A>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140425110-21012011><FONT color=#0000ff
size=2 face=Arial>Rgds, Nikolay.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <B>On Behalf Of
</B>Nikolay Kondratyev<BR><B>Sent:</B> Friday, January 21, 2011 10:44
AM<BR><B>To:</B> 'FreeSWITCH Users Help'<BR><B>Subject:</B> [Freeswitch-users]
sangoma a101: can't load freetdm module<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Hi all,
</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>i have a problem
with A101 sangoma pri card.</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>I spent couple of
days trying to make it work but alas...</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>My problem is that
i can't load mod_freetdm module.</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>I'm sure i'm doing
something wrong, but i can't find out what is my
mistake...</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>So.. please help
to solve the problem...</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>I setup my test
system according to <A
href="http://wiki.freeswitch.org/wiki/FreeTDM">http://wiki.freeswitch.org/wiki/FreeTDM</A></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>I use freeswitch
1.0.7, wanpipe 3.5.18 and libsng_isdn-7.0.0.</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>wanrouter can see
the card:</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[root@sipx4 conf]#
wanrouter hwprobe</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>-------------------------------<BR>| Wanpipe Hardware Probe Info
|<BR>-------------------------------<BR>1 . AFT-A101-SH : SLOT=4 : BUS=8 :
IRQ=177 : CPU=A : PORT=1 : HWEC=32 : V=37</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Card Cnt:
A101-2=1</FONT></SPAN></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[root@sipx4 conf]#
wanrouter status</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Devices currently
active:<BR>
wanpipe1</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Wanpipe
Config:</FONT></DIV>
<DIV><FONT size=2 face=Arial>Device name | Protocol Map | Adapter | IRQ
| Slot/IO | If's | CLK | Baud rate |<BR>wanpipe1 |
N/A |
A101/1D/A102/2D/4/4D/8| 177 | 4 |
1 | N/A | 0
|</FONT></DIV>
<DIV><FONT size=2 face=Arial>Wanrouter Status:</FONT></DIV>
<DIV><FONT size=2 face=Arial>Device name | Protocol | Station |
Status
|<BR>wanpipe1 | AFT TE1 | N/A
| Connected |</FONT></DIV>
<DIV></SPAN><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Here is my config
files:</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[root@sipx4 conf]#
cat
/etc/wanpipe/wanpipe1.conf<BR>#================================================<BR>#
WANPIPE1 Configuration
File<BR>#================================================<BR>#<BR># Date: Wed
Dec 6 20:29:03 UTC 2006<BR>#<BR># Note: This file was generated
automatically<BR># by
/usr/local/sbin/setup-sangoma
program.<BR>#<BR># If you want to edit
this file, it is<BR># recommended that you
use wancfg program<BR># to do
so.<BR>#================================================<BR># Sangoma
Technologies
Inc.<BR>#================================================</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>[devices]<BR>wanpipe1 = WAN_AFT_TE1, Comment</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>[interfaces]<BR>w1g1 = wanpipe1, , TDM_VOICE_API,
Comment</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>[wanpipe1]<BR>CARD_TYPE =
AFT<BR>S514CPU =
A<BR>CommPort =
PRI<BR>AUTO_PCISLOT =
NO<BR>PCISLOT =
4<BR>PCIBUS =
8<BR>FE_MEDIA =
E1<BR>FE_LCODE =
HDB3<BR>FE_FRAME =
CRC4<BR>FE_LINE =
1<BR>TE_CLOCK =
MASTER<BR>TE_REF_CLOCK =
0<BR>TE_SIG_MODE =
CCS<BR>TE_HIGHIMPEDANCE =
NO<BR>TE_RX_SLEVEL =
430<BR>LBO
= 120OH<BR>FE_TXTRISTATE =
NO<BR>MTU
= 1500<BR>UDPPORT =
9000<BR>TTL
= 255<BR>IGNORE_FRONT_END =
NO<BR>TDMV_SPAN
=
1<BR>TDMV_DCHAN
= 16<BR>TE_AIS_MAINTENANCE =
NO #NO: defualt YES:
Start port in AIS Blue Alarm and keep line
down<BR>
#wanpipemon -i w1g1 -c Ttx_ais_off to disable AIS maintenance
mode<BR>
#wanpipemon -i w1g1 -c Ttx_ais_on to enable AIS maintenance
mode<BR>TDMV_HW_DTMF
= YES # YES:
receive dtmf events from
hardware<BR>TDMV_HW_FAX_DETECT
= YES # YES:
receive fax 1100hz events from
hardware<BR>HWEC_OPERATION_MODE =
OCT_NORMAL # OCT_NORMAL: echo cancelation enabled with nlp
(default)<BR>
# OCT_SPEECH: improves software tone detection by disabling NLP (echo
possible)<BR>
# OCT_NO_ECHO:disables echo cancelation but allows VQE/tone
functions.<BR>HWEC_DTMF_REMOVAL =
NO # NO: default YES: remove dtmf out of incoming
media (must have hwdtmf enabled)<BR>HWEC_NOISE_REDUCTION =
NO # NO: default YES: reduces noise on the line -
could break fax<BR>HWEC_ACUSTIC_ECHO =
NO # NO: default YES: enables acustic echo
cancelation<BR>HWEC_NLP_DISABLE =
NO # NO: default YES: guarantees software tone
detection (possible
echo)<BR>HWEC_TX_AUTO_GAIN =
0 # 0: disable -40-0: default tx audio
level to be maintained (-20
default)<BR>HWEC_RX_AUTO_GAIN =
0 # 0: disable -40-0: default tx audio
level to be maintained (-20
default)<BR>HWEC_TX_GAIN
= 0 #
0: disable -24-24: db values to be applied to tx
signal<BR>HWEC_RX_GAIN
= 0 #
0: disable -24-24: db values to be applied to tx
signal</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>[w1g1]<BR>ACTIVE_CH =
ALL<BR>TDMV_HWEC =
YES<BR>MTU
= 80<BR>[root@sipx4 conf]#<BR></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[root@sipx4 conf]#
cat /usr/local/freeswitch-107/conf/wanpipe.conf (i installed FS into
/usr/local/freeswitch-107)<BR>[defaults]<BR>codec_ms => 20<BR>wink_ms =>
150<BR>flash_ms => 750<BR></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[root@sipx4 conf]#
cat /usr/local/freeswitch-107/conf/freetdm.conf</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[span wanpipe
wp1]<BR>trunk_type => e1<BR>group=1<BR>b-channel => 1:1-15<BR>b-channel
=> 1:17-31<BR>d-channel => 1:16<BR></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>[root@sipx4 conf]#
cat
/usr/local/freeswitch-107/conf/autoload_configs/freetdm.conf.xml<BR><configuration
name="freetdm.conf" description="Freetdm Configuration"><BR>
<settings><BR> <param name="debug"
value="0"/><BR> <!--<param name="hold-music"
value="$${moh_uri}"/>--><BR> <!--<param
name="enable-analog-option" value="call-swap"/>--><BR>
<!--<param name="enable-analog-option"
value="3-way"/>--><BR> </settings></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
<config_profiles></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
<profile
name="my_pri_nt_1"><BR>
<param name="switchtype" value="euroisdn"
/><BR>
<param name="interface"
value="net"/><BR>
</profile></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
</config_profiles></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
<sangoma_pri_spans></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
<span name="wp1"
cfgprofile="my_pri_nt_1"><BR>
<param name="dialplan"
value="XML"/><BR>
<param name="context"
value="default"/><BR>
</span></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
</sangoma_pri_spans></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
<analog_spans></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>
</analog_spans></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></configuration><BR>[root@sipx4
conf]#<BR></DIV></FONT></SPAN>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>The other side of
the E1 connection is mediant 2000 E1 port. Mediant shows d-channel
alarm.</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>And here is what i
got in the log, when tried to load module:</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>[freeswitch107@sipx4 log]$ cat
freeswitch.log.2011-01-21-10-24-01.1<BR>2011-01-21 10:23:15.775934 [NOTICE]
mod_logfile.c:158 New log started.<BR>2011-01-21 10:23:57.495838 [INFO]
mod_enum.c:808 ENUM Reloaded<BR>2011-01-21 10:23:57.495838 [INFO]
switch_time.c:954 Timezone reloaded 530 definitions<BR>2011-01-21
10:23:57.495838 [DEBUG] ftdm_config.c:52 New mod directory:
/usr/local/freeswitch-107/mod<BR>2011-01-21 10:23:57.495838 [DEBUG]
ftdm_config.c:58 New config directory:
/usr/local/freeswitch-107/conf<BR>2011-01-21 10:23:57.495838 [DEBUG]
ftdm_sched.c:154 Initializing scheduling API<BR>2011-01-21 10:23:57.495838
[DEBUG] ftdm_sched.c:251 Created schedule freetdm-master<BR>2011-01-21
10:23:57.495838 [NOTICE] ftdm_sched.c:178 Launching main schedule
thread<BR>2011-01-21 10:23:57.495838 [DEBUG] ftdm_sched.c:187 Running schedule
freetdm-master in the main schedule thread<BR>2011-01-21 10:23:57.495838
[DEBUG] ftdm_config.c:80 Configuration file is
/usr/local/freeswitch-107/conf/modules.conf.<BR>2011-01-21 10:23:57.495838
[NOTICE] ftdm_io.c:5731 Modules configured: 1<BR>2011-01-21 10:23:57.495838
[DEBUG] ftdm_config.c:80 Configuration file is
/usr/local/freeswitch-107/conf/freetdm.conf.<BR>2011-01-21 10:23:57.495838
[DEBUG] ftdm_io.c:4676 Reading FreeTDM configuration file<BR>2011-01-21
10:23:57.495838 [DEBUG] ftdm_io.c:4692 found config for span<BR>2011-01-21
10:23:57.495838 [INFO] ftdm_io.c:4976 Loading IO from
/usr/local/freeswitch-107/mod/ftmod_wanpipe.so [wanpipe]<BR>2011-01-21
10:23:57.495838 [DEBUG] ftdm_config.c:80 Configuration file is
/usr/local/freeswitch-107/conf/wanpipe.conf.<BR>2011-01-21 10:23:57.495838
[INFO] ftdm_io.c:800 Auto-loaded I/O module 'wanpipe'<BR>2011-01-21
10:23:57.495838 [DEBUG] ftdm_io.c:4706 created span 1 (wp1) of type
wanpipe<BR>2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4722 span 1
[trunk_type]=[e1]<BR>2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4727 setting
trunk type to 'E1'<BR>2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4722 span 1
[group]=[1]<BR>2011-01-21 10:23:57.495838 [DEBUG] ftdm_io.c:4722 span 1
[b-channel]=[1:1-15]<BR>2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246
Failed to open wanpipe device span 1 channel 1<BR>2011-01-21 10:23:57.495838
[ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
2<BR>2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 3<BR>2011-01-21 10:23:57.495838 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
4<BR>2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 5<BR>2011-01-21 10:23:57.495838 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
6<BR>2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 7<BR>2011-01-21 10:23:57.495838 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
8<BR>2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 9<BR>2011-01-21 10:23:57.495838 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
10<BR>2011-01-21 10:23:57.495838 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 11<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
12<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 13<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
14<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 15<BR>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]<BR>2011-01-21 10:23:57.497841
[ERR] ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
17<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 18<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
19<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 20<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
21<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 22<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
23<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 24<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
25<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 26<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
27<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 28<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
29<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246 Failed to open
wanpipe device span 1 channel 30<BR>2011-01-21 10:23:57.497841 [ERR]
ftmod_wanpipe.c:246 Failed to open wanpipe device span 1 channel
31<BR>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]<BR>2011-01-21 10:23:57.497841 [ERR] ftmod_wanpipe.c:246
Failed to open wanpipe device span 1 channel 16<BR>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)<BR>2011-01-21 10:23:57.497841
[ERR] ftdm_io.c:5741 FreeTDM global configuration failed!<BR>2011-01-21
10:23:57.497841 [ERR] mod_freetdm.c:4181 Error configuring
FreeTDM<BR>2011-01-21 10:23:57.497841 [CRIT] switch_loadable_module.c:928
Error Loading module /usr/local/freeswitch-107/mod/mod_freetdm.so<BR>**Module
load routine returned an error**<BR>2011-01-21 10:23:57.597841 [NOTICE]
ftdm_sched.c:147 Main scheduling thread going out ...<BR>[freeswitch107@sipx4
log]$<BR></FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Can anybody please
help with the problem?</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>I'm ready to
provide additional info if needed.</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2 face=Arial>Thanks and
regards,</FONT></SPAN></DIV>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial>Nikolay.</DIV></FONT></SPAN>
<DIV><SPAN class=423090507-21012011><FONT size=2
face=Arial></FONT></SPAN> </DIV></BLOCKQUOTE></BODY></HTML>