Thanks to Amit Bhayani , Oleg Kulikov and Bartosz Baranowski for your guidance
if you are looking for Sangoma A102 + Dhadi + Astrisk then give it a try
This is how i was able to configure my sangoma A102 card on Ubuntu 8.10, was trying it on Ubuntu 9.10 but its karnel version is still not supported by Sangoma drivers :( , so had to move back on 8.10
lets start
Insert your card in PCI/PCI-E slot.
follow steps
cd /usr/src
mkdir zaptel
cd zaptel
Download Zaptel source
svn checkout http://svn.digium.com/svn/zaptel/branches/1.4/
before you start building zaptel you should have these dependencies sorted
sudo apt-get install build-essential
sudo apt-get install linux-headers-`uname -r` (replace 'uname -r' with your karnel version, 'uname -r' will give you your karnel version)
sudo apt-get install libnewt-dev
sudo apt-get install bison
now we are ready for zaptel installation.
do
./configure
make
make install
# This must detect your H/W card and will give you messsage with make and number
make config
We are ready with Zaptel .
Now its your card's driver installation
Change you directory to any location where you like to keep your Sangoma driver's code (Any location)
Get you suitable Driver from Sangoma's ftp
ftp://ftp.sangoma.com/linux/current_wanpipe/
i used wanpipe-3.5.9.tgz
untar
cd wanpipe-3.5.9
sudo ./Setup zaptel
you must see permissions fixing all should go ok to have successfull setup
Fixing file permissions...
Verifying files and fixing permissions ...Done
Checking for C developement tools ...(gcc) OK
Checking for C++ developement tools ...OK
Checking for Make utility ...OK
Checking for ncurses library ... OK
Checking for Perl developement tools ...OK
Checking for AWK ...OK
Checking for FLEX ...OK
Checking for Patch ...OK
Checking for libtermcap-devel....OK
Checking for bison...OK
Checking for libtool...OK
If any thing breaks then try to install missing libraries first.
Press 1 for Yes at first step where it ask for installation permission
Press m to specify Zaptel directory (as specified above it would be /usr/src/zaptel/1.4)
specify your zaptel directory path and press enter
you will see this message if everything is going well till now
WANPIPE Environment Setup Complete !!!
Installing WANPIPE Files ... !
Installing WANPIPE Utilities in /usr/sbin
Installing wanrouter.rc in /etc/wanpipe
Installing wanpipe libraries in /etc/wanpipe
Installing firmware in /etc/wanpipe/firmware
Installing documentation in /usr/share/doc/wanpipe
Installing sample api code in /etc/wanpipe/api
Installing AFT Firmware update utility in /etc/wanpipe/util
Installing driver headers in /etc/wanpipe/api/include/linux
Installing Hardware Echo Cancel Utilites
----------------------------------------------------------
WANPIPE v3.5.9 Installation Script
Copyright (c) 1995-2009, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE INSTALLATON: COMPLETE
Would you like to configure wanpipe devices for ZAPTEL? (y/n)
press y and enter
Would you like to generate /etc/asterisk/zapata.conf
1. YES
2. NO
[1-2]:2
Select media type for AFT-A102 on port 1 [slot:0 bus:4 span:1]
1. T1
2. E1
3. Unused
4. Exit
[1-4]:2
I use E1
Configuring port 1 on 102 as E1, line coding:HDB3, framing:CRC4
1. YES - Keep these settings
2. NO - Configure line coding and framing
[1-2, ENTER='YES']:1
If every thing looks fine to you
Select clock for AFT-A102 on port 1 [slot:0 bus:4 span:1]
1. NORMAL
2. MASTER
[1-2]:2
Select signalling type for AFT-A102 on port 1 [slot:0 bus:4 span:1]
1. Zaptel/Dahdi - PRI CPE
2. Zaptel/Dahdi - PRI NET
3. Zaptel/Dahdi - E & M
4. Zaptel/Dahdi - E & M Wink
5. Zaptel/Dahdi - FXS - Loop Start
6. Zaptel/Dahdi - FXS - Ground Start
7. Zaptel/Dahdi - FXS - Kewl Start
8. Zaptel/Dahdi - FX0 - Loop Start
9. Zaptel/Dahdi - FX0 - Ground Start
10. Zaptel/Dahdi - FX0 - Kewl Start
11. Sangoma SMG/sangoma_prid- PRI CPE
12. Sangoma SMG/sangoma_prid- PRI NET
[1-12]:1
Select switchtype for AFT-A102 on port 1
1. National ISDN 2
2. Nortel DMS100
3. AT&T 4ESS
4. Lucent 5ESS
5. EuroISDN
6. Old National ISDN 1
7. Q.SIG
[1-7]:1
Configuring port 1 on AFT-A102 as a full E1
1. YES - Use all channels
2. NO - Configure for fractional
[1-2, ENTER='YES']:1
Select dialplan context for AFT-AA102 on port 1
1. from-pstn
2. from-internal
3. Custom
[1-3]:1
-----------------------------------------------------------
Configuring port 2 on A102 slot:0 bus:4.
-----------------------------------------------------------
Select media type for AFT-A102 on port 2 [slot:0 bus:4 span:2]
1. T1
2. E1
3. Unused
4. Exit
[1-4, ENTER='E1']:2
i followd same steps for port 2 as well ( Except Select clock for AFT-A102 to Normal ):)
You must get a message showing summery like this
###################################################################
# SUMMARY #
###################################################################
2 T1/E1 port(s) detected, 2 configured
0 ISDN BRI port(s) detected, 0 configured
0 analog card(s) detected, 0 configured
0 usb device(s) detected, 0 configured
Configurator will create the following files:
1. Wanpipe config files in /etc/wanpipe
2. Zaptel config file /etc/zaptel.conf
3. Zapata config file /etc/asterisk/zapata.conf
Your original configuration files will be saved to:
1. /etc/zaptel.conf.bak
2. /etc/asterisk/zapata.conf.bak
Your configuration has been saved in /etc/wanpipe/debug-2010-01-05.tgz.
When requesting support, email this file to techdesk@sangoma.com
###################################################################
And then press 1 to exit
Now your cards light must have changed (For my card its Red) means it has started working ;)
Now plug the cable in both the ports
cable details here i used Cross over cable.
Test it with Mobicents
here is the post from where you can download the code attached in one of the mail
http://groups.google.com/group/mobicents-public/browse_thread/thread/2911618a4388681f/aae910cef5eebebc?lnk=gst&q=ss7#aae910cef5eebebc
But before you build change the property in zap/native/linux/pom.xml and point it to your zaptel installation.
Which would be your /usr/inclue/zaptel
Change the hardcoded path of library in Schannel.java under java directory correctly point to your native library zap-native-linux.so
Now call
mvn clean install -Plinux
for linux distribution as of now only this is available with this example.
Now if everything goes well
do the same changes in Schannel.java (Located at /trunk/server/media/core/server-impl/src/main/java/org/mobicents/media/server/impl/resource/zap/) to correctly point to your native library zap-native-linux.so
Build the Media/core by mvn install
Now create two( for my card's two ports ) xxxx-beans.xml (Sufix should be -beans.xml as it will act as a microcontainer beans) as mentioned below.
Configuration File1
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
<bean name="ZapLinkBean" class="org.mobicents.media.server.impl.resource.zap.ZapLink" >
<property name="linkset">L1</property>
<property name="span">1</property>
<property name="channel">16</property>
</bean>
<bean name="MtpLayers" class="org.mobicents.media.server.impl.resource.ss7.Mtp3" >
<constructor>
<parameter class="java.lang.String">Link1</parameter>
<parameter class="org.mobicents.media.server.impl.resource.ss7.Mtp1"><inject bean="ZapLinkBean"/></parameter>
</constructor>
<property name="sls">0</property>
<property name="opc">14133</property>
<property name="dpc">14150</property>
<property name="l3Debug">true</property>
<depends>ZapLinkBean</depends>
</bean>
<bean name="Streamer" class="org.mobicents.media.server.impl.resource.ss7.stream.SimpleTCPForwarder">
<property name="serviceIndicator">3</property>
<property name="subServiceIndicator">12</property>
<property name="layer3"><inject bean="MtpLayers"/></property>
<depends>MtpLayers</depends>
</bean>
</deployment>
Configuration File2
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
<bean name="ZapLinkBean1" class="org.mobicents.media.server.impl.resource.zap.ZapLink" >
<property name="linkset">L1</property>
<property name="span">2</property>
<property name="channel">16</property>
</bean>
<bean name="MtpLayers1" class="org.mobicents.media.server.impl.resource.ss7.Mtp3" >
<constructor>
<parameter class="java.lang.String">Link1</parameter>
<parameter class="org.mobicents.media.server.impl.resource.ss7.Mtp1"><inject bean="ZapLinkBean1"/></parameter>
</constructor>
<property name="sls">0</property>
<property name="opc">14150</property>
<property name="dpc">14133</property>
<property name="l3Debug">true</property>
<depends>ZapLinkBean1</depends>
</bean>
<bean name="Streamer1" class="org.mobicents.media.server.impl.resource.ss7.stream.SimpleTCPForwarder">
<property name="serviceIndicator">3</property>
<property name="subServiceIndicator">12</property>
<property name="layer3"><inject bean="MtpLayers1"/></property>
<property name="port">1355</property>
<depends>MtpLayers1</depends>
</bean>
</deployment>
Save them in core/server-standalone/target/mms-standalone-pojo/deploy directory
go to core/server-standalone/target/mms-standalone-pojo/bin
Call ./run.sh
you will see in the logs
02:37:40,355 INFO [ZapLink] =================================================
02:37:40,355 INFO [ZapLink] Starting L1: link[L1:2:47]
02:37:40,355 INFO [ZapLink] =================================================
02:37:40,421 INFO [MainDeployer] Deployed file:/home/mobite/workarea/mobicents/trunk/servers/media/core/server-standalone/target/mms-standalone-pojo/deploy/test2ss7-beans.xml
02:37:40,421 INFO [MainDeployer] Deploying file:/home/mobite/workarea/mobicents/trunk/servers/media/core/server-standalone/target/mms-standalone-pojo/deploy/test1ss7-beans.xml
02:37:40,427 INFO [ZapLink] =================================================
02:37:40,427 INFO [ZapLink] Starting L1: link[L1:1:16]
02:37:40,427 INFO [ZapLink] =================================================
02:37:45,375 INFO [ZapLink] Opened channel 16 on span 1. File: 42
02:37:45,375 INFO [ZapLink] Opened channel 16 on span 2. File: 47
.........
.........
and logs from MTP layers .........
Thanks ;)
if you are looking for Sangoma A102 + Dhadi + Astrisk then give it a try
This is how i was able to configure my sangoma A102 card on Ubuntu 8.10, was trying it on Ubuntu 9.10 but its karnel version is still not supported by Sangoma drivers :( , so had to move back on 8.10
lets start
Insert your card in PCI/PCI-E slot.
follow steps
cd /usr/src
mkdir zaptel
cd zaptel
Download Zaptel source
svn checkout http://svn.digium.com/svn/zaptel/branches/1.4/
before you start building zaptel you should have these dependencies sorted
sudo apt-get install build-essential
sudo apt-get install linux-headers-`uname -r` (replace 'uname -r' with your karnel version, 'uname -r' will give you your karnel version)
sudo apt-get install libnewt-dev
sudo apt-get install bison
now we are ready for zaptel installation.
do
./configure
make
make install
# This must detect your H/W card and will give you messsage with make and number
make config
We are ready with Zaptel .
Now its your card's driver installation
Change you directory to any location where you like to keep your Sangoma driver's code (Any location)
Get you suitable Driver from Sangoma's ftp
ftp://ftp.sangoma.com/linux/current_wanpipe/
i used wanpipe-3.5.9.tgz
untar
cd wanpipe-3.5.9
sudo ./Setup zaptel
you must see permissions fixing all should go ok to have successfull setup
Fixing file permissions...
Verifying files and fixing permissions ...Done
Checking for C developement tools ...(gcc) OK
Checking for C++ developement tools ...OK
Checking for Make utility ...OK
Checking for ncurses library ... OK
Checking for Perl developement tools ...OK
Checking for AWK ...OK
Checking for FLEX ...OK
Checking for Patch ...OK
Checking for libtermcap-devel....OK
Checking for bison...OK
Checking for libtool...OK
If any thing breaks then try to install missing libraries first.
Press 1 for Yes at first step where it ask for installation permission
Press m to specify Zaptel directory (as specified above it would be /usr/src/zaptel/1.4)
specify your zaptel directory path and press enter
you will see this message if everything is going well till now
WANPIPE Environment Setup Complete !!!
Installing WANPIPE Files ... !
Installing WANPIPE Utilities in /usr/sbin
Installing wanrouter.rc in /etc/wanpipe
Installing wanpipe libraries in /etc/wanpipe
Installing firmware in /etc/wanpipe/firmware
Installing documentation in /usr/share/doc/wanpipe
Installing sample api code in /etc/wanpipe/api
Installing AFT Firmware update utility in /etc/wanpipe/util
Installing driver headers in /etc/wanpipe/api/include/linux
Installing Hardware Echo Cancel Utilites
----------------------------------------------------------
WANPIPE v3.5.9 Installation Script
Copyright (c) 1995-2009, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE INSTALLATON: COMPLETE
Would you like to configure wanpipe devices for ZAPTEL? (y/n)
press y and enter
Would you like to generate /etc/asterisk/zapata.conf
1. YES
2. NO
[1-2]:2
Select media type for AFT-A102 on port 1 [slot:0 bus:4 span:1]
1. T1
2. E1
3. Unused
4. Exit
[1-4]:2
I use E1
Configuring port 1 on 102 as E1, line coding:HDB3, framing:CRC4
1. YES - Keep these settings
2. NO - Configure line coding and framing
[1-2, ENTER='YES']:1
If every thing looks fine to you
Select clock for AFT-A102 on port 1 [slot:0 bus:4 span:1]
1. NORMAL
2. MASTER
[1-2]:2
Select signalling type for AFT-A102 on port 1 [slot:0 bus:4 span:1]
1. Zaptel/Dahdi - PRI CPE
2. Zaptel/Dahdi - PRI NET
3. Zaptel/Dahdi - E & M
4. Zaptel/Dahdi - E & M Wink
5. Zaptel/Dahdi - FXS - Loop Start
6. Zaptel/Dahdi - FXS - Ground Start
7. Zaptel/Dahdi - FXS - Kewl Start
8. Zaptel/Dahdi - FX0 - Loop Start
9. Zaptel/Dahdi - FX0 - Ground Start
10. Zaptel/Dahdi - FX0 - Kewl Start
11. Sangoma SMG/sangoma_prid- PRI CPE
12. Sangoma SMG/sangoma_prid- PRI NET
[1-12]:1
Select switchtype for AFT-A102 on port 1
1. National ISDN 2
2. Nortel DMS100
3. AT&T 4ESS
4. Lucent 5ESS
5. EuroISDN
6. Old National ISDN 1
7. Q.SIG
[1-7]:1
Configuring port 1 on AFT-A102 as a full E1
1. YES - Use all channels
2. NO - Configure for fractional
[1-2, ENTER='YES']:1
Select dialplan context for AFT-AA102 on port 1
1. from-pstn
2. from-internal
3. Custom
[1-3]:1
-----------------------------------------------------------
Configuring port 2 on A102 slot:0 bus:4.
-----------------------------------------------------------
Select media type for AFT-A102 on port 2 [slot:0 bus:4 span:2]
1. T1
2. E1
3. Unused
4. Exit
[1-4, ENTER='E1']:2
i followd same steps for port 2 as well ( Except Select clock for AFT-A102 to Normal ):)
You must get a message showing summery like this
###################################################################
# SUMMARY #
###################################################################
2 T1/E1 port(s) detected, 2 configured
0 ISDN BRI port(s) detected, 0 configured
0 analog card(s) detected, 0 configured
0 usb device(s) detected, 0 configured
Configurator will create the following files:
1. Wanpipe config files in /etc/wanpipe
2. Zaptel config file /etc/zaptel.conf
3. Zapata config file /etc/asterisk/zapata.conf
Your original configuration files will be saved to:
1. /etc/zaptel.conf.bak
2. /etc/asterisk/zapata.conf.bak
Your configuration has been saved in /etc/wanpipe/debug-2010-01-05.tgz.
When requesting support, email this file to techdesk@sangoma.com
###################################################################
And then press 1 to exit
Now your cards light must have changed (For my card its Red) means it has started working ;)
Now plug the cable in both the ports
cable details here i used Cross over cable.
Test it with Mobicents
here is the post from where you can download the code attached in one of the mail
http://groups.google.com/group/mobicents-public/browse_thread/thread/2911618a4388681f/aae910cef5eebebc?lnk=gst&q=ss7#aae910cef5eebebc
But before you build change the
Which would be your /usr/inclue/zaptel
Change the hardcoded path of library in Schannel.java under java directory correctly point to your native library zap-native-linux.so
Now call
mvn clean install -Plinux
for linux distribution as of now only this is available with this example.
Now if everything goes well
do the same changes in Schannel.java (Located at /trunk/server/media/core/server-impl/src/main/java/org/mobicents/media/server/impl/resource/zap/) to correctly point to your native library zap-native-linux.so
Build the Media/core by mvn install
Now create two( for my card's two ports ) xxxx-beans.xml (Sufix should be -beans.xml as it will act as a microcontainer beans) as mentioned below.
Configuration File1
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
<bean name="ZapLinkBean" class="org.mobicents.media.server.impl.resource.zap.ZapLink" >
<property name="linkset">L1</property>
<property name="span">1</property>
<property name="channel">16</property>
</bean>
<bean name="MtpLayers" class="org.mobicents.media.server.impl.resource.ss7.Mtp3" >
<constructor>
<parameter class="java.lang.String">Link1</parameter>
<parameter class="org.mobicents.media.server.impl.resource.ss7.Mtp1"><inject bean="ZapLinkBean"/></parameter>
</constructor>
<property name="sls">0</property>
<property name="opc">14133</property>
<property name="dpc">14150</property>
<property name="l3Debug">true</property>
<depends>ZapLinkBean</depends>
</bean>
<bean name="Streamer" class="org.mobicents.media.server.impl.resource.ss7.stream.SimpleTCPForwarder">
<property name="serviceIndicator">3</property>
<property name="subServiceIndicator">12</property>
<property name="layer3"><inject bean="MtpLayers"/></property>
<depends>MtpLayers</depends>
</bean>
</deployment>
Configuration File2
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
<bean name="ZapLinkBean1" class="org.mobicents.media.server.impl.resource.zap.ZapLink" >
<property name="linkset">L1</property>
<property name="span">2</property>
<property name="channel">16</property>
</bean>
<bean name="MtpLayers1" class="org.mobicents.media.server.impl.resource.ss7.Mtp3" >
<constructor>
<parameter class="java.lang.String">Link1</parameter>
<parameter class="org.mobicents.media.server.impl.resource.ss7.Mtp1"><inject bean="ZapLinkBean1"/></parameter>
</constructor>
<property name="sls">0</property>
<property name="opc">14150</property>
<property name="dpc">14133</property>
<property name="l3Debug">true</property>
<depends>ZapLinkBean1</depends>
</bean>
<bean name="Streamer1" class="org.mobicents.media.server.impl.resource.ss7.stream.SimpleTCPForwarder">
<property name="serviceIndicator">3</property>
<property name="subServiceIndicator">12</property>
<property name="layer3"><inject bean="MtpLayers1"/></property>
<property name="port">1355</property>
<depends>MtpLayers1</depends>
</bean>
</deployment>
Save them in core/server-standalone/target/mms-standalone-pojo/deploy directory
go to core/server-standalone/target/mms-standalone-pojo/bin
Call ./run.sh
you will see in the logs
02:37:40,355 INFO [ZapLink] =================================================
02:37:40,355 INFO [ZapLink] Starting L1: link[L1:2:47]
02:37:40,355 INFO [ZapLink] =================================================
02:37:40,421 INFO [MainDeployer] Deployed file:/home/mobite/workarea/mobicents/trunk/servers/media/core/server-standalone/target/mms-standalone-pojo/deploy/test2ss7-beans.xml
02:37:40,421 INFO [MainDeployer] Deploying file:/home/mobite/workarea/mobicents/trunk/servers/media/core/server-standalone/target/mms-standalone-pojo/deploy/test1ss7-beans.xml
02:37:40,427 INFO [ZapLink] =================================================
02:37:40,427 INFO [ZapLink] Starting L1: link[L1:1:16]
02:37:40,427 INFO [ZapLink] =================================================
02:37:45,375 INFO [ZapLink] Opened channel 16 on span 1. File: 42
02:37:45,375 INFO [ZapLink] Opened channel 16 on span 2. File: 47
.........
.........
and logs from MTP layers .........
Thanks ;)
Can you please explain why you selected National ISDN 2 for your switch type when using E1? I believe National ISDN 2 is a North American standard for T1. Did this actually work for an ISDN PRI in India?
ReplyDelete@Graham
ReplyDeleteIt was never tested with real network, and configuration shown here is just for an example purpose, which can be changed latter, testing which was done on it was just with Cross Over cable (2<->4, 3<->5)
This comment has been removed by the author.
ReplyDelete