Sangoma Setup Script

dobbs

New Member
Joined
Oct 24, 2007
Messages
239
Reaction score
0
I know this can be done manually, but the setup for these cards can be a pain. I've been using the A200D or A101D cards exclusively, and I know getting them up and running can be intimidating.

-Paul
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
How about documenting the steps and I will write a script to accomplish the install. You would have to test it afterwards to ensure it works however,

Tom
 

dobbs

New Member
Joined
Oct 24, 2007
Messages
239
Reaction score
0
Okay, here's a first stab. I've compiled this from notes I've gleaned from various places, and I'm pretty sure it's either got missing or redundant steps. I never make it through installing one of these without a hiccup or two. Somehow though, they end up working. Trixbox also has a setup-sangoma script that might be worth checking out. It might also be worth involving Sangoma's tech support folks. They've proven superb in my experience.

cd /usr/src

#Create a virtual link to zaptel directory for Sangoma

ln -s zaptel-1.4.x zaptel

Check sangoma.com to see if this is the latest wanpipe driver. Download the newest released or beta version for the A200D card (different cards sometimes need different drivers).

wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-2.3.4-13.tgz

tar zxvf wanpipe-2.3.4-13.tgz

cd /usr/src/wanpipe-2.3.4-13

./Setup install

Would you like to install WAN Router now? (y/n) y

Would you like update/upgrade wanpipe drivers? (y/n) y

Press [Enter] to continue...

Proceed to build WANPIPE kernel modules ? (y/n) y

Please Select Compilation Mode

1. WAN Protocol Support (Default)

Protocols: Frame Relay, CHDLC, PPP, X25 and ADSL


2. TDM Voice (Asterisk) Support Only

Protocols: TDMV (Asterisk) on AFT adatpers


3. TDM Voice (Asterisk) + WAN Protocol Support

Protocols: TDMV, Frame Relay, CHDLC, PPP, X25, ADSL


4. TDM Voice (Asterisk) + SS7 Support + WAN Protocol Support

Protocols: TDMV, SS7, Frame Relay, CHDLC, PPP, X25, ADSL


5. Custom Compilation Mode

Specify protocols to be added into the WANPIPE

kernel drivers.


Please select (1,2,3,4 or 5) [Default: 1]: 2

Press Enter for Default

Press Enter for Default



Enable TDMV DCHAN Native HDLC Support & Patch Zaptel ? (y/n) y

Your Zaptel source was modified, recompile/reinstall zaptel ? (y/n) y


Everything else just continue to go with “y” or ENTER for defaults

Stop Freepbx/Asterisk
amportal stop

And just to make sure asterisk stops

asterisk stop


Now stop the wanrouter software

wanrouter stop

ztcfg -vvv

Restart FreePBX/Asterisk

amportal start


The remaining things to setup are the files in /etc/zaptal.conf and /etc/asterisk/zapata.conf

It will probably be a few weeks (at least) before I have another Sangoma card on which to try this. I haven't used PBX-In-A-Flash for a production install yet, but I plan to try it for the next one I do.

-Paul
 

dobbs

New Member
Joined
Oct 24, 2007
Messages
239
Reaction score
0
Thanks Ward

I also sent the above to my most recent tech contact at Sangoma for review. Hopefully he will let me know about any corrections.

Editing the zaptel.conf and zapata.conf stuff largely depends on the card being used and how many ports/channels it has. The modification of those files may need to remain a manual step. I'm not sure if that part would even be worth scripting. It's easy enough to copy and paste a couple .conf files.
 

dobbs

New Member
Joined
Oct 24, 2007
Messages
239
Reaction score
0
Feedback from Sangoma

Okay, I received the following suggestions regarding the Sangoma script from Konrad at Sangoma.

"Hello Paul,
Setting up a script to auto install Asterisk, zaptel, Sangoma and any other programs is a great idea. Your script looks good but I would make the following recommendations:

1.) Use the latest stable stream which has moved to Wanpipe-3.2.1, rather then the old stable. The 3.2.1 stable will search for Zaptel so you do not need to have the symbolic link anymore.

2.) Try using the following to install the drivers "./Setup install --silent --protocol=TDM", this will install the drivers with Zaptel support but will not ask the user for any input (always uses the default value).

3.) Once the drivers are installed, run the "wancfg_zaptel" script to configure the wanpipeX.conf files, zaptel.conf and zapata.conf."

