Wpcard

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "==wpcard and wpcardw modules== Sangoma Wanpipe E1/T1 PRI cards signalling and data driver. This module can build signalling interfaces (D-channels) or audio channels (B-chan...")
 
(Example)
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
==wpcard and wpcardw modules==
 
 
 
Sangoma Wanpipe E1/T1 PRI cards signalling and data driver.
 
Sangoma Wanpipe E1/T1 PRI cards signalling and data driver.
  
 
This module can build signalling interfaces (D-channels) or audio channels (B-channels) on E1/T1 spans.
 
This module can build signalling interfaces (D-channels) or audio channels (B-channels) on E1/T1 spans.
  
'''Note:'''The API for communicating with the wanpipe kernel drivers has changed over time.<br>
+
'''Note:'''The API for communicating with the wanpipe kernel drivers has changed over time.
We currently recommend drivers version [http://voip.null.ro/sangoma/wanpipe-3.3.14.11.tgz 3.3.14.11] - anything older or newer may or may not compile or run correctly.
+
We currently recommend drivers version [http://voip.null.ro/sangoma/wanpipe-3.3.14.11.tgz 3.3.14.11] - anything older or newer may or may not compile or run correctly.<br>
 
+
The wanpipe devices must be started before starting Yate (use the wanrouter script to start all or specific wanpipe device(s)).
'''Note:'''The wanpipe devices must be started before starting yate (use the wanrouter script to start all or specific wanpipe device(s)).
+
  
 
===Building a D-channel===
 
===Building a D-channel===
Line 16: Line 13:
 
The '''siggroup''' parameter from the section given by '''sig''' MUST indicate a valid device configured in driver (e.g. w1g1).<br>
 
The '''siggroup''' parameter from the section given by '''sig''' MUST indicate a valid device configured in driver (e.g. w1g1).<br>
 
An interface opens its wanpipe device and starts the worker thread when enabled by the owner. It closes the device and stop the worker thread when is disabled.<br>
 
An interface opens its wanpipe device and starts the worker thread when enabled by the owner. It closes the device and stop the worker thread when is disabled.<br>
'''Note:''' No check is made if the wanpipe device is in use. If the wanpipe device is in use (by other programs or Yate) the D-channel creation won't fail.
+
 
 +
'''Note:''' No check is made if the wanpipe device is in use. If the wanpipe device is in use (by other programs or Yate) the D-channel creation won't fail.
  
 
===Building a B-channel group (voice span)===
 
===Building a B-channel group (voice span)===
Line 39: Line 37:
  
 
===Configuration===
 
===Configuration===
 
  
 
Configuration file: wpcard.conf
 
Configuration file: wpcard.conf
 
  
 
  ; This file keeps the configuration of cards using the wanpipe driver
 
  ; This file keeps the configuration of cards using the wanpipe driver
  ; Each section except for 'general' configures a group (span) of  
+
  ; Each section except for 'general' configures a group (span) of wanpipe channels
; wanpipe channels
+
 
   
 
   
 
   
 
   
Line 53: Line 48:
 
  ;  span parameters
 
  ;  span parameters
 
   
 
   
  ; bitswap: boolean: Specify if sent/received data has each byte  
+
  ; bitswap: boolean: Specify if sent/received data has each byte rotated (swapped)
; rotated (swapped)
+
 
  ; If missing, enable is assumed
 
  ; If missing, enable is assumed
 
  ; This parameter can be overridden in group sections
 
  ; This parameter can be overridden in group sections
 
  ;bitswap=enable
 
  ;bitswap=enable
 
   
 
   
  ; idlevalue: integer: The value to send for unused voice data channel
+
  ; idlevalue: integer: The value to send for unused voice data channels
  ; Interval: 0..255. Default value: 255
+
  ; Interval: 0..255. Default value: 255 (0xFF) for T1, 213 (0xD5) for E1 and BRI
 +
; A value of -1 sets the circuit code as idle value (for circuit identification)
 
  ; This parameter can be overridden in group sections
 
  ; This parameter can be overridden in group sections
  ;idlevalue=255
+
  ;idlevalue=
 
   
 
   
  ; buflen: integer: The length of the buffers used by the data  
+
  ; buflen: integer: The length of the buffers used by the data sources and consumers
; sources and consumers
+
 
  ; Data consumers' buffers will be twice this value
 
  ; Data consumers' buffers will be twice this value
 
  ; This value can't be 0. Defaults to 160
 
  ; This value can't be 0. Defaults to 160
 
  ; This parameter can be overridden in group sections
 
  ; This parameter can be overridden in group sections
 
  ;buflen=160
 
  ;buflen=160
 +
 +
; hwrepeatcapable: boolean: Use HW signalling packet repeat capability
 +
; If disabled, the module will handle packet repeat when requested by the upper layer
 +
; This parameter can be overridden in group sections
 +
;hwrepeatcapable=true
 
   
 
   
 
   
 
   
Line 82: Line 81:
 
  ;type=E1
 
  ;type=E1
 
   
 
   
  ; readonly: boolean: Specifies if this is a read only span  
+
  ; readonly: boolean: Specifies if this is a read only span (signalling and audio data)
; (signaling and audio data)
+
 
  ; If enabled, no data will be sent through this span
 
  ; If enabled, no data will be sent through this span
 
  ; Defaults to no
 
  ; Defaults to no
 
  ;readonly=no
 
  ;readonly=no
+
 
  ; siggroup: string: The name of the device containing the  
+
  ; siggroup: string: The name of the device containing the signalling channel(s)
; signaling channel(s)
+
 
  ; E.g. w1g1
 
  ; E.g. w1g1
  ; This parameter is required when creating a signalling interface  
+
  ; This parameter is required when creating a signalling interface (D-channel)
; (D-channel)
+
 
  ;siggroup=w1g1
 
  ;siggroup=w1g1
 
   
 
   
  ; voicegroup: string: The name of the device containing the voice  
+
  ; voicegroup: string: The name of the device containing the voice (data) channel(s)
; (data) channel(s)
+
 
  ; This parameter is required when creating a voice group
 
  ; This parameter is required when creating a voice group
 
  ; E.g. w1g2
 
  ; E.g. w1g2
 
  ;voicegroup=w1g2
 
  ;voicegroup=w1g2
 
   
 
   
  ; voicechans: string: The range of channels used for voice (data)
+
  ; voicechans: string: The range of channels used for voice (data) transfer
; transfer
+
  ; Channel intervals may be specified by separating the margins using the '-' character
  ; Channel intervals may be specified by separating the margins  
+
; using the '-' character
+
 
  ; Individual channels or channel intervals may be separated by '.'
 
  ; Individual channels or channel intervals may be separated by '.'
  ; Duplicate, not strict positive channel numbers, or channel numbers
+
  ; Duplicate, not strict positive channel numbers, or channel numbers greater then channel
; greater then channel
+
  ;   count (channel count defaults to 31 for E1 and to 24 for T1) are not allowed
  ; count (channel count defaults to 31 for E1 and to 24 for T1)  
+
; are not allowed
+
 
  ; E.g. 1-15.17-31 or 1-23 or 1.2.3-15.17.18-30.31
 
  ; E.g. 1-15.17-31 or 1-23 or 1.2.3-15.17.18-30.31
 
  ; If missing, will be computed from type (E1: 1-15.17-31, T1: 1-23)
 
  ; If missing, will be computed from type (E1: 1-15.17-31, T1: 1-23)
Line 118: Line 109:
 
  ;offset=
 
  ;offset=
 
   
 
   
  ; samples: integer: Specify the number of data samples  
+
; start: integer: Absolute start of circuits numbers, ignore group's start
; expected to be received. It is used to create the buffer  
+
; Default is offset + group's current start
; to read data from span. The total buffer will have the
+
;start=
  ; number of bytes given by the number of samples multiplied  
+
; by the number of voice channels configured for this span
+
; increment: integer: How much will increment this span the circuit number in
 +
;  the group it belongs to
 +
; Defaults to 32 for E1, 24 for T1
 +
;increment=
 +
 +
  ; samples: integer: Specify the number of data samples expected to be received
 +
; It is used to create the buffer to read data from span. The total buffer will have the
 +
  ; number of bytes given by the number of samples multiplied by the number of voice
 +
channels configured for this span
 
  ; If missing or 0, it will be computed from type (E1: 50, T1: 64)
 
  ; If missing or 0, it will be computed from type (E1: 50, T1: 64)
 
  ;samples=50
 
  ;samples=50
 
   
 
   
 
  ; errormask: integer: Value to AND with the received error byte
 
  ; errormask: integer: Value to AND with the received error byte
  ; The errors controlled by this mask are  
+
  ; The errors controlled by this mask are 1: RX overrun, 2: CRC, 4: Abort/align
; 1: RX overrun, 2: CRC, 4: Align
+
 
  ; Maximum value 255
 
  ; Maximum value 255
  ; Defaults to 255 if missing or invalid
+
  ; Defaults to 250 (all except overrun and abort) if missing or invalid
  ;errormask=255
+
  ;errormask=250
+
 
  ; echocancel: boolean: Enable or disable echo canceller on voice  
+
 
; circuits
+
  ; echocancel: boolean: Enable or disable echo canceller on voice circuits
 
  ; Defaults to no
 
  ; Defaults to no
  ;readonly=no  
+
  ;echocancel=no
 
   
 
   
  ; dtmfdetect: boolean: Enable or disable tone detector on voice  
+
  ; dtmfdetect: boolean: Enable or disable tone detector on voice circuits
; circuits
+
 
  ; Defaults to no
 
  ; Defaults to no
 
  ;dtmfdetect=no
 
  ;dtmfdetect=no
 
 
Other information
 
* [http://sangoma.com/assets/docs/misc/2008_09_18_Conferencing_with_Sangoma_Wanpipe.pdf Conferencing with Sangoma Wanpipe] (PDF)
 
  
 
====Example====
 
====Example====
Line 171: Line 164:
 
  bitswap=false
 
  bitswap=false
  
Here is we used Sangoma card with hardware echo cancelation module.
+
Here we used Sangoma card with hardware echo cancelation module.
  
 
And here is a config wanpipe1.conf which used by WanRouter:
 
And here is a config wanpipe1.conf which used by WanRouter:
 +
 
  [devices]
 
  [devices]
 
  wanpipe1 = WAN_AFT_TE1, Comment
 
  wanpipe1 = WAN_AFT_TE1, Comment
                                                                                                                                                                                                                           
+
                                                                                                                                                                                                                             
 
  [interfaces]
 
  [interfaces]
 
  w1g1 = wanpipe1, , API, Comment
 
  w1g1 = wanpipe1, , API, Comment
 
  w1g2 = wanpipe1, , API, Comment
 
  w1g2 = wanpipe1, , API, Comment
 
+
 
  [wanpipe1]
 
  [wanpipe1]
 
  CARD_TYPE      = AFT
 
  CARD_TYPE      = AFT
Line 222: Line 216:
 
  DATA_MUX        = YES
 
  DATA_MUX        = YES
 
  TDMV_HWEC      = YES
 
  TDMV_HWEC      = YES
 +
 +
 +
'''See also'''
 +
 +
* [http://sangoma.com/assets/docs/misc/2008_09_18_Conferencing_with_Sangoma_Wanpipe.pdf Conferencing with Sangoma Wanpipe] (PDF)
 +
 +
[[Category:Sangoma]] [[Category:ISDN]]

Latest revision as of 13:13, 4 November 2013

Sangoma Wanpipe E1/T1 PRI cards signalling and data driver.

This module can build signalling interfaces (D-channels) or audio channels (B-channels) on E1/T1 spans.

Note:The API for communicating with the wanpipe kernel drivers has changed over time.
We currently recommend drivers version 3.3.14.11 - anything older or newer may or may not compile or run correctly.
The wanpipe devices must be started before starting Yate (use the wanrouter script to start all or specific wanpipe device(s)).

Contents

[edit] Building a D-channel

D-channels are built and managed on request (by API calls), not at startup. The configuration file is read when a request is processed.
The sig parameter of the request MUST indicate an existing section in wpcard.conf and a valid card configured in driver (e.g. wanpipe1).
The siggroup parameter from the section given by sig MUST indicate a valid device configured in driver (e.g. w1g1).
An interface opens its wanpipe device and starts the worker thread when enabled by the owner. It closes the device and stop the worker thread when is disabled.

Note: No check is made if the wanpipe device is in use. If the wanpipe device is in use (by other programs or Yate) the D-channel creation won't fail.

[edit] Building a B-channel group (voice span)

B-channel groups are built and managed on request (by API calls), not at startup. The configuration file is read when a request is processed.
The voice parameter of the request MUST indicate an existing section in wpcard.conf and a valid card configured in driver (e.g. wanpipe1).
The voicegroup parameter from the section given by voice MUST indicate a valid device configured in driver (e.g. w1g2).
A voice span opens its wanpipe device and starts the worker thread when created. It closes the device and stop the worker thread when destroyed.
Voice span creation will fail if:

  • The section indicated by the voice parameter is not found in configuration file.
  • The voicegroup parameter from the span configuration section is invalid.
  • Failed to open the wanpipe device.
  • Failed to start the worker thread.

[edit] Additional commands

None

[edit] Message handlers

None

[edit] Configuration

Configuration file: wpcard.conf

; This file keeps the configuration of cards using the wanpipe driver
; Each section except for 'general' configures a group (span) of wanpipe channels


[general]
; This section is used to configure the module and set default values for
;  span parameters

; bitswap: boolean: Specify if sent/received data has each byte rotated (swapped)
; If missing, enable is assumed
; This parameter can be overridden in group sections
;bitswap=enable

; idlevalue: integer: The value to send for unused voice data channels
; Interval: 0..255. Default value: 255 (0xFF) for T1, 213 (0xD5) for E1 and BRI
; A value of -1 sets the circuit code as idle value (for circuit identification)
; This parameter can be overridden in group sections
;idlevalue=

; buflen: integer: The length of the buffers used by the data sources and consumers
; Data consumers' buffers will be twice this value
; This value can't be 0. Defaults to 160
; This parameter can be overridden in group sections
;buflen=160

; hwrepeatcapable: boolean: Use HW signalling packet repeat capability
; If disabled, the module will handle packet repeat when requested by the upper layer
; This parameter can be overridden in group sections
;hwrepeatcapable=true


;[wanpipe1]
;The section's name is the card name defined in wanpipe driver
;E.g. wanpipe1

; type: string: Specify the span type
; Allowed values:
;   E1, T1
; Defaults to E1
;type=E1

; readonly: boolean: Specifies if this is a read only span (signalling and audio data)
; If enabled, no data will be sent through this span
; Defaults to no
;readonly=no
 
; siggroup: string: The name of the device containing the signalling channel(s)
; E.g. w1g1
; This parameter is required when creating a signalling interface (D-channel)
;siggroup=w1g1

; voicegroup: string: The name of the device containing the voice (data) channel(s)
; This parameter is required when creating a voice group
; E.g. w1g2
;voicegroup=w1g2

; voicechans: string: The range of channels used for voice (data) transfer
; Channel intervals may be specified by separating the margins using the '-' character
; Individual channels or channel intervals may be separated by '.'
; Duplicate, not strict positive channel numbers, or channel numbers greater then channel
;   count (channel count defaults to 31 for E1 and to 24 for T1) are not allowed
; E.g. 1-15.17-31 or 1-23 or 1.2.3-15.17.18-30.31
; If missing, will be computed from type (E1: 1-15.17-31, T1: 1-23)
;voicechans=1-15.17-31

; offset: integer: Positive value to add to each voice channel number
; Defaults to 0 if missing or invalid
;offset=

; start: integer: Absolute start of circuits numbers, ignore group's start
; Default is offset + group's current start
;start=

; increment: integer: How much will increment this span the circuit number in
;  the group it belongs to
; Defaults to 32 for E1, 24 for T1
;increment=

; samples: integer: Specify the number of data samples expected to be received
; It is used to create the buffer to read data from span. The total buffer will have the
;  number of bytes given by the number of samples multiplied by the number of voice
;  channels configured for this span
; If missing or 0, it will be computed from type (E1: 50, T1: 64)
;samples=50

; errormask: integer: Value to AND with the received error byte
; The errors controlled by this mask are 1: RX overrun, 2: CRC, 4: Abort/align
; Maximum value 255
; Defaults to 250 (all except overrun and abort) if missing or invalid
;errormask=250
 
 
; echocancel: boolean: Enable or disable echo canceller on voice circuits
; Defaults to no
;echocancel=no

; dtmfdetect: boolean: Enable or disable tone detector on voice circuits
; Defaults to no
;dtmfdetect=no

[edit] Example

Here is an example of config from working environment:

[general]
;bitswap=enable
idlevalue=255
buflen=160
hwrepeatcapable=true
dumpevents=yes
                                                                                                                                                                                                                                                                      
[wanpipe1]
type=E1
readonly=no
siggroup=w1g1
voicegroup=w1g2
voicechans=2-31
;offset=0
increment=32
samples=40
errormask=255
echocancel=yes
dtmfdetect=yes
bitswap=false

Here we used Sangoma card with hardware echo cancelation module.

And here is a config wanpipe1.conf which used by WanRouter:

[devices]
wanpipe1 = WAN_AFT_TE1, Comment
                                                                                                                                                                                                                              
[interfaces]
w1g1 = wanpipe1, , API, Comment
w1g2 = wanpipe1, , API, Comment

[wanpipe1]
CARD_TYPE       = AFT
S514CPU         = A
CommPort        = PRI
AUTO_PCISLOT    = NO
PCISLOT         = 1
PCIBUS          = 10
FE_MEDIA        = E1
FE_LCODE        = HDB3
FE_FRAME        = NCRC4
FE_LINE         = 1
TE_CLOCK        = NORMAL
TE_REF_CLOCK    = 0
TE_HIGHIMPEDANCE= NO
TE_RX_SLEVEL    = 120
LBO             = 120OH
TE_SIG_MODE     = CCS
FE_TXTRISTATE   = NO
MTU             = 1500
UDPPORT         = 9000
TTL             = 255
;TDMV_SPAN      = 1
IGNORE_FRONT_END = NO
TDMV_HW_DTMF    = YES
;TDMV_HW_FAX_DETECT = YES
ACTIVE_CH       = ALL
DATA_MUX_MAP    = 0x01234567
                                                                                                                                                                                                                                                                                      
[w1g1]
HDLC_STREAMING  = YES
ACTIVE_CH       = 1
TDMV_HWEC       = NO
                                                                                                                                                                                                                                                                                      
[w1g2]
HDLC_STREAMING  = NO
ACTIVE_CH       = 2-31
IDLE_FLAG       = 0x7E
MTU             = 1200
MRU             = 1200
DATA_MUX        = YES
TDMV_HWEC       = YES


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers