SANGOMA

Wanpipe Linux Yate Configuration

  1. Wanpipe configuration for wpchan
  2. Wanpipe Yate E1 PRI Configuration
  3. Wanpipe Yate T1 PRI Configuration
  4. Wanpipe Yate HWEC Configuration
  5. Yate PRI Confiuration 
  6. Wanpipe Yate Decoded PRI Configuration File

 


Wanpipe configuration for wpchan

wpchan (wanpipe channel) runs on top of the wanpipe API!
B Channels run over Transparent (Bitstream,ulaw,alaw) Mode
D Channels run over Hardware HDCL Mode




Wanpipe E1 PRI Configuration

DChan = channel 16
BChan = channels 1 to 15 and 17 to 31

Run wanpipe configuration utility:

#>/usr/sbin/wancfg

Hardware Setup (AFT):

Select Hardware: Specify AFT card from hardware probe.

    After hardware probe,  wancfg screen should show  you:
    (in case of A104 card)
    ----------------------------
    Card Type-------> A104    
    Physical Medium-> E1    
    ----------------------------
Specify Line Type:  E1
                               

Select Advanced Timeslot Groups Configuration

Set the number of Timeslot Groups to 2.

(one for Dchan and one for Bchan)
(d-channel must be assigned to group 1)
(b-channels must be assigned to group 2)
Select TimeSlot Group 1
Configure Timeslots in Group -> 16

Note: A bug exists on some versions after you select timeslot group the wancfg sends to back to the Advanced Timslot Group Menu.

Timeslot Group 1 Config should look like
--------------------------------------------------
Timeslots in Group-> 16
HDLC Engine --------> Enabled
Idle Char -------------> 0x7E
MTU ------------------> 1500
MRU ------------------> 1500
---------------------------------------------------

(Leave all other options default and select <Back>)

Select TimeSlot Group 2
Configure Timeslots in Group -> 1.15-17.31
(If you get back to the Advanced Timeslot Group Section go back into Timeslot Group 2)

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.
By default set the MTU/MRU values to 1200 if you have 30 voice channels.

Configure HDLC Engine to Disable
(HDLC engine -> Disabled)
We must do this step because bchannes carry voice not hdlc frames.

Timeslot Group 2 Config should look like
--------------------------------------------------
Timeslots in Group-> 1-15.17-31
HDLC Engine --------> Disabled
Idle Char -------------> 0x7E
MTU ------------------> 1200
MRU ------------------> 1200
---------------------------------------------------


Your screen should look like this for E1:
--------------------------------------------------
Number of Timeslot Groups ----->2

Timeslot Group 1 configuration -> 16
Timeslot Group 2 configuration -> 1-15.17-31
---------------------------------------------------

Timeslot Groups configuration is complete: Select <BACK>
Default configuration is complete: Select <BACK>

Protocol and Interface Setup:
Select Timeslot group 1 (for the d-channel)

Set protocol to HDLC Streaming

Go to interface setup
Set Operation Mode to: API
Select <BACK>
Select <BACK>

Select Timeslot group 2 (for the b-channels)
Set protocol to HDLC Streaming
Go to interface setup
Set Operation Mode to: API
Go to Advanced Options
Set HDLC engine to disabled
Set TDMV_HWEC to YES  (for hw echo cancellation)
Select <BACK>
Select <BACK>

Exit and Save configuration file.



Wanpipe T1 PRI Configuration

DChan = channel 24
BChan = channels 1 to 23

Run wanpipe configuration utility:

#>/usr/sbin/wancfg

Hardware Setup (AFT):

Select Hardware: Specify AFT card from hardware probe.

    After hardware probe,  wancfg screen should show  you:
    (in case of A104 card)
    ----------------------------
    Card Type-------> A104    
    Physical Medium-> T1    
    ----------------------------
Specify Line Type:  T1
                               

Select Advanced Timeslot Groups Configuration

Set the number of Timeslot Groups to 2.

(one for Dchan and one for Bchan)
(d-channel must be assigned to group 1)
(b-channels must be assigned to group 2)
Select TimeSlot Group 1
Configure Timeslots in Group -> 24

Note: A bug exists on some versions after you select timeslot group the wancfg sends to back to the Advanced Timslot Group Menu.

Timeslot Group 1 Config should look like
--------------------------------------------------
Timeslots in Group-> 24
HDLC Engine --------> Enabled
Idle Char -------------> 0x7E
MTU ------------------> 1500
MRU ------------------> 1500
---------------------------------------------------

(Leave all other options default and select <Back>)

Select TimeSlot Group 2
Configure Timeslots in Group -> 1-23
(If you get back to the Advanced Timeslot Group Section go back into Timeslot Group 2)

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.
By default set the MTU/MRU values to 1200 if you have 30 voice channels.

Configure HDLC Engine to Disable
(HDLC engine -> Disabled)
We must do this step because bchannes carry voice not hdlc frames.

Timeslot Group 2 Config should look like
--------------------------------------------------
Timeslots in Group-> 1-23
HDLC Engine --------> Disabled
Idle Char -------------> 0x7E
MTU ------------------> 1200
MRU ------------------> 1200
---------------------------------------------------


Your screen should look like this for T1:
--------------------------------------------------
Number of Timeslot Groups ----->2

Timeslot Group 1 configuration -> 24
Timeslot Group 2 configuration -> 1-23
---------------------------------------------------

Timeslot Groups configuration is complete: Select <BACK>
Default configuration is complete: Select <BACK>

Protocol and Interface Setup:
Select Timeslot group 1 (for the d-channel)

Set protocol to HDLC Streaming

Go to interface setup
Set Operation Mode to: API
Select <BACK>
Select <BACK>

Select Timeslot group 2 (for the b-channels)
Set protocol to HDLC Streaming
Go to interface setup
Set Operation Mode to: API
Go to Advanced Options
Set HDLC engine to disabled
Set TDMV_HWEC to YES  (for hw echo cancellation)
Select <BACK>
Select <BACK>

Exit and Save configuration file.




Wanpipe Hardware Echo Chancellation Setup

In order to enable hardware echo cancellation on Yate B-Channels you have to manually run wan_ec_client command after wanrouter start. Fortunately wanrouter has external shell scripts that it executes after wanrouter start/stop so you could add wan_ec_client commands to wanrouter startup scripts to automate the process.

To Enable hwec:
wan_ec_client wanpipe1 enable 1-15.17-31

To Desable hwec:

wan_ec_client wanpipe1 disable 1-15.17-31


To automate this step add the start script into the /etc/wanpipe/scripts directory.
(This script will run after wanrouter start)

/etc/wanpipe/scripts/start
--------- CUT ----------
#!/bin/sh
#Ony enable hwec on B-Channels not the D-Channels
wan_ec_client wanpipe1 enable 1-15.17-31
wan_ec_client wanpipe2 enable 1-15.17-31
#Add wan_ec_client calls for each wanpipe device

--------- CUT -----------

To stop all hw echo cancellers on wanrouter stop add this script into /etc/wanpipe/scripts directory.
/etc/wanpipe/scripts/stop
--------- CUT ----------
#!/bin/sh

wan_ec_client wanpipe1 disable 1-15.17-31
wan_ec_client wanpipe2 disable 1-15.17-31

#Add wan_ec_client calls for each wanpipe device
--------- CUT -----------


To check if hwec is enabled on a single span run:

wanpipemon -i w1g1 -c ehw

 


Yate PRI Configuration

 

The yate wpchan configuration file is located at yate/conf.d/wpchan.conf. A sample file, called wpchan.conf.sample

Copy the sample file to wpchan.conf and add the following lines in the [span N] section, where N is your span number.

wpchan.conf
------------- cut -------------------
[general]
buflen=160
restart=0
dumpevents=no
dtmfinband=no
dtmfdetect=yes
samples=40 ; (for E1 : MRU/MTU value of 1200 / 30 = 40)
bitswap=no ; (a bad value here produces white noise when playing a sound)

[span 1]
dgroup=w1g1
bgroup=w1g2
card=wanpipe1
chans=31
first=1
dchan=16
type=pri_cpe
samples=40                 ; (for E1 : MRU/MTU value of 1200 / 30 = 40)
swtype=unknown         ; (euroisdn_e1 for euroisdn E1)
dialplan=unknown
presentation=allow_user_not_screened

[group alfa]
enabled=yes
mode=rotate
first=1
last=31          
------- cut -------------------


regexroute.conf
---------cut -----------------
[priorities]
preroute=100
route=100

[contexts]
.*=default

[default]
^1\(.*\)$=wp/alfa/\100          ;dial out on group alfa with ext 100
^2\(.*\)$=wp/beta/\1
^3\(.*\)$=wp/gamma/\1
^4\(.*\)$=wp/delta/\1
^8.*$=moh/default
^9.*$=iax/guest@192.168.1.10/335      

-------cut-----------


 
              

 

Attachments

NameVersionSizeDateUser
wanpipe1.yate131040010/12/06 4:32 PMncorbic
Must be renambed to wanpipe1.conf in /etc/wanpipe

Comments

From maciejka - 6/2/06 5:11 AM

Timeslot Group 2 configuration for E1 should be 1-15.17-31. Dot not comma!

From mellen - 6/13/07 10:39 AM

The attached example wanpipe1.yate file sets DATA_MUX_MAP to 0x76543210. That screwed up my setup. The working value (for me anyway) is 0x01234567.

From beau - 3/16/06 4:03 PM

To sucessfully get Yate and wanpipe talking, a few additions are necessary. In /etc/yate/wpchan.conf one needs to specify the samples in the [general] section or per span. Samples needs to be a multiplier for bchans such that ((samples*bchans)%4 == 0). The default of 50 samples is the default, which appears correct for E1, but for T1, I had to set the the samples to 60 to ge the driver to stop complaining, but the sound quality was less than satisfactory. Although not documented, the samples needs to be 64 and the buffer needs to be 192 because of the size of a T1 frame. It works.

For the actual wanpipe configuration via wancfg  for the timeslot group containing the bchans, one needs to specify the MRU/MTU in the Advanced Options to be divisible by the number of bchans. I put in 1472.

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 10/12/06 3:22 PM