[asterisk-r2] Question about format of R2 channels in zapata.conf

Norman Schmidt norman at omegatecnologia.com
Tue Jan 26 17:18:05 CST 2010


Hello,
Some time ago I wrote a php script which generates the zaptel/zapata.conf
files.
Recently I discovered a problem directly related to the format I use to
represent the channels at zapata.conf.

Im using the last pre-dahdi asterisk/zaptel version:
- Asterisk 1.4.21.2 built by root @ servidor on a i686 running Linux on
2009-04-12 19:48:21 UTC
- Zaptel version 1.4.12.1
- OpenR2 patch downloaded from:
http://openr2.googlecode.com/files/openr2-asterisk-1.4.21.patch
- OpenR2 version: 1.1.0, revision: exported
- LibopenR2 version 1.1.0 download from:
http://openr2.googlecode.com/files/openr2-1.1.0.tar.gz

The problem arises when Im using more than one E1 port interface. I traced
it down to the "channels" directive, at zapata.conf. Lets say Im using a
2xE1 interface and I set the "channel=" directive this way at zapata.conf:

signalling=mfcr2
context=um
mfcr2_etcetcetc options
group=1
channel=1-15,17-31

signalling=mfcr2
context=dois
mfcr2_etcetcetc options
group=2
channel=32-46,48-62

Everything works perfectly. All channels available, working:
gw*CLI> mfcr2 show channels
Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS   Rx CAS
   1 BR      20      20       No        No               IDLE     IDLE
   2 BR      20      20       No        No               IDLE     IDLE
   3 BR      20      20       No        No               IDLE     IDLE
   4 BR      20      20       No        No               IDLE     IDLE
   5 BR      20      20       No        No               IDLE     IDLE
   6 BR      20      20       No        No               IDLE     IDLE
   7 BR      20      20       No        No               IDLE     IDLE
   8 BR      20      20       No        No               IDLE     IDLE
   9 BR      20      20       No        No               IDLE     IDLE
  10 BR      20      20       No        No               IDLE     IDLE
  11 BR      20      20       No        No               IDLE     IDLE
  12 BR      20      20       No        No               IDLE     IDLE
  13 BR      20      20       No        No               IDLE     IDLE
  14 BR      20      20       No        No               IDLE     IDLE
  15 BR      20      20       No        No               IDLE     IDLE
  17 BR      20      20       No        No               IDLE     IDLE
  18 BR      20      20       No        No               IDLE     IDLE
  19 BR      20      20       No        No               IDLE     IDLE
  20 BR      20      20       No        No               IDLE     IDLE
  21 BR      20      20       No        No               IDLE     IDLE
  22 BR      20      20       No        No               IDLE     IDLE
  23 BR      20      20       No        No               IDLE     IDLE
  24 BR      20      20       No        No               IDLE     IDLE
  25 BR      20      20       No        No               IDLE     IDLE
  26 BR      20      20       No        No               IDLE     IDLE
  27 BR      20      20       No        No               IDLE     IDLE
  28 BR      20      20       No        No               IDLE     IDLE
  29 BR      20      20       No        No               IDLE     IDLE
  30 BR      20      20       No        No               IDLE     IDLE
  31 BR      20      20       No        No               IDLE     IDLE
  32 BR      20      20       No        No               IDLE     IDLE
  33 BR      20      20       No        No               IDLE     IDLE
  34 BR      20      20       No        No               IDLE     IDLE
  35 BR      20      20       No        No               IDLE     IDLE
  36 BR      20      20       No        No               IDLE     IDLE
  37 BR      20      20       No        No               IDLE     IDLE
  38 BR      20      20       No        No               IDLE     IDLE
  39 BR      20      20       No        No               IDLE     IDLE
  40 BR      20      20       No        No               IDLE     IDLE
  41 BR      20      20       No        No               IDLE     IDLE
  42 BR      20      20       No        No               IDLE     IDLE
  43 BR      20      20       No        No               IDLE     IDLE
  44 BR      20      20       No        No               IDLE     IDLE
  45 BR      20      20       No        No               IDLE     IDLE
  46 BR      20      20       No        No               IDLE     IDLE
  48 BR      20      20       No        No               IDLE     IDLE
  49 BR      20      20       No        No               IDLE     IDLE
  50 BR      20      20       No        No               IDLE     IDLE
  51 BR      20      20       No        No               IDLE     IDLE
  52 BR      20      20       No        No               IDLE     IDLE
  53 BR      20      20       No        No               IDLE     IDLE
  54 BR      20      20       No        No               IDLE     IDLE
  55 BR      20      20       No        No               IDLE     IDLE
  56 BR      20      20       No        No               IDLE     IDLE
  57 BR      20      20       No        No               IDLE     IDLE
  58 BR      20      20       No        No               IDLE     IDLE
  59 BR      20      20       No        No               IDLE     IDLE
  60 BR      20      20       No        No               IDLE     IDLE
  61 BR      20      20       No        No               IDLE     IDLE
  62 BR      20      20       No        No               IDLE     IDLE

* BUT * If I set the "channel=" directives the following way (the way my
script generates them):

signalling=mfcr2
context=um
mfcr2_etcetcetc options
group=1
channel=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31

signalling=mfcr2
context=dois
mfcr2_etcetcetc options
group=2
channel=32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62

Only 34 channels are made available, and there is NO WAY I can use the
channels 34-62 :

gw*CLI> mfcr2 show  channels
Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS   Rx CAS
   1 BR      20      20       No        No               IDLE     BLOCK
   2 BR      20      20       No        No               IDLE     BLOCK
   3 BR      20      20       No        No               IDLE     BLOCK
   4 BR      20      20       No        No               IDLE     BLOCK
   5 BR      20      20       No        No               IDLE     BLOCK
   6 BR      20      20       No        No               IDLE     BLOCK
   7 BR      20      20       No        No               IDLE     BLOCK
   8 BR      20      20       No        No               IDLE     BLOCK
   9 BR      20      20       No        No               IDLE     BLOCK
  10 BR      20      20       No        No               IDLE     BLOCK
  11 BR      20      20       No        No               IDLE     BLOCK
  12 BR      20      20       No        No               IDLE     BLOCK
  13 BR      20      20       No        No               IDLE     BLOCK
  14 BR      20      20       No        No               IDLE     BLOCK
  15 BR      20      20       No        No               IDLE     BLOCK
  17 BR      20      20       No        No               IDLE     BLOCK
  18 BR      20      20       No        No               IDLE     BLOCK
  19 BR      20      20       No        No               IDLE     BLOCK
  20 BR      20      20       No        No               IDLE     BLOCK
  21 BR      20      20       No        No               IDLE     BLOCK
  22 BR      20      20       No        No               IDLE     BLOCK
  23 BR      20      20       No        No               IDLE     BLOCK
  24 BR      20      20       No        No               IDLE     BLOCK
  25 BR      20      20       No        No               IDLE     BLOCK
  26 BR      20      20       No        No               IDLE     BLOCK
  27 BR      20      20       No        No               IDLE     BLOCK
  28 BR      20      20       No        No               IDLE     BLOCK
  29 BR      20      20       No        No               IDLE     BLOCK
  30 BR      20      20       No        No               IDLE     BLOCK
  31 BR      20      20       No        No               IDLE     BLOCK
  32 BR      20      20       No        No               IDLE     BLOCK
  33 BR      20      20       No        No               IDLE     BLOCK   

I use this "one-channel-at-a-time-with-commas" format of channel= directives
with PRI E1 ports with *no* problems. I can even MIX PRI E1 ports with R2
ports in a Quad E1 interface, and the problem arises only when Im using this
format on more than one E1 port with mfcr2 signalling. The zaptel.conf file
accepts both formats, for both types of signalling.

Resuming, on zapata.conf, this:

channel=1-15,17-31
channel=32-46,48-62

works with signalling=mfcr2
while this:

channel=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
channel=32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62

does not. Does libopenR2 not accept the long format? 

Norman





More information about the asterisk-r2 mailing list