全部博文(8)
2009年(8)
分类: LINUX
2009-06-24 14:24:28
1. What is B200P
B200P is a PCI 2.2 compliant card supporting 2 BRI S/T
interfaces, with an onboard multi NT power feeding circuit. NT/TE mode
can be independently configured on each of 2 ports.
B200P can be implemented for building Open Source Asterisk based systems such as ISDN PBX and VoIP gateway.
Target Applications:
1) High Performance ISDN PC Cards
2) ISDN PABX for BRI
3) VoIP Gateways
4) ISDN LAN Routers for BRI
5) ISDN Least Cost Routers for BRI
6) ISDN Test Equipment for BRI
Main Features:
1) Four integrated S/T interfaces
2) ITU-T I.430 and TBR 3 certified and S/T ISDN supporting in TE and NT mode
3) Integrated PCI bus interface (Spec.2.2) for 3.3V and 5V signal environments
4) DTMF detection on all B-channels
5) Multiparty audio conferences bridge
6) Onboard power feeding
7) PCM bus connectors daisy chaining
8) Each of the 2 ports can be independently configured for TE or NE mode
Full software and hardware compatible with Junghanns.NET ISDN and mISDN driver
9) Application ready: use Asterisk to build your IP-PBX/Voicemail system
RoHS compliant
Certificates: CE, FCC
2. What is Asterisk:
The Definition of Asterisk is described as follow:
Asterisk is a complete PBX in software. It runs on Linux, BSD,Windows
(emulated) and provides all of the features you would expect from a PBX
and more. Asterisk does voice over IP in four protocols, and can
interoperate with almost all standards-based telephony equipment using
relatively inexpensive hardware. Asterisk provides:
1) Voicemail services with Directory
2) Call Conferencing
3) Interactive Voice Response
4) Call Queuing
5) Three-way calling
6) Caller ID services
7) Support ADSI, IAX, SIP, H.323, MGCP and SCCP/Skinny
1. Hardware Installation and Setup
1) Configure the Jumper Settings
Please refer jumper setting for details. To install B200P, user should follow the steps.
A. Setting Card ID Switch
If user wants to install more than one cards of B200P in one pc, you
should take care of the card id switch. It has three rules, which user
must follow:
1. The card id of the first card must be set to 0, and the second card should be set to 1, and so on.
2. The First Card is a card that will be initialized (i.e installing driver) first when system is booting.
3. At most of cases, Linux will initialize PCI devices according to PCI
slot order. The slot is nearest to the CPU will be initialized first;
the slot at the far end from CPU will be initialized at last. That is
to say, if user has more than one cards of B200P in pc, the one is
nearest to CPU should be set to card id 0. Adjusting Termination of S/T
Interface (100 ohm)
1. If a port will work on NT mode, user should set jumper to CONNECT (ON).
2. If a port will work on TE mode, Theoretically it should be to
OPEN(OFF), but user might connect to some non-standard isdn terminal
equipments that do not have terminal resistors, for such equipments,
you should set it to CONNECT(ON).
C. Power Feeding Connector
These jumpers control whether the card will feed power to the external isdn terminal. User should adjust accordingly.
1) If the port will work on TE mode, user MUST set the jumper to
OPEN(OFF)
2) If this port will work on NT mode, the ISDN terminal requires ISDN
power supply, user should set the jumper to CONNECT(ON). ISDN terminal
does not require ISDN power supply, user should set the jumper to
OPEN(OFF).
D. Power Feeding Input
If one of the four power feeding connectors is CONNECT(ON), user should
connect a D-type connecter from pc power supply to this jack, the
D-type connecter is used to provide power to your CDROM ahd 3.5”HDD.
E. Power Supply Selection
Some newest model PCs do not provide +5V on the PCI slots, at those cases, use has to set the jumper to 3.3v.
F: PCM IN/PCM OUT
This feature will be used to connect two BRI cards.
2) Power off PC, remembering unplug the AC power cable
3) Insert B200P into a 3.3v or 5.0v PCI slot
4) Plug the hard disk power supply cable( D style) to power feeding
input jack if need providing power to external equipment, please refer
jumper setting section for the detail
5) Plug back the AC power cable, and power on PC
1) check the hardware detection by : lspci -vvvvvvvvvvvv
02:0c.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-4S] (rev 01)
Subsystem: Cologne Chip Designs GmbH HFC-4S [OpenVox B200P]
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-SERR- Interrupt: pin A routed to IRQ 20
Region 0: I/O ports at dff0 [disabled] [size=8]
Region 1: Memory at feafb000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME+
User should see the device information, if user can not see that, please
swap to other slots to try.
2) Checking the supporting packages
It is time to check for the availability of some other packages:
rpm -q bison
rpm -q bison-devel
rpm -q ncurses
rpm -q ncurses-devel
rpm -q zlib
rpm -q zlib-devel
rpm -q openssl
rpm -q openssl-devel
rpm -q gnutls-devel
rpm -q gcc
rpm -q gcc-c++
If any of those packages is not installed, please install those packages by using yum
yum install bison
yum install bison-devel
yum install ncurses
yum install ncurses-devel
yum install zlib
yum install zlib-devel
yum install openssl
yum install openssl-devel
yum install gnutls-devel
yum install gcc
yum install gcc-c++
3) Downloading, unzipping, compiling driver and loading drivers
A. Download the stable version of mISDN, mISDNuser, LCR and asterisk drivers from ,
and copy the tar file to /usr/src/. Here,we are using mISDN v2 and
mISDNuser v2. Users can get more details from mISDN.org. after
unzipping the mISDN files, please replace the original hfcmulti.c with
a new patch file. you can download the patch file from
B. Compile the new kernel:
please download the new kernel and compile that. after compiling the kernel , please reboot the system with the new kernel.
C. Compiling mISDN, mISDNuser, LCR and asterisk
cd /usr/src/mISDN
make
make install
./std2kern
cd /usr/src/mISDNuser
make
make install
cd /usr/src/lcr
make force
make
make install
cd /usr/src/asterisk-1.4.XX
./configure
make
make install
D. Modifying setting files and loading modules for mISDN modules Users have to modify the interface.conf and route.conf under /usr/local/lcr: the interface.conf, here, port 0 is in NT mode, and port 1,2,3 are in TE mode.
[Int]
#extension
#msn 200
portnum 0
nt
[ISDN_TE]
[ISDN_TE]
portnum 1
portnum 2
portnum 3
#portnum 4
#portnum 5
#portnum 6
#portnum 7
hunt roundrobin
layer2hold yes
the route.conf
# Linux-Call-Router routing configuration "routing.conf"
# Ruleset: MAIN
# Calls with different origins will be processed in different rulesets.
# Ruleset: EXTERN
# All calls from external lines are processed here.
[main]
# incoming call and forward to ISDN phone
interface=ISDN_TE : remote application=asterisk context=test_nt exten=102
# Dial 100 from ISDN phone to outside service phone system, will forward to from-internal and call to TE interface
dialing=100 : remote application=asterisk context=from-internal exten=100
[from-internal] // sip calls
exten => 100,1,Dial(LCR/ISDN_TE/10000)
exten => 100,n,Hangup
exten => 101,1,Dial(LCR/Int)
exten => 101,n,Hangup
[test_nt]
exten => 102,1,Dial(LCR/Int) // lcr will call to 102, and dial to NT mode.
exten => 102,n,Hangup
run commands:
modprobe mISDN_core // load main mISDN
modprobe mISDN_dsp // load dsp
modprobe hfcmulti // load the card driver
lcr fork // start lcr
asterisk -vvgc
test calls:
bogon*CLI> core set verbose 30
Verbosity was 2 and is now 30
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:1177 receive_message: [call=NULL ast=NULL] Received new ref by LCR, due to incomming call. (ref=5)
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:287 alloc_call: [call=0 ast=NULL] Call instance allocated.
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:750 lcr_in_setup: [call=5 ast=NULL] Incomming setup from LCR. (callerid 82535462, dialing 102)
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:660 lcr_start_pbx: [call=5 ast=lcr/5] Try to start pbx. (exten=102 context=test_nt complete=no)
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:325 send_message: [call=NULL ast=NULL] Sending MESSAGE_OVERLAP to socket.
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:701 lcr_start_pbx: [call=5 ast=lcr/5] Extensions matches.
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:732 lcr_start_pbx: [call=5 ast=lcr/5] Starting call to Asterisk due to matching extension.
-- Executing [102@test_nt:1] Dial("lcr/5", "LCR/Int") in new stack
[May 22 01:01:14] NOTICE[3534]: chan_lcr.c:1638 lcr_request: [call=NULL ast=NULL] Received request from Asterisk. (data=Int)
[May 22 01:01:14] NOTICE[3534]: chan_lcr.c:287 alloc_call: [call=0 ast=NULL] Call instance allocated.
[May 22 01:01:14] NOTICE[3534]: chan_lcr.c:1729 lcr_call: [call=NULL ast=lcr/6] Received call from Asterisk.
[May 22 01:01:14] NOTICE[3534]: chan_lcr.c:325 send_message: [call=NULL ast=NULL] Sending MESSAGE_NEWREF to socket.
-- Called Int
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:1194 receive_message: [call=NULL ast=NULL] Received new ref by LCR, as requested from chan_lcr. (ref=6)
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:528 send_setup_to_lcr: [call=6 ast=lcr/6] Sending setup to LCR. (interface= dialstring=Int, cid=82535462)
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:325 send_message: [call=NULL ast=NULL] Sending MESSAGE_SETUP to socket.
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:862 lcr_in_alerting: [call=6 ast=lcr/6] Incomming alerting from LCR.
[May 22 01:01:14] NOTICE[3501]: chan_lcr.c:1506 queue_send: [call=6 ast=lcr/6] Sending queued RINGING to Asterisk.
-- lcr/6 is ringing
Notes:
Test environments:
OS: Centos 5.3
Kernel version: 2.6.28.8
LCR version: lcr_20090107.tar.gz
Asterisk version: Asterisk-1.4.20
mISDN version: mISDN V2
Hardware:OpenVox B200P
issue: always have to dial second time to make outgoing calls.
Status of LEDs :
For B200/B400P
1) LEDs will turn into red if the drivers are loaded(lcr fork).
2) When a call is established, the LED will be turned into green status.
For B800P
1) LEDs will turn into green and blink if the drivers are loaded(lcr fork).
2) When a call is established, the LED will be turned into green status.
There are two very useful tools for debug the mISDN and LCR.
1) lcradmin state
the lcradmin is used to monitor the call activities and connection
of ports.
LCR 1.3 2009-05-08 01:33:45
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
ISDN_TE (port 0: hfc-4s.1-1) TE-mode ptmp use:1 L2 UP L1 ACTIVE
└──B 1: remote ISDN_TE-0-in(3) B 2: idle
ISDN_TE (port 1: hfc-4s.1-2) TE-mode ptmp use:0 L2 unknown L1 unknown
└──B 1: idle B 2: idle
ISDN_TE (port 2: hfc-4s.1-3) TE-mode ptmp use:0 L2 unknown L1 unknown
└──B 1: idle B 2: idle
ISDN_TE (port 3: hfc-4s.1-4) TE-mode ptmp use:0 L2 unknown L1 unknown
└──B 1: idle B 2: idle
Remote: asterisk
(3): (3)ext-82535462>
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
08.05.09 01:20:39.505 CH(2): BCHANNEL activate port 0 channel 2
08.05.09 01:20:39.506 CH(2): BCHANNEL control port 0 DSP-RXOFF 1
08.05.09 01:20:39.506 CH(2): BCHANNEL control port 0 DSP-DTMF 1
08.05.09 01:20:39.575 CH(2): MT_RELEASE INDICATION U<-N port 0
08.05.09 01:20:39.575 CH(2): MT_RELEASE_L3ID INDICATION port 0 callref 0x10005
08.05.09 01:20:39.575 CH(2): BCHANNEL deactivate port 0 channel 2
08.05.09 01:20:39.575 EP(2): RELEASE port 0 from CH(2) cause value=16 location=-1
08.05.09 01:20:39.575 EP(2): ACTION hangup port 0
08.05.09 01:20:39.576 CH: BCHANNEL remove socket port 0 channel 2 socket 16
08.05.09 01:21:42.632 CH(3): MT_NEW_L3ID INDICATION port 0 callref new=0x10004
08.05.09 01:21:42.632 CH(3): MT_SETUP INDICATION U<-N port 0 calling_pn
2) testlayer3
This tool is used to test the call from BRI to telcom,
run the command in this way:
./testlayer3 -n 13570807XX // call your hangphone
The call can be made with mISDN and LCR. If the layer 3 works, the ISDN network should be no problem.