VoIP PSTN Gateway

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Configure Wanpipe)
Line 1: Line 1:
Yate has the functionality of a VoIP - PSTN gateway.
+
Yate has the functionality of a VoIP - PSTN gateway. It's main task is to provide signaling interworking and to transform the information it receives on one side in information compatible with the other side.
  
It's main task is to provide signaling interworking and to transform the information it receives on one side in information compatible with the other side.
+
Yate can be configured as a gateway from SIP to ISDN or from SIP to SS7(ISUP) by using local circuits like Sangoma cards or by using remote circuits like Media Gateways.
  
Yate can connect an existing PBX to alternative VoIP providers providing cost savings for enterprises.
+
Yate can connect an existing PBX to alternative VoIP providers providing cost savings for enterprises. It can also be used by providers to connect their TDM network to IP networks providing cost savings for long distance calls.
  
It can also be used by providers to connect their TDM network to IP networks providing cost savings for long distance calls.
+
The setup described in this article will use Sangoma card and will use Yate as a gateway from SIP to ISDN.
 
+
For this application, the usage of Sangoma cards is necessary.
+
  
 
== Configuration setup==
 
== Configuration setup==

Revision as of 12:03, 24 May 2013

Yate has the functionality of a VoIP - PSTN gateway. It's main task is to provide signaling interworking and to transform the information it receives on one side in information compatible with the other side.

Yate can be configured as a gateway from SIP to ISDN or from SIP to SS7(ISUP) by using local circuits like Sangoma cards or by using remote circuits like Media Gateways.

Yate can connect an existing PBX to alternative VoIP providers providing cost savings for enterprises. It can also be used by providers to connect their TDM network to IP networks providing cost savings for long distance calls.

The setup described in this article will use Sangoma card and will use Yate as a gateway from SIP to ISDN.

Contents

Configuration setup

We will need a server with linux and a Sangoma card (A104). The linux installed on the server:

# cat /etc/issue
Mandriva Linux release 2010.2 (Official) for i586
Kernel 2.6.33.7-desktop-2mnb on a Dual-processor i686

Installing Sangoma cards under Linux

Prerequirements

Sangoma Linux Driver (Wanpipe) require a list of packages on your system prior to install.

  • C developement tools ...(gcc)
  • C++ developement tools
  • Make utility
  • Ncurses library
  • Perl developement tools
  • AWK
  • FLEX
  • Patch
  • libtermcap-devel
  • bison
  • libtools
  • autoconf
  • automake
  • kernel-devel

Sangoma card driver installation

Download the driver from: http://wiki.sangoma.com/wanpipe-linux-drivers.

As root:

# cd /usr/src/                                                                             
# ls                                                                         
wanpipe-3.5.28.tgz                                                           
#tar zxvf wanpipe-3.5.28.tgz
# cd wanpipe-3.5.28
# ./Setup install 

The interface will verify that all required tools are installed and ask you if you want to install Wanpipe now. Press 'Y'(yes) to start the installation. Next, you will be asked if you would like to build the WANPIPE kernel driver modules. Answer 'Y' again.

You will then be asked to specify the absolute pathname of your Linux directory. You can press Enter to accept the default. If this does not work for you, contact Sangoma support for further assistance. You will again be asked to confirm that you wish to build the kernel drivers. Press 'Y' again.

Now comes the important question: the Setup program wants to know what compilation mode you wish to use. You’ll want to select the option for the Custom Compilation Mode , which in the case of wanpipe-3.5.28 is option 5.

Then you'll be asked about the API Protocols, you have to write: AFT_TE1 and BITSTRM.

Please select a protocol option in [<opt>]: AFT_TE1
Enabling the AFT TE1 Support 
..................
Please select a protocol option in [<opt>]: BITSTRM
Enabling the BITSTRM Protocol
..................

Then you will be asked to continue the installation and the compilling is done. The final question:

Would you like to install WANPIPE start-up scripts? (y/n) y

And that's all: WANPIPE INSTALLATON: COMPLETE

If you want to test, you can run

#wanrouter hwprobe
#wanrouter status

Configure Wanpipe

Follow the procedure outlined here to configure Wanpipe into two timeslot groups for YATE. First, as the root user, issue the following command:

# wancfg

This will start the WANPIPE Configuration Utility, which will build the Wanpipe configuration files. Press OK at the first screen, select Create a new Configuration File and press Enter. You will see a list of the configuration files that are possible, and their states. For a new installation, press Enter to select wanpipe1.conf. Select the following from the list of detected cards:

AFT-A104u SLOT=2 BUS=5 IRQ=3 CPU=A PORT=1 V=13 

If you are not in North America, you will probably need to change the physical medium from T1 to E1 using the first submenu from the next screen. We will write E1 for the physical medium. Next, you’ll have to configure the timeslot groups using the second submenu. You will need to define two timeslot groups: one for the D-channel, and the other for all the B-channels.

E1 configuration:          
Timeslot Group 1 Configuration: 
Timeslots in Group-> 16       
HDLC engine--------> Enabled   
Idle char ---------> 0x7E      
MTU ---------------> 1200      
MRU ---------------> 1200      
Timeslot Group 2 Configuration:
Timeslots in Group-> 1-15.17-30 
HDLC engine--------> Disabled   
Idle char ---------> 0x7E       
MTU ---------------> 1200       
MRU ---------------> 1200       

Specify MTU and MRU values. They should be the same. MTU/MRU values indicate the Rx/Tx CHUNK Size.To calculate MTU/MRU multiply your desired CHUNK size by the number of active channels. eg: 30 channels * 40bytes (which is 5ms voice chunk) = 1200 bytes.

Note: To avoid problems the chunk size must be a multiple of four.

You'll need to tell Wanpipe what each timeslot will be used for. The timeslots will be referred to as w1g1 and w1g2 (Wanpipe 1 group 1 and Wanpipe 1 group 2). If you have a multiport Wanpipe card, you may have other group names as well. For your current purposes, you'll want to be running HDLC streaming on each timeslot, with an operation mode of API. The timeslot group config screens are a little confusing to navigate, but with a bit of back-and-forth you should be able to figure them out. For each timeslot group, set the following:

Protocol: HDLC Streaming
Interface Setup--> 1 defined (select and press Enter)
Interface 1 – w1g1 (select and press Enter)
Operation Mode--> WANPIPE (select and press Enter)
You want to change this to:
Interface Operation Mode: API

The same actions for configuring the Timeslot for Group 2.

Save the file wanpipe1.conf and Exist.


Note: If you need to make changes in wanpipe configuration file please make sure that wanpipe is not running, to avoid errors.

Configuration in Yate

Use this tutorial to: install Yate.

Configure files:

ysigchan.conf

[general]

[link1]
type=isdn-pri-net
enable=yes
sig=wanpipe1
voice=wanpipe1
switchtype=euro-isdn-e1
strategy=increment
format=alaw

wanpipe.conf

[general]

[wanpipe1]
type=E1
siggroup=w1g1
voicegroup=w1g2


Start devices

First wanpipe must be started and then Yate.


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers