Koozali.org: home of the SME Server

SAIL - Zaphfc

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« on: February 23, 2007, 04:57:12 PM »
Hi all,

I am currently trying to install the ISDN version of sail ...

- anabri-asterisk-florz-1.2.10-5.i686.rpm
- anabri-asterisk-zappri-florz-1.2.6-4.i686.rpm
- Sail 2.1.14-425

Sme 7.1 running kernel 2.6.9-42.0.8.EL ( single proc )

- Added card pci ID ( Quadbri Junghanns Rev 1.0 )

Quote
/sbin/e-smith/db selintra-work set pci:1397:08b4:1397:b520 sysdev probe zaphfc zzeor EOR


- When trying to 'probe', card is not recognized as telephony device :
Found following card...

Code: [Select]
00:14.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-4S] (rev 01)
Subsystem: Cologne Chip Designs GmbH HFC-4S [IOB4ST]
Flags: medium devsel, IRQ 5
I/O ports at cc00 [size=8]
Memory at e700c000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2

Requesting Load of zaphfc ...

Loading zaptel...
Loading zaphfc...
Loading ztdummy...

Zaptel view of card in /proc/zaptel/1
 Span 1: ZTDUMMY/1 "ZTDUMMY/1 1"
 

- Also remarked strange things into modprobe.conf :

Code: [Select]
...
alias tap12 off
alias tap13 off
alias tap14 off
alias tap15 off
alias char-major-180 usbcore
options torisa base=0xd0000
alias char-major-196 torisa
post-install tor2 /sbin/ztcfg
post-install torisa /sbin/ztcfg
post-install wcusb /sbin/ztcfg
post-install wcfxo /sbin/ztcfg
post-install wctdm /sbin/ztcfg
post-install wctdm24xxp /sbin/ztcfg
post-install ztdynamic /sbin/ztcfg
post-install ztd-eth /sbin/ztcfg
post-install wct1xxp /sbin/ztcfg
post-install wct4xxp /sbin/ztcfg
post-install wcte11xp /sbin/ztcfg
post-install pciradio /sbin/ztcfg
post-install ztd-loc /sbin/ztcfg
post-install ztdummy /sbin/ztcfg
alias wcfxs wctdm
alias wct2xxp wct4xxp
alias eth0 via-rhine
options bond0 miimon=200 mode=active-backup
options hisax  protocol=2

 
But zaptel/zaphfc are loaded ( lsmod ):

Code: [Select]
Module                  Size  Used by
ztdummy                 3540  0
zaphfc                 14740  0
zaptel                208900  4 ztdummy,zaphfc
crc_ccitt               2241  1 zaptel


... Any idea of what the issue can be ?

Thanks,

Hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #1 on: February 23, 2007, 10:24:45 PM »
Hi Herve,

You're on your own on this one!  We have no experience of this card and there is no code in PCI to deal with it.  Right now PCI will handle single HFC cards only.  The work to put the generate code in for a 4-way shouldn't be too difficult but it isn't there now.  If you want to have a go then I can send you a talk-through on the PCI code.  

Also - we don't dump ztdummy as well as we should. You must have run a probe without the card in place.  To get rid of it, do an initialise and then physically remove dummy with _rmmod ztdummy_.  Then do your probe again.  In theory dummy shouldn't make any difference but there are a few references in the Bristuff code which say you shouldn't load it with zaphfc.[/code]

Best

Jeff

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #2 on: February 24, 2007, 08:38:36 AM »
Quote from: "selintra"
Hi Herve,

You're on your own on this one!  We have no experience of this card and there is no code in PCI to deal with it.  Right now PCI will handle single HFC cards only.  The work to put the generate code in for a 4-way shouldn't be too difficult but it isn't there now.  If you want to have a go then I can send you a talk-through on the PCI code.


Yes Please... now I understand better what the point is, I was convinced you were supporting Kapejod cards.

very first step seems to be :

Code: [Select]
modprobe qozap

At least the card is dectected as a Quad span :

Quote
Found following card...

00:14.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-4S] (rev 01)
   Subsystem: Cologne Chip Designs GmbH HFC-4S [IOB4ST]
   Flags: medium devsel, IRQ 5
   I/O ports at cc00
   Memory at e700c000 (32-bit, non-prefetchable) [size=4K]
   Capabilities: [40] Power Management version 2

Requesting Load of qozap ...

Loading zaptel...
Loading zaphfc...
Loading ztdummy...

Zaptel view of card in /proc/zaptel/1
 Span 1: ZTDUMMY/1 "ZTDUMMY/1 1"
 
 

Zaptel view of card in /proc/zaptel/2
 Span 2: ztqoz/2/1 "quadBRI PCI ISDN Card 1 Span 1 [TE] (cardID 0)"
 
        1 ztqoz2/1/1
        2 ztqoz2/1/2
        3 ztqoz2/1/3
 

Unknown Card type in slot 2 - ignoring...

Zaptel view of card in /proc/zaptel/3
 Span 3: ztqoz/2/2 "quadBRI PCI ISDN Card 1 Span 2 [TE] (cardID 0)"
 
        4 ztqoz2/2/1
        5 ztqoz2/2/2
        6 ztqoz2/2/3
 

Unknown Card type in slot 3 - ignoring...

Zaptel view of card in /proc/zaptel/4
 Span 4: ztqoz/2/3 "quadBRI PCI ISDN Card 1 Span 3 [TE] (cardID 0)"
 
        7 ztqoz2/3/1
        8 ztqoz2/3/2
        9 ztqoz2/3/3
 

Unknown Card type in slot 4 - ignoring...

Zaptel view of card in /proc/zaptel/5
 Span 5: ztqoz/2/4 "quadBRI PCI ISDN Card 1 Span 4 [TE] (cardID 0)"
 
       10 ztqoz2/4/1
       11 ztqoz2/4/2
       12 ztqoz2/4/3
 

Unknown Card type in slot 5 - ignoring...


Best,

hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #3 on: February 24, 2007, 09:31:56 AM »
OK - i'll mail you a write-up with the code.


Best

J

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #4 on: February 24, 2007, 09:44:46 AM »
Hi Jeff,

For your info, very quick and dirty test :

start the system ... don't touch the web interface ...

Code: [Select]
- rmmod all astersik related mods but zaptel
- modprobe 'qozap'


zaptel .conf :

Quote
span=1,0,3,ccs,ami
bchan=1,2
dchan=3

span=2,0,3,ccs,ami
bchan=4,5
dchan=6

span=3,0,3,ccs,ami
bchan=7,8
dchan=9

span=4,0,3,ccs,ami
bchan=10,11
dchan=12


Let's take a look

Code: [Select]
# ztcfg -vv

Zaptel Configuration
======================

SPAN 1: CCS/ AMI Build-out: 399-533 feet (DSX-1)
SPAN 2: CCS/ AMI Build-out: 399-533 feet (DSX-1)
SPAN 3: CCS/ AMI Build-out: 399-533 feet (DSX-1)
SPAN 4: CCS/ AMI Build-out: 399-533 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: D-channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
Channel 05: Clear channel (Default) (Slaves: 05)
Channel 06: D-channel (Default) (Slaves: 06)
Channel 07: Clear channel (Default) (Slaves: 07)
Channel 08: Clear channel (Default) (Slaves: 08)
Channel 09: D-channel (Default) (Slaves: 09)
Channel 10: Clear channel (Default) (Slaves: 10)
Channel 11: Clear channel (Default) (Slaves: 11)
Channel 12: D-channel (Default) (Slaves: 12)

12 channels configured.

Changing signalling on channel 1 from Unused to Clear channel
Changing signalling on channel 2 from Unused to Clear channel
Changing signalling on channel 3 from Unused to HDLC with FCS check
Changing signalling on channel 4 from Unused to Clear channel
Changing signalling on channel 5 from Unused to Clear channel
Changing signalling on channel 6 from Unused to HDLC with FCS check
Changing signalling on channel 7 from Unused to Clear channel
Changing signalling on channel 8 from Unused to Clear channel
Changing signalling on channel 9 from Unused to HDLC with FCS check
Changing signalling on channel 10 from Unused to Clear channel
Changing signalling on channel 11 from Unused to Clear channel
Changing signalling on channel 12 from Unused to HDLC with FCS check



- At this stage, all channels are up, red lamp (X4) on the card are on.
- Quick test with ISDN analyser show Layer one to activate OK ( PMP - NT EDSS1 mode analyser )

zapata.conf :

Code: [Select]
;#------------------------------------------------------------
;# DO NOT MODIFY THIS FILE! It is updated automatically by the
;# SAIL & SME Server software. Instead, modify the source template in
;# an /etc/e-smith/templates-custom directory. For more
;# information, see http://www.e-smith.org/custom/
;#
;# copyright (C) 2005 Selintra Ltd. United Kingdom
;#------------------------------------------------------------

; quick and dirty test, sorry but I did it ;-)

[channels]
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
relaxdtmf=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
faxdetect=incoming

switchtype = euroisdn
; p2mp TE mode (for connecting ISDN lines in point-to-multipoint mode)
signalling = bri_cpe_ptmp
; p2p TE mode (for connecting ISDN lines in point-to-point mode)
;signalling = bri_cpe
; p2mp NT mode (for connecting ISDN phones in point-to-multipoint mode)
;signalling = bri_net_ptmp
; p2p NT mode (for connecting an ISDN pbx in point-to-point mode)
;signalling = bri_net

pridialplan = local
prilocaldialplan = dynamic
nationalprefix = 0
internationalprefix = 00
priindication = passthrough

context=default ; should be able to call to internal sail without touching web-base config ...
group = 1
channel => 1-2

group = 2
channel => 4-5

group = 3
channel => 7-8

group = 4
channel => 10-11


- Asterisk start ...

Quote
Asterisk Ready.
  == Primary D-Channel on span 2 down
  == Primary D-Channel on span 3 down
  == Primary D-Channel on span 4 down

Looks great ... Analyser connected to 1

YES :-)


Quote
1 < Protocol Discriminator: Q.931 (8)  len=23
1 < Call Ref: len= 1 (reference 10/0xA) (Originator)
1 < Message type: SETUP (5)
1 < [1 041  031  801  901  a31 ]
1 < Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer capability: Speech (0)
1 <                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
1 <                              Ext: 1  User information layer 1: A-Law (35)
1 < [1 181  011  891 ]
1 < Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 <                        ChanSel: B1 channel
1                          ]
1 < [1 701  051  801  331  311  311  311 ]
1 < Called Number (len= 7) [ Ext: 1  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0) '3111' ]
1 < [1 7d1  021  911  811 ]
1 < High-layer compatibilty (len= 4) [ 1 0x91 1 0x81 1  ]

1 > Protocol Discriminator: Q.931 (8)  len=7
1 > Call Ref: len= 1 (reference 138/0x8A) (Terminator)
1 > Message type: CALL PROCEEDING (2)
1 > [1 181  011  891 ]
1 > Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 >                        ChanSel: B1 channel
1                          ]
    -- Accepting voice call from '' to '3111' on channel 0/1, span 1


Best,

hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #5 on: February 24, 2007, 11:18:55 AM »
Too cool for school!  :D  :D


All we need to do now is automate the detection and trunk creation;  and now we have your definitions that should be pretty easy.

Good work mate.

Best

J

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #6 on: February 24, 2007, 11:35:35 AM »
Hi Jeff,

Yes ... I will go further testing more 'ISDN' settings to cover all kind
of common stuffs ( PMP/PP/TON E164/NT/TE ... )

To my opinion, should be great to cover the product range of Junghanns.
He has a very deep understanding of what Euro ISDN is, and offers a wide range of cards.

His 'GSM BOX' solution looks also to be great.

For low-end, including chan_capi & AVM Fritz drivers on top of 'HFC' migh be a good idea. Those are inexpensive good working cards.

Don't hezitate to ask me if you think I can help !.

Best,

Hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #7 on: February 24, 2007, 11:50:22 AM »
just an aside

To get the correct module to auto load will need the following changes....

you have....

sbin/e-smith/db selintra-work set pci:1397:08b4:1397:b520 sysdev probe zaphfc zzeor EOR

Just change it to

sbin/e-smith/db selintra-work set pci:1397:08b4:1397:b520 sysdev probe qozap zzeor EOR

Then the web-probe should request the correct module load and mark it for future asterisk startups -  you will need to add a definition for qozap to the database....

qozap=loadmod|status|NO|zzeor|EOR

this will also need a small change to /etc/init.d/asterisk to recognise qozap at startup.... Here's the relevant bit from the bash code (amended)

Code: [Select]
#
#   selintra mod for SARK/SAIL
#
if [ -e /home/e-smith/db/selintra ]; then

    ZAPHFC=`/sbin/e-smith/db selintra getprop zaphfc status`
    WCTDM=`/sbin/e-smith/db selintra getprop wctdm  status`
    WCFXO=`/sbin/e-smith/db selintra getprop wcfxo status`
    QOZAP=`/sbin/e-smith/db selintra getprop qozap status`    
    ZTDUMMY=`/sbin/e-smith/db selintra getprop ztdummy status`

    if [ ! -e /dev/zap ]; then
        /sbin/modprobe zaptel
WAITCNT=0
        echo "Waiting for udev."
        while [ ! -e /dev/zap -a $WAITCNT -le 60 ]; do
            sleep 1
   WAITCNT=`expr $WAITCNT + 1`
done
if [ $WAITCNT -gt 60 ]; then
   echo "Waited too long for udev, - aborting Asterisk  startup."
   exit 1
fi

if [ $ZAPHFC = 'YES' ]; then  
            /sbin/modprobe zaphfc
fi

if [ $WCTDM = 'YES' ]; then
            /sbin/modprobe wctdm
fi

if [ $WCFXO = 'YES' ]; then
            /sbin/modprobe wcfxo
        fi

if [ $QOZAP = 'YES' ]; then    
            /sbin/modprobe qozap                
        fi                                                  

        if [ $ZTDUMMY = 'YES' ]; then
    /sbin/modprobe ztdummy
fi
/sbin/ztcfg
        if [ -e /etc/fxotune.conf && -e /home/selintra/fxotune ]; then
  echo "loading tuning coefficients"
           /home/selintra/fxotune -s
        fi

     fi
fi    
#
#   end selintra mod
#


I'll knock up an alpha release for you over the next couple of days.

Once again - really great work mate.

J

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #8 on: February 24, 2007, 12:10:40 PM »
Quote from: "selintra"
just an aside

To get the correct module to auto load will need the following changes....

you have....

sbin/e-smith/db selintra-work set pci:1397:08b4:1397:b520 sysdev probe zaphfc zzeor EOR

Just change it to

sbin/e-smith/db selintra-work set pci:1397:08b4:1397:b520 sysdev probe qozap zzeor EOR

Then the web-probe should request the correct module load and mark it for future asterisk startups -  you will need to add a definition for qozap to the database....

qozap=loadmod|status|NO|zzeor|EOR


Up to there, was already done ;-)

Quote
this will also need a small change to /etc/init.d/asterisk to recognise qozap at startup.... Here's the relevant bit from the bash code (amended)



Code: [Select]
#
#   selintra mod for SARK/SAIL
#
if [ -e /home/e-smith/db/selintra ]; then

    ZAPHFC=`/sbin/e-smith/db selintra getprop zaphfc status`
    WCTDM=`/sbin/e-smith/db selintra getprop wctdm  status`
    WCFXO=`/sbin/e-smith/db selintra getprop wcfxo status`
    QOZAP=`/sbin/e-smith/db selintra getprop qozap status`    
    ZTDUMMY=`/sbin/e-smith/db selintra getprop ztdummy status`

    if [ ! -e /dev/zap ]; then
        /sbin/modprobe zaptel
WAITCNT=0
        echo "Waiting for udev."
        while [ ! -e /dev/zap -a $WAITCNT -le 60 ]; do
            sleep 1
   WAITCNT=`expr $WAITCNT + 1`
done
if [ $WAITCNT -gt 60 ]; then
   echo "Waited too long for udev, - aborting Asterisk  startup."
   exit 1
fi

if [ $ZAPHFC = 'YES' ]; then  
            /sbin/modprobe zaphfc
fi

if [ $WCTDM = 'YES' ]; then
            /sbin/modprobe wctdm
fi

if [ $WCFXO = 'YES' ]; then
            /sbin/modprobe wcfxo
        fi

if [ $QOZAP = 'YES' ]; then    
            /sbin/modprobe qozap                
        fi                                                  

        if [ $ZTDUMMY = 'YES' ]; then
    /sbin/modprobe ztdummy
fi
/sbin/ztcfg
        if [ -e /etc/fxotune.conf && -e /home/selintra/fxotune ]; then
  echo "loading tuning coefficients"
           /home/selintra/fxotune -s
        fi

     fi
fi    
#
#   end selintra mod
#


OK, sounds very clear & easy.
Will continue playing/testing asap :-)

Quote
I'll knock up an alpha release for you over the next couple of days.


Nice !

Thank you very much,

Best,

Hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #9 on: February 24, 2007, 09:08:52 PM »
Hi Herve

Quick question  - with your quadBRI card running in slot 1, what do you see when you do

Code: [Select]
cat /proc/zaptel/1

Kind Regards

J

Also...

Quote
Yes ... I will go further testing more 'ISDN' settings to cover all kind
of common stuffs ( PMP/PP/TON E164/NT/TE ... )

To my opinion, should be great to cover the product range of Junghanns.
He has a very deep understanding of what Euro ISDN is, and offers a wide range of cards.

His 'GSM BOX' solution looks also to be great.

For low-end, including chan_capi & AVM Fritz drivers on top of 'HFC' migh be a good idea. Those are inexpensive good working cards.


Agreed - lets do it.

I can probably simplify the architecture to make the boards more "plug-in" by describing them further in the database rather than in the code.

ps  What test gear do you have?

Here we only have ISDN2E simulator.  We can't simulate PRI here - can you?

Best

J

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #10 on: February 25, 2007, 07:37:20 AM »
Hi Jeff,

Sorry for late reply, lot of things to do this weekend ...

1) Zap reply ( Only span 1 is really connected ) :

Quote
# cat /proc/zaptel/1
Span 1: ztqoz/2/1 "quadBRI PCI ISDN Card 1 Span 1 [TE] (cardID 0) Layer 1 ACTIVA                                                                             TED (F7)"

           1 ztqoz2/1/1 Clear (In use)
           2 ztqoz2/1/2 Clear (In use)
           3 ztqoz2/1/3 HDLCFCS (In use)

# cat /proc/zaptel/2
Span 2: ztqoz/2/2 "quadBRI PCI ISDN Card 1 Span 2 [TE] (cardID 0) Layer 1 DEACTI                                                                             VATED (F3)"

           4 ztqoz2/2/1 Clear (In use)
           5 ztqoz2/2/2 Clear (In use)
           6 ztqoz2/2/3 HDLCFCS (In use)

# cat /proc/zaptel/3
Span 3: ztqoz/2/3 "quadBRI PCI ISDN Card 1 Span 3 [TE] (cardID 0) Layer 1 DEACTI                                                                             VATED (F4)"

           7 ztqoz2/3/1 Clear (In use)
           8 ztqoz2/3/2 Clear (In use)
           9 ztqoz2/3/3 HDLCFCS (In use)

# cat /proc/zaptel/4
Span 4: ztqoz/2/4 "quadBRI PCI ISDN Card 1 Span 4 [TE] (cardID 0) Layer 1 DEACTI                                                                             VATED (F4)"

          10 ztqoz2/4/1 Clear (In use)
          11 ztqoz2/4/2 Clear (In use)
          12 ztqoz2/4/3 HDLCFCS (In use)


2) From what I can see, no difference between Duo-bri/Quad-bri/Octo-bri.
    I only have Quad here, but can also activate 1,2,3 or 4 spans.

To define Sync source, timing has to be kept into account:
Quote
span=(spannum),(timing),(LBO),(framing),(coding)[,(crc)]


Example ( 2 spans, 1=master sync src, 2=alternate )

Code: [Select]
span=1,1,3,ccs,ami
bchan=1,2
dchan=3

span=2,2,3,ccs,ami
bchan=4,5
dchan=6

;span=3,0,3,ccs,ami
;bchan=7,8
;dchan=9

;span=4,0,3,ccs,ami
;bchan=10,11
;dchan=12


3) ISDN tester is wandel & goltermann IBT-10

I do not have PCI PRI card here, To obtain A PRI tester would not be
a problem ( Wandel & goltermann IBT-20 or Aurora trend ).

4) By modifying the system as you decribed before, it allows the system to start OK ( Only Zaptel & Qozap loaded ). Hereafter what I get if I do a PCI Probe :

Quote
Found following card...

00:14.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-4S] (rev 01)
   Subsystem: Cologne Chip Designs GmbH HFC-4S [IOB4ST]
   Flags: medium devsel, IRQ 5
   I/O ports at cc00
   Memory at e700c000 (32-bit, non-prefetchable) [size=4K]
   Capabilities: [40] Power Management version 2

Requesting Load of qozap ...

Loading zaptel...
Loading qozap...

Zaptel view of card in /proc/zaptel/1
 Span 1: ztqoz/2/1 "quadBRI PCI ISDN Card 1 Span 1 [TE] (cardID 0) Layer 1 ACTIVATED (F7)"
 
        1 ztqoz2/1/1 Clear (In use)
        2 ztqoz2/1/2 Clear (In use)
        3 ztqoz2/1/3 HDLCFCS (In use)
 

Unknown Card type in slot 1 - ignoring...

Zaptel view of card in /proc/zaptel/2
 Span 2: ztqoz/2/2 "quadBRI PCI ISDN Card 1 Span 2 [TE] (cardID 0) Layer 1 DEACTIVATED (F3)"
 
        4 ztqoz2/2/1 Clear
        5 ztqoz2/2/2 Clear
        6 ztqoz2/2/3 HDLCFCS
 

Unknown Card type in slot 2 - ignoring...

Zaptel view of card in /proc/zaptel/3
 Span 3: ztqoz/2/3 "quadBRI PCI ISDN Card 1 Span 3 [TE] (cardID 0) Layer 1 DEACTIVATED (F3)"
 
        7 ztqoz2/3/1 Clear
        8 ztqoz2/3/2 Clear
        9 ztqoz2/3/3 HDLCFCS
 

Unknown Card type in slot 3 - ignoring...

Zaptel view of card in /proc/zaptel/4
 Span 4: ztqoz/2/4 "quadBRI PCI ISDN Card 1 Span 4 [TE] (cardID 0) Layer 1 DEACTIVATED (F3)"
 
       10 ztqoz2/4/1 Clear
       11 ztqoz2/4/2 Clear
       12 ztqoz2/4/3 HDLCFCS
 

Unknown Card type in slot 4 - ignoring...


5) Thinkings ....

- I don't know how far you want to deal with such ISDN cards, TE mode only looks relatively easy to cover, if you want to allow some spans to be NT mode, it becomes - to my opinion- a little bit more complicated.

TE/NT mode important parametres :

- PP or PMP mode ISDN
- Spans Activate/deactivate
- Group(s)
- (PRI) CRC

NT mode for a span should create 2 extensions automatically.

Example mixed environment (NT/TE) from 'Junghanns' :

Code: [Select]
S/T 1,2 in NT mode, S/T 3,4,5,6,7,8 in TE
mode
X (binary) = 00000011
X (decimal) = 3
insmod qozap.ko ports=3 ; (kernel 2.6)


By putting
Code: [Select]
#modprobe qozap ports=12 in startup , I spliited my card into 2 TE and 2 NT spans :

Quote
Found following card...

00:14.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-4S] (rev 01)
   Subsystem: Cologne Chip Designs GmbH HFC-4S [IOB4ST]
   Flags: medium devsel, IRQ 5
   I/O ports at cc00
   Memory at e700c000 (32-bit, non-prefetchable) [size=4K]
   Capabilities: [40] Power Management version 2

Requesting Load of qozap ...

Loading zaptel...
Loading qozap...

Zaptel view of card in /proc/zaptel/1
 Span 1: ztqoz/2/1 "quadBRI PCI ISDN Card 1 Span 1 [TE] (cardID 0) Layer 1 ACTIVATED (F7)"
 
        1 ztqoz2/1/1 Clear (In use)
        2 ztqoz2/1/2 Clear (In use)
        3 ztqoz2/1/3 HDLCFCS (In use)
 

Unknown Card type in slot 1 - ignoring...

Zaptel view of card in /proc/zaptel/2
 Span 2: ztqoz/2/2 "quadBRI PCI ISDN Card 1 Span 2 [TE] (cardID 0) Layer 1 DEACTIVATED (F3)" RED
 
        4 ztqoz2/2/1
        5 ztqoz2/2/2
        6 ztqoz2/2/3
 

Unknown Card type in slot 2 - ignoring...

Zaptel view of card in /proc/zaptel/3
 Span 3: ztqoz/2/3 "quadBRI PCI ISDN Card 1 Span 3 [NT] (cardID 0) Layer 1 DEACTIVATED (G0)"
 
        7 ztqoz2/3/1
        8 ztqoz2/3/2
        9 ztqoz2/3/3
 

Unknown Card type in slot 3 - ignoring...

Zaptel view of card in /proc/zaptel/4
 Span 4: ztqoz/2/4 "quadBRI PCI ISDN Card 1 Span 4 [NT] (cardID 0) Layer 1 DEACTIVATED (G0)"
 
       10 ztqoz2/4/1
       11 ztqoz2/4/2
       12 ztqoz2/4/3

Unknown Card type in slot 4 - ignoring...



6) Test trace ( Point to Point ISDN - TE mode ) :

Quote
Enabled debugging on span 1
1 < Protocol Discriminator: Q.931 (8)  len=33
1 < Call Ref: len= 1 (reference 10/0xA) (Originator)
1 < Message type: SETUP (5)
1 < [1 041  031  801  901  a31 ]
1 < Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer capability: Speech (0)
1 <                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
1 <                              Ext: 1  User information layer 1: A-Law (35)
1 < [1 181  011  891 ]
1 < Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 <                        ChanSel: B1 channel
1                          ]
1 < [1 6c1  061  001  801  351  301  301  301 ]
1 < Calling Number (len= 8) [ Ext: 0  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0)
1 <                           Presentation: Presentation permitted, user number not screened (0) '5000' ]
1 < [1 701  071  801  311  321  321  311  311  311 ]
1 < Called Number (len= 9) [ Ext: 1  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0) '122111' ]
1 < [1 7d1  021  911  811 ]
1 < High-layer compatibilty (len= 4) [ 1 0x91 1 0x81 1  ]
1 -- Making new call for cr 10
1 -- Processing Q.931 Call Setup
1 -- Processing IE 4 (cs0, Bearer Capability)
1 -- Processing IE 24 (cs0, Channel Identification)
1 -- Processing IE 108 (cs0, Calling Party Number)
1 -- Processing IE 112 (cs0, Called Party Number)
1 -- Processing IE 125 (cs0, High-layer Compatibility)
1 > Protocol Discriminator: Q.931 (8)  len=7
1 > Call Ref: len= 1 (reference 138/0x8A) (Terminator)
1 > Message type: CALL PROCEEDING (2)
1 > [1 181  011  891 ]
1 > Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 >                        ChanSel: B1 channel
1                          ]
    -- Accepting voice call from '5000' to '122111' on channel 0/1, span 1
    -- Executing AGI("Zap/1-1", "selintra|OutTrunk|uxsrv-1uxsrv-2") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (IAX2/uxsrv-2uxsrv-1@uxsrv-2uxsrv-1/2111)
    -- Called uxsrv-2uxsrv-1@uxsrv-2uxsrv-1/2111
    -- Call accepted by 192.168.10.253 (format ulaw)
    -- Format for call is ulaw
    -- IAX2/uxsrv-2uxsrv-1-16384 is ringing
1 > Protocol Discriminator: Q.931 (8)  len=4
1 > Call Ref: len= 1 (reference 138/0x8A) (Terminator)
1 > Message type: ALERTING (1)
    -- IAX2/uxsrv-2uxsrv-1-16384 stopped sounds
    -- IAX2/uxsrv-2uxsrv-1-16384 answered Zap/1-1
1 > Protocol Discriminator: Q.931 (8)  len=11
1 > Call Ref: len= 1 (reference 138/0x8A) (Terminator)
1 > Message type: CONNECT (7)
1 > [1 181  011  891 ]
1 > Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 >                        ChanSel: B1 channel
1                          ]
1 > [1 1e1  021  811  821 ]
1 > Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Private network serving the local user (1)
1 >                               Ext: 1  Progress Description: Called equipment is non-ISDN. (2) ]
1 < Protocol Discriminator: Q.931 (8)  len=7
1 < Call Ref: len= 1 (reference 10/0xA) (Originator)
1 < Message type: CONNECT ACKNOWLEDGE (15)
1 < [1 181  011  891 ]
1 < Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 <                        ChanSel: B1 channel
1                          ]
1 -- Processing IE 24 (cs0, Channel Identification)
1 < Protocol Discriminator: Q.931 (8)  len=8
1 < Call Ref: len= 1 (reference 10/0xA) (Originator)
1 < Message type: DISCONNECT (69)
1 < [1 081  021  821  901 ]
1 < Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
1 <                  Ext: 1  Cause: Unknown (16), class = Normal Event (1) ]
1 -- Processing IE 8 (cs0, Cause)
    -- Channel 0/1, span 1 got hangup request
    -- Hungup 'IAX2/uxsrv-2uxsrv-1-16384'
  == Spawn extension (default, 122111, 1) exited non-zero on 'Zap/1-1'
    -- Executing Hangup("Zap/1-1", "") in new stack
  == Spawn extension (default, h, 1) exited non-zero on 'Zap/1-1'
1 NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, peerstate Disconnect Request
1 > Protocol Discriminator: Q.931 (8)  len=8
1 > Call Ref: len= 1 (reference 138/0x8A) (Terminator)
1 > Message type: RELEASE (77)
1 > [1 081  021  811  901 ]
1 > Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Private network serving the local user (1)
1 >                  Ext: 1  Cause: Unknown (16), class = Normal Event (1) ]
    -- Hungup 'Zap/1-1'
1 < Protocol Discriminator: Q.931 (8)  len=8
1 < Call Ref: len= 1 (reference 10/0xA) (Originator)
1 < Message type: RELEASE COMPLETE (90)
1 < [1 081  021  821  901 ]
1 < Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
1 <                  Ext: 1  Cause: Unknown (16), class = Normal Event (1) ]
1 -- Processing IE 8 (cs0, Cause)
1 NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
1 NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null


Best,

Hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #11 on: February 25, 2007, 09:12:46 AM »
Thanks for this Herve.

One more question.  How much demand do you think there might be for NT mode?  Our assumption is that it would be used mainly to connect ISDN Legacy PBX to SAIL.

Yes/No?

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #12 on: February 25, 2007, 10:31:51 AM »
Quote from: "selintra"
Thanks for this Herve.

One more question.  How much demand do you think there might be for NT mode?  Our assumption is that it would be used mainly to connect ISDN Legacy PBX to SAIL.

Yes/No?


Hmmm, difficult to answer to that...

For sure most of the connections will be TE mode, but in some cases, NT mode can be interesting :

- ISDN modems ( Fax Group 4 ... )
- Existing (expensive) Video conferencing equipment
- GSM boxes
- ...

NT mode can also be used as 'testing' equipment instead of expensive analysers ... .

I would finaly say ... it's up to you. I can imagine supporting NT/TE to be much more work than TE only. On the other end, ISDN support means ISDN support (including NT/TE).

Maybe some in-between solution such as 'templated' configurations:

- HFC ( already done - Only TE )
- Duo Bri ( Only TE )
- Quad Bri ( Only TE / 2TE2NT / Only NT )
- Octo Bri ( Only TE / 4TE4NT / Only NT )

It gives 8 possible combinations ( Including HFC )

==> 8 Templates 'zaphfc/qozap/zapcfg/zapata'

Example : if Template "4" = "Quad Bri 2TE2NT is chosen"

- Qozap is fixed

Code: [Select]
#modprobe qozap ports=12

- zapcfg(X) can be fixed
Code: [Select]

# Master sync TE
span=X,1,3,ccs,ami
bchan=X,X+1
dchan=X+2

# Alternate SYNC TE
span=X+1,2,3,ccs,ami
bchan=X+3,X+4
dchan=X+5

# Master SYNC NT ( don't know yet if sync provided ... ? to test )
span=X+2,1,3,ccs,ami
bchan=X+6,X+7
dchan=X+8

# Alternate SYNC NT ( don't know yet if sync provided ... ? to test )
span=X+3,2,3,ccs,ami
bchan=X+9,X+10
dchan=X+11


zapata(span(X)) has to offer few options :

- signalling ( PP/PMP )
- Channels 'active' or 'disabled'
- ...

In this Template case :

- 4 extensions needs to be created.

Future ? : More than 1 'ISDN' card ( I.E. Mixed PRI/BRI ), GSM cards, ...

- More or less copy-paste of the templates, adding spans.
- Can be based on 'ID dip switch' on the card  

Best,

Herve

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #13 on: February 26, 2007, 07:17:21 AM »
Hi Jeff,

Just a tough: maybe easier way to implement 'Junghanns BRI' support ?

- PCI ID gives the type of card ( You know it's DUO/QUAD/OCTO ... )
  Idea is to link 'pci-id' to a set of features/capabilities, instead of linking it 'only' to the 'driver' that has to be loaded (as for analog cards).

- Based on that You know the amount of spans that are available, you can have a unique template. If another card looks to have exactly the same set of features,just need to add new PCI ID that is linked to the same template.

- For each span, just need to specify 'pp/pmp' and if it has to be seen as '2 extensions' or 'group trunk' or 'disable' ( Extension/trunk = in fact, just another way to dial zap/x-y ).

- Based on input, right mask can be set onto qozap Port=XXX.

Note : QuadBri qozap also detects jumper settings onto the card itself ( NT/TE )( QuadBri test OK ), but -as far as I understand 'Junghanns' info- it doesn't look to be the same for OctoBri. To avoid making distinction, maybe easier to consider port mapping to be needed.

Best,

Hervé

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - Zaphfc
« Reply #14 on: February 26, 2007, 09:49:00 AM »
HI Herve

Quote
Idea is to link 'pci-id' to a set of features/capabilities, instead of linking it 'only' to the 'driver' that has to be loaded (as for analog cards).

I have also come to the same conclusion.  I have created a "mule" program called "PCI Library" which will create and maintain the template library for the different card types - just like we already do for phones and carriers. At the moment it contains the Card fingerprint from the PCI database together with its name, drivername and a set of base tuples for zapata and zaptel.

The templates will then simply be loaded from the library when cards are found during the modprobe operation.

It can't be totaly generic because we need special processing for detecting things like TDM daughter board gender (FXS/FXO) and we will need manual input if we wish to allow NT/TE under ISDN (where no jumper settings are involved).  We  may also need further special processing based upon the underlying asterisk capabilities (whether the Junghanns code is present or not).  Initially, I think we will aim for X100, TDM (400, 800, 2400), HFC-PCI and the Junghanns boards under Bristuff, and the entire Digium range (except the B410) under normal none-BriStuff (I understand that Bristuff breaks the Digium PRI support).   None zaptel implementations (mISDN, vISDN, CAPI will require changes to the AGI, so we can look at those as "release 2".

This looks like the correct way forward.  It's very busy here at the moment but we should have something for you to evaluate in about a week.

Best

J

Offline hervep

  • ***
  • 70
  • +0/-0
SAIL - Zaphfc
« Reply #15 on: February 26, 2007, 07:09:49 PM »
Hi Jeff,

Nice !

Pls take your time, nothing urgent ... those are just ideas !
Many thanks for all the things you are doing, think to your business first !.

Best,

Hervé