Tom, I hope this helps.

Thanks Konrad! :)

-Paul
 

RayGannon

Member
Joined
Jan 28, 2008
Messages
34
Reaction score
0
I'm attempting to migrate from trixbox to PIAF and were using a Sangoma A200d for our analog trunks. I'm not quite following what process is used to install the Sangoma stuff at this point. How do the more recent instructions from Sangoma integrate into the previous instructions from dobbs ?
 

mac

Member
Joined
Dec 19, 2007
Messages
72
Reaction score
1
Hi Ray,
They are pretty much the same but using "./Setup install --silent --protocol=TDM", you don't have to answer as many question(it answers with the default automatically).

Also you can go to http://wiki.sangoma.com/wanpipe-linux-asterisk-install and follow the Asterisk Linux Source Installation instructions. This goes from start to finish. I downloaded the drivers to my xp laptop, then used file manager in webmin to upload and extract. Then follow on command line. Took me a couple tries.
 
Joined
Nov 1, 2007
Messages
45
Reaction score
0
My Sangoma A101 Install

Here is my install of a Sangoma A101 Card on a McCleodUSA T1/PRI. If you have questions, corrections or advice, feel free to post.

*** Install requirments. Not sure why I had to do this part, but it’s the only way I could get it to work. I took this off the sangoma wiki (http://wiki.sangoma.com/Requirements)

> cd /lib/modules/2.6.18-8.1.15-e15/build
> yum install kernel-devel
> yum install gcc
> yum install bash v2 (no change)
> yum install awk (no change)
> yum install patch (no change)
> yum install perl (no change)
> yum install byacc

*** Install and configure wanpipe

> cd /usr/src
> ln -s zaptel-1.4.x zaptel
> wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.2.3.tgz
> tar zxvf wanpipe-3.2.3
> ./Setup install --silent --protocol=TDM

> wancfg

1. <OK>
2. Create a new Configuration File, <Select>
3. Wanpipe1.conf, <Select>
4. Select from detected cards list, <Select>
5. AFT-A101c Slot=5 Bus=1 IRQ=9 CPU=A PORT=PRI V=25, <Select>
6. <Back>
7. Protocol-------> Not Configured, <Select>
8. TDM Voice, <Select>
9. <Back>
10. Interface Setup-> 1 Defined, <Select>
11. Interface 1--> w1g1, <Select>
12. TDM Voice Span-----> 0, <Select>
13. 1, <Ok>
14. TDM PRI HW-HDLC Timeslot-------> 0 Not Used, <Select>
15. 24, <Ok>
16. <Back>
17. <Back>
18. <Exit>
19. <Yes>
20. <Yes>
21. <Exit>
22. <Exit>

> wanrouter wanrc

1.Type in wanpipe1, <Enter>
2.Type ‘y’ to confirm

> wanrouter start

*** Configure Zaptel.conf

> nano /etc/zaptel.conf

# Autogenerated by /usr/local/sbin/genzaptelconf -- do not hand edit
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg
#
# It must be in the module loading order
# Global data

span=1,1,0,esf,b8zs
bchan=1-23
dchan=24

loadzone = us
defaultzone = us

*** Configure Zapata.conf

> nano /etc/asterisk/zapata.conf

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-pstn (delete “zaptel”)
switchtype=national (add)

group=1 (add)
signalling=pri_cpe (delete “fxs_ks”)
channel=>1-23

rxwink=300 ; Atlas seems to use long (250ms) winks

;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
;group=0 (delete)
callgroup=1
pickupgroup=1
immediate=no
relaxdtmf=yes (add)

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

;group=1 (delete)

;Include AMP configs
#include zapata_additional.conf
 

maricnet

New Member
Joined
Jan 12, 2008
Messages
3
Reaction score
0
A200 install

>>>Sangoma mandatory packages<<<

cd /lib/modules/2.6.18-8.1.15.el5/build
yum install kernel-devel
yum install gcc
yum install bash v2
yum install awk
yum install patch
yum install perl
yum install byacc


>>>Wanpipe install<<<

cd /usr/src
ln -s zaptel-1.4.x zaptel
wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.3.2.tgz
tar zxvf wanpipe-3.3.2
cd wanpipe-3.3.2
./Setup install --silent --protocol=TDM

>>> Sangoma wanpipe, zaptel.conf and zapata-auto.conf setup<<<

cd /usr/local/sbin
setup-sangoma

########################################################################
# Sangoma Wanpipe: Zaptel/SMG/TDMAPI/BOOT Configuration Script #
# v2.11 #
# Sangoma Technologies Inc. #
# Copyright(c) 2008. #
########################################################################
Generating configuration files for Trixbox
---------------------------------------------
Configuring T1/E1 cards [A101/A102/A104/A108]
---------------------------------------------
------------------------------------
Configuring ISDN BRI cards [A500]
------------------------------------

No Sangoma ISDN BRI cards detected

Press any key to continue:
------------------------------------
Configuring analog cards [A200/A400]
------------------------------------

-----------------------------------------------------------
A200 detected on slot:12 bus:3
-----------------------------------------------------------
Would you like to enable hardware DTMF detection?
1. YES
2. NO
[1-2, ENTER='YES']:1

Which codec will be used?
1. MULAW - North America
2. ALAW - Europe
[1-2]:1

A200 configured on slot:12 bus:3 span:1
Press any key to continue:

Analog card configuration complete

Press any key to continue:

###################################################################
# SUMMARY #
###################################################################

0 T1/E1 port(s) detected, 0 configured
0 ISDN BRI port(s) detected, 0 configured
1 analog card(s) detected, 1 configured

Configurator has created the following files:
1. Wanpipe config files in /etc/wanpipe
2. Zaptel config file /etc/zaptel.conf
3. Zapata config file /etc/asterisk/zapata-auto.conf


Your original configuration files will be saved to:
1. /etc/zaptel.conf.bak
2. /etc/asterisk/zapata-auto.conf.bak

Your configuration has been saved in /etc/wanpipe/debug-2008-03-14.tgz.
When requesting support, email this file to [email protected]

Press any key to continue:

Zaptel and Wanpipe configuration complete: choose action
1. Save cfg: Restart Asterisk & Wanpipe now
2. Save cfg: Restart Asterisk & Wanpipe when convenient
3. Save cfg: Stop Asterisk & Wanpipe now
4. Save cfg: Stop Asterisk & Wanpipe when convenient
5. Do not save cfg: Exit
[1-5]:1


STOPPING ASTERISK

Disconnected from Asterisk server
Asterisk Stopped

STOPPING FOP SERVER
FOP Server Stopped

Stopping Wanpipe...

Shutting down wanpipe1 interface: w1g1
Shutting down device: wanpipe1
No devices running, Unloading Modules

Unloading Zaptel modules...

Removing old configuration files...

Copying new Wanpipe configuration files...

Copying new Zaptel configuration file (/etc/zaptel.conf)...

Copying new chan_zap configuration files (/etc/asterisk/zapata-auto.conf)...

Starting Wanpipe...

Starting WAN Router...
Loading WAN drivers: wanpipe done.
Starting up device: wanpipe1
--> Loading ec image OCT6116-64S.ima...
Configuring interfaces: w1g1
done.

Zaptel Version: 1.4.7
Echo Canceller: MG2
Configuration
======================

Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

4 channels to configure.

Changing signalling on channel 1 from Unused to FXO Kewlstart
Changing signalling on channel 2 from Unused to FXO Kewlstart
Changing signalling on channel 3 from Unused to FXS Kewlstart
Changing signalling on channel 4 from Unused to FXS Kewlstart

Loading Zaptel...

Zaptel Version: 1.4.7
Echo Canceller: MG2
Configuration
======================

4 channels to configure.

Starting Amportal...

SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK
Asterisk Started

STARTING FOP SERVER
FOP Server Started

Wanrouter start complete...
Current boot level is 3

Wanrouter boot scripts configuration...

Removing existing wanrouter boot scripts...OK
Would you like wanrouter to start on system boot?
1. YES
2. NO
[1-2]:1

Verifying Zaptel boot scripts...Enabled (level:09)
Verifying Zaptel shutdown scripts...Enabled (level:92)
Enabling wanrouter boot scripts ...(level:8)
Enabling wanrouter shutdown scripts ...(level:91)
Sangoma cards configuration complete, exiting...
 

RayGannon

Member
Joined
Jan 28, 2008
Messages
34
Reaction score
0
Maricnet,
I like the format. It's a bit easier for me to follow. A couple questions though...

1) Are there items in your required module list that are not included with the base install and PiaF's update-source command ?

2) Didn't Sangoma say we no longer need the symbolic link to zaptel ?

3) What was your reason for using an older version of wanpipe ?
 
Joined
Nov 1, 2007
Messages
45
Reaction score
0
I'm working on fresh install right now, and you still need to install the required modules. Specifically kernel-devel, gcc, and byacc.

You are right about the symbolic link. It is no longer needed.

I can't answer for maricnet on your third question.

FYI to anyone using my previous A101 instructions, I am working on a revised version because I followed them and they don't seem to work with PIAF and the new wanpipe drivers.
 

maricnet

New Member
Joined
Jan 12, 2008
Messages
3
Reaction score
0
Update

Today I installed wanpipe-3.2.4 and I had problem running setup-sangoma configuration script. When script tried to upload zaptel modules it failed. After installing wanpipe-3.3.2 everything was fine (except old problem kernel panic on reboot).
 

andre.ambrosio

New Member
Joined
Feb 5, 2008
Messages
28
Reaction score
0
Please, help me out!!!

I've a fresh new PIAF install (downloaded FEB 08 so I think it's not the brand new version) over which I've made all updates (source, scripts, fixes). I've bought a sangoma A200D card to put into a production environment, but I just can't install the wanpipe module.

First, it used to hang asking for my zaptel path. I know there is a zaptel.1.4.x directory under /usr/src, but inside that directory, there's only a kernel file which does not work for the installation (it later asks for a certain zaptel.h). I finally found it under /usr/include/zaptel, so I pointed the installer to that. However, when the installation comes to the point "linking wanpipe driver and protocols, it exits with the following error :

