How How to to to install
Transcription
How How to to to install
How to install and configure the AX1E card with Centos5.6 ATCOM Digital Card AX1E Product Guide Version 1.1 02-01-2012 Hardware configuration illustration The E1 card hardware illustration as the following: Set the E1 mode: (JP7) please jump the jumper wire turn to left in JP7 Set the NT/TE mode: (JP6) Set the TE mode, please jump the jumper wire(JP6) to the right and turn off the SW1. Set the NT mode, please jump the jumper wire(JP6) to the left setting NT mode, and SW1(1: off, 2: on; or 1: on, 2: off ); Then, the NT mode can connect to the TE mode. Please plug the through line into the E1 port, and connect the E1 cards each other. If your server exist the following error, it is the SW1 set error hfcmulti_rx: CRC-error hfcmulti_rx: CRC-error For example, you can set the two cards SW2(1:on, 2:off ; or 1:off, 2:on). Install the asterisk and mISDN 1.Check the PCI messages Use the command: "lspci -vv" to check the card messages 02:04.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-E1] (rev 01) Subsystem: Cologne Chip Designs GmbH Device b523 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERRFastB2B- DisINTxStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort>SERR- <PERR- INTxInterrupt: pin A routed to IRQ 5 Region 0: I/O ports at ac00 [size=8] Region 1: Memory at ff3ff000 (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 NoSoftRst- PME-Enable- DSel=0 DScale=0 PMEKernel modules: hfcmulti 2.Install asterisk and mISDN packages If you use the Trixbox2.8.0.6, you just need to jump this step and go to "software configure" steps. If you use the Centos5.6, you need do the following steps. 1. To install asterisk and mISDN in Centos OS, users should install the following prerequisite packages: bison bison-devel zlib zlib-devel openssl openssl-devel gnutls-devel flex gcc gcc-c++ Please use the command: "rpm -q package" to check the RPM package in your server. Please use the yum install command to install the packages above. 2. Download asterisk,mISDN and mISDNuser [root@localhost src]# wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-xx [root@localhost src]# wget http://www.misdn.org/downloads/mISDN.tar.gz [root@localhost src]# wget http://www.misdn.org/downloads/mISDNuser.tar.gz 3. Install asterisk,mISDN and mISDNuser Install mISDN [root@localhost src]# tar -xvzf mISDN.tar.gz [root@localhost src]# cd mISDN-1_1_9.1/ [root@localhost mISDN-1_1_9.1]# make [root@localhost mISDN-1_1_9.1]# make install Install mISDNuser [root@localhost src]# tar -xvzf mISDNuser.tar.gz 2) [root@localhost src]# cd mISDNuser-1_1_9.1/ 3) [root@localhost mISDNuser-1_1_9.1]# make 4) [root@localhost mISDNuser-1_1_9.1]# make install Install asterisk 1) [root@localhost src]# tar -xvzf asterisk-1.4.29.tar.gz 2) [root@localhost src]# cd asterisk-1.4.29 3) [root@localhost asterisk-1.4.29]# ./configure 4) [root@localhost asterisk-1.4.29]# make 5) [root@localhost asterisk-1.4.29]# make install 6) [root@localhost asterisk-1.4.29]# make samples Software configure 1.Add some commands to blacklist file Please add the following lines in the end of file /etc/modprobe.d/blacklist blacklist hisax blacklist hisax_fcpcipnp blacklist hisax_isac blacklist crc_ccitt blacklist isdn blacklist slhc blacklist capi blacklist capifs blacklist kernelcapi blacklist kernel_capi blacklist avmfritz blacklist hfc4s8s_l1 2.Check the card's IRQ and modify the configure files 1) Please use the command: "cat /proc/interrupts" to check the card's IRQ messages. [root@localhost modprobe.d]# cat /proc/interrupts CPU0 CPU1 66: 74: 177: 193: 2) 13 281 17726 4916 13028 0 0 35218 PCI-MSI eth1 PCI-MSI hda_intel IO-APIC-level HFC-multi IO-APIC-level uhci_hcd:usb3, ata_piix Use the command: "misdn-init scan" to find the card. [root@localhost ~]# misdn-init scan [OK] found the following devices: card=1,0x1 [ii] run "/usr/sbin/misdn-init config" to store this information to /etc/misdn-init.conf 3) Configure the card by using the command: "misdn-init config" [root@localhost ~]# misdn-init config [OK] /etc/misdn-init.conf already present. backing it up to /etc/misdn-init.conf.save [OK] /etc/misdn-init.conf created. It's now safe to run "/usr/sbin/misdn-init start" [ii] make your port (1) available in asterisk by editing "/etc/asterisk/misdn.conf" 4) Modify the AX1E NT/TE mode The port of AX-1E works in TE mode by default setting, customer can change it to work in NT mode by editing file /etc/misdn-init.conf, find one line "te_ptmp=1", then change it to "nt_ptmp=1", after this, please run misdn-init restart to make the setting effect. Please modify the misdn-init.conf configure file as the following: [root@localhost ~]# vi /etc/misdn-init.conf vi /etc/misdn-init.conf card=1,0x1 cards=1,0x1,alaw,dtmf # Card Settings # # # Syntax: card=<number>,<type>[,<option>...] # # Port settings # <number> count your cards beginning with 1 # <type> either 0x1,0x4 or 0x8 for your hfcmulti hardware, # # or the name of your card driver module. # <option> ulaw - uLaw (instead of aLaw) # Syntax: <port_type>=<port_number>[,<port_number>...] # dtmf - enable DTMF detection on all B-channels # # <port_type> te_ptp te_ptmp=1 - TE-Mode, PTP Most of terminals use with the TE mode. It set the port mode: ptmp. Some equipments use ptp mode. TE-Mode, PTMP 1: it's the port number. # te_ptmp # te_capi_ptp - TE-Mode (capi), PTP # dtmfthreshold=100 We've added- aTE-Mode configurable dtmfthreshold, the default is 100, it can have values te_capi_ptmp (capi), PTMP between 20 and 500. It needs to be changed either by giving the module parametern nt_ptp - NT-Mode, PTP dtmfthreshold_option to the mISDN_dsp modul, or simply by setting the value # nt_ptmp # # <port_number> # te_ptmp=1 5) - NT-Mode, PTMP port that should be considered vi /etc/asterisk/misdn.conf hdlc=no ; change this to yes, if you want to bridge a mISDN data channel to ; another channel type or to an application. Disable all the default ports Please disable all the default ports, and add the following paragraph at the end of the file. [root@localhost ~]# vi /etc/asterisk/misdn-init.conf [intern] ; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) ;ports=1,2 ; context where to go to when incoming Call on one of the above ports context=Intern [internPP] ; ; adding the postfix 'ptp' to a port number is obsolete now, chan_misdn ; parses /etc/misdn-init.conf and sets the ptp mode to the corresponding ; configs. For backwards compatibility you can still set ptp here. ; ;ports=3 [first_extern] ; again port defs ;ports=4 [second_extern] ;ports=5 context=Extern2 callerid=15 msns=102,144,101,104 (Add the ports to outgoing dialplan, then the incoming call can load to your server. ) [from-internal] ports=1 context=from-internal (Add the ports to incoming dialplan, then your local extension can dial out. ) [from-pstn] ports=1 context=from-pstn If it is more than one port in your card, Please find the te_ptmp=1,2,3,4 line, and change it into the following two lines: te_ptmp=2,3,4 nt_ptmp=1 6) Start the misdn Start the misdn using the command: "misdn-init start", and it will create device node: /dev/mISDN [root@localhost ~]# misdn-init start ----------------------------------------Loading module(s) for your misdn-cards: ----------------------------------------/sbin/modprobe --ignore-install hfcmulti type=0x1 protocol=0x2 layermask=0xf poll=128 debug=0 /sbin/modprobe mISDN_dsp debug=0x0 options=0 poll=128 dtmfthreshold=100 [i] creating device node: /dev/mISDN If the card driver has been loaded correctly, two of the leds are green, and the other two of the leds are red. 7) Check the ports information using the command: "misdnportinfo" [root@localhost ~]# misdnportinfo Port 1: TE-mode PRI E1 interface line (for phone lines) -> Interface is Poin-To-Point. -> Protocol: DSS1 (Euro ISDN) -> childcnt: 30 -------- mISDN_close: fid(3) isize(131072) inbuf(0x8b33060) irp(0x8b33060) iend(0x8b33060) 8) Add "misdn-init start" before "/usr/sbin/amportalstart" in Trixbox. And you can just add it in Centos. [root@localhost ~]# vi /etc/rc.d/rc.local touch /var/lock/subsys/local misdn-init start 9) You can use the command: "misdn show stacks" to check the line status. the correct output will like the follow: *CLI> misdn show stacks BEGIN STACK_LIST: * Port 1 Type TE Prot. PTP L2Link DOWN L1Link: DOWN Blocked:0 Debug:0 If you link the through line together with the cards, you will get the following result. *CLI> misdn show stacks BEGIN STACK_LIST: * Port 1 Type TE Prot. PTP L2Link UP L1Link: UP Blocked:0 Debug:0 Or localhost*CLI> misdn show stacks BEGIN STACK_LIST: * Port 1 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0 localhost*CLI> 10) Add the dialplan for your PBX If you would like to add the dialplan manually, you can do it as the following simple examples. [root@localhost asterisk]# vi /etc/asterisk/extension.conf [from-internal] exten=>900,1,dial(misdn/1/900) exten=>900,n,hangup() exten=>_2.,1,dial(misdn/1/${EXTEN:1}) exten=>_2.,n,hangup() [from-pstn] exten=>903,1,dial(sip/903) exten=>903,n,hangup()