Building modules, stage 2.
MODPOST
CC /usr/src/wanpipe-3.2.2/kdrvtmp/wanpipe_lip.mod.o
LD [M] /usr/src/wanpipe-3.2.2/kdrvtmp/wanpipe_lip.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.1.15.el5-i686'
make -C /lib/modules/2.6.18-8.1.15.el5/build SUBDIRS=/usr/src/wanpipe-3.2.2/kdrvtmp CC=gcc KBUILD_VERBOSE=0 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-8.1.15.el5-i686'
CC [M] /usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.o
In file included from /usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:39:
/usr/src/zaptel-1.4.9.2/zaptel/zaptel.h:32:21: error: zconfig.h: No such file or directory
/usr/src/zaptel-1.4.9.2/zaptel/zaptel.h:80:19: error: ecdis.h: No such file or directory
/usr/src/zaptel-1.4.9.2/zaptel/zaptel.h:81:22: error: fasthdlc.h: No such file or directory
In file included from /usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:39:
/usr/src/zaptel-1.4.9.2/zaptel/zaptel.h:1258: error: field ‘txhdlc’ has incomplete type
/usr/src/zaptel-1.4.9.2/zaptel/zaptel.h:1259: error: field ‘rxhdlc’ has incomplete type
/usr/src/zaptel-1.4.9.2/zaptel/zaptel.h:1287: error: expected specifier-qualifier-list before ‘echo_can_disable_detector_state_t’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c: In function ‘wp_tdmv_report_rbsbits’:
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:717: error: ‘struct zt_chan’ has no member named ‘rxsig’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c: In function ‘wp_tdmv_software_init’:
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1118: error: ‘struct zt_chan’ has no member named ‘rxsig’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c: In function ‘wp_tdmv_startup’:
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1184: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1184: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1184: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1184: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1184: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1186: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1186: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1186: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1186: error: ‘struct zt_chan’ has no member named ‘lin2x’
/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.c:1186: error: ‘struct zt_chan’ has no member named ‘lin2x’
make[2]: *** [/usr/src/wanpipe-3.2.2/kdrvtmp/sdla_tdmv.o] Error 1
make[1]: *** [_module_/usr/src/wanpipe-3.2.2/kdrvtmp] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.1.15.el5-i686'
make: *** [all] Error 2

Wierd, but I really don't know what to do... it's wanpipe 3.2.2, which is supposed to be stable, but it simply does not install. What is it that I'm doing wrong? Is it because of PIAF?

Thanks in advance!
 

Members online

Forum statistics

Threads
25,809
Messages
167,750
Members
19,239
Latest member
cajeptha
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top