A1610E/AE1610E base on Elastix user manual

深圳开源通信有限公司

OpenVox A1610E/AE1610E base on Elastix User Manual

AE1610E

Date: 19/07/2011

Version: 1.0

1 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

深圳开源通信有限公司 OpenVox-Best Cost Effective Asterisk Cards

OpenVox Communication Co.Ltd. Address: F/3, Block No.127, Jindi Industrial Zone, Shazui Road, Futian district, Shenzhen, Guangdong 518048, China Tel:+86-755-82535461, 82535095, 82535362, Fax:+86-755-82535174 E-Mail: [email protected] [email protected]

M for Technical Support: [email protected] Business Hours: 9:00AM-18:00PM from Monday to Friday URL: www.openvox.cn

Thank You for Choosing OpenVox Products!

2 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual Content

1. Overview ...... 4 1.1 What is A1610E ...... 4 1.2 What is ...... 4 2. Hardware setup ...... 5

3. installation and configuration ...... 6 3.1 Download ...... 6 3.2 Installtion ...... 6 3.3 Configuration ...... 7 3.4 Call test ...... 11 4. Reference ...... 15

3 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

Test environments CentOS-5.6 Kernel version: 2.6.18-238.12.1.el5 DAHDI: dahdi--complete-2.4.0+2.4.0 Asterisk: 1.8.4.4 Elastix 2.0.4 Hardware: OpenVox A1610E/AE1610E

1. Overview

1.1 What is A1610E/AE1610E A1610E is an independent research and development modular analog telephony interface product by OpenVox Communication Co. LTD, AE1610E is A1610E with an EC module. They are designed to build SMB PBX. A1610E/AE1610E must be made up with FXO-400 and FXS-400 together to build a workable system.

1.2 What is asterisk The Definition of Asterisk is described as follows: 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 Voicemail services with Directory, Call Conferencing, Interactive Voice Response, Call Queuing. It has support for three-way calling, caller ID services, ADSI, IAX, SIP, H323 (as both client and gateway), MGCP (call manager only) and SCCP/Skinny (voip-info.org).

4 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

Figure 1 Topology

2. Hardware setup The following matters need your attention before using A1610E/AE1610E, please check that: 1. Power supply: Plug 12V power line into the connector according to figure showed.

Figure 2 Hardware setup

2. Pin assignment: There are up to 4 FXS-400/FXO-400 modules on every A1610E/AE1610E board, a module corresponds to a RJ45 port which A1610E takes 2 of 8 pins for a pair connect to your 2-wire telephone line, so each RJ45 socket is divided into 4 telephone lines by a splitter. 5 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

Figure 3 Pin assignment

3. A1610E/AE1610E splitter: It can divide RJ45 port into four ordinary telephone lines, please plug PSTN line into FXO port and normal telephone line corresponds to FXS port.

Figure 4 A1610E splitter

3. Software installation and configuration A1610E/AE1610E supports DAHDI software device driver on Linux. To make full use of A1610E/AE1610E, you should download, compile, install and configure DAHDI and asterisk.

3.1 Download Download DAHDI package to the directory of /usr/src/ from openvox official website http://downloads.openvox.cn/pub/drivers/dahdi-linux-complete/openvox_dahdi-linux-complet e-current.tar.gz

#_wget_http://downloads.openvox.cn/pub/drivers/dahdi-linux-co mplete/openvox_dahdi-linux-complete-current.tar.gz # tar -xvzf openvox_dahdi-linux-complete-current.tar.gz

3.2 Installtion 1. Detect hardware by execute command: lspci –vvvv Check the outcome and confirm your system has recognized A1610E. If identified, outputs are like that: 6 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

01:02.0 Communication controller: Device 1b74:1610 (rev 01) Subsystem: Device 1b74:0001 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- SERR-

Figure 5 Hardware detection

2. Modify the environment variables Edit the file named modules under /etc/dahdi/.You are able to comment out drivers unnecessary to load, add opvxa24xx.

# X100P - Single port FXO interface # X101P - Single port FXO interface #opvxa1200 #comment out the unnecessary driver #ystdm8xx #ystdm16xx … … # Rhino 4/8/12/24 Channel Analog PCI Interface Card #rcbfx Opvxa24xx #add opvxa24xx driver

Figure 6 Modules modification

3. Compile Unzip and change directory to dahdi-linux-complete-XX, perform command below one by one.

# cd /usr/src/dahdi-linux-complete-XX # make # make install # make config

If there is something wrong after “make”, please refer to http://bbs.openvox.cn/viewthread.php?tid=1557&extra=page%3D1 Then run “make” again, if successfully, reboot your PC please.

3.3 Configuration 1. Load opvxa24xx driver

# modprobe dahdi # modprobe –r opvxa24xx # modprobe opvxa24xx opermode=CHINA openvox_dahdi-linux-complete 2.2.0 or higher versions allow users to adjust IRQ per 7 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual millisecond. You are able to modify IRQ by the following way:

# modprobe opvxa24xx opermode=CHINA ms_per_irq=2 ms_per_irq=2 means every 2 milliseconds initiate once IRQ. You may select a valid value of ms_per_irq from 1, 2, 4, 8, 16 according to requirement, the default value is 1.While you download DAHDI from digium official website: http://downloads.asterisk.org/pub/telephony DAHDI version above dahdi-linux-complete-2.4.0+2.4.0 supports IRQ adjustment function, and the same method to modify interrupt as described before. After IRQ adjustment, please execute command “dmesg” to check whether you have made the EC module worked. The following figure means EC module has been detected.

OpenVox A1610E version: 1.3

Module 0: Installed -- AUTO FXS/DPO Module 1: Installed -- AUTO FXS/DPO Module 2: Installed -- AUTO FXS/DPO Module 3: Installed -- AUTO FXS/DPO Module 4: Installed -- AUTO FXS/DPO Module 5: Installed -- AUTO FXS/DPO Module 6: Installed -- AUTO FXS/DPO Module 7: Installed -- AUTO FXS/DPO Module 8: Installed -- AUTO FXO (FCC mode) Module 9: Installed -- AUTO FXO (FCC mode) Module 10: Installed -- AUTO FXO (FCC mode) Module 11: Installed -- AUTO FXO (FCC mode) Module 12: Installed -- AUTO FXO (FCC mode) Module 13: Installed -- AUTO FXO (FCC mode) Module 14: Installed -- AUTO FXO (FCC mode) Module 15: Installed -- AUTO FXO (FCC mode) OpenVox VPM: echo cancellation supports 32 channels

Figure 7 EC module detection 2. Check configuration files Run command "vim /etc/dahdi/genconf_parameters". If the hardware is AE1610E, please set echo_can to none as following: echo_can none While it is A1610E, just ignore that step and keep default. Execute those commands:

# dahdi_genconf # dahdi_cfg –vvvv

8 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

[root@localhost ~]# dahdi_cfg -vvvv DAHDI Tools Version – 2.4.0 DAHDI Version: 2.4.0 Echo Canceller(s): Configuration ======Channel map: Channel 01: FXO Kewlstart (Default) (Echo Canceler: none) (Slaves: 01) Channel 02: FXO Kewlstart (Default) (Echo Canceler: none) (Slaves: 02) Channel 03: FXO Kewlstart (Default) (Echo Canceler: none) (Slaves: 03) Channel 04: FXO Kewlstart (Default) (Echo Canceler: none) (Slaves: 04) … … Channel 13: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 13) Channel 14: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 14) Channel 15: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 15) Channel 16: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 16)

16 channels to configure.

Setting echocan for channel 1 to none Setting echocan for channel 2 to none Setting echocan for channel 3 to none Setting echocan for channel 4 to none Setting echocan for channel 5 to none … … Setting echocan for channel 12 to none Setting echocan for channel 13 to none Setting echocan for channel 14 to none Setting echocan for channel 15 to none Setting echocan for channel 16 to none

Figure 8 Channel map

The command dahdi_genconf will automatically generate files /etc/dahdi/system.conf and /etc/asterisk/dahdi-channels.conf. Confirm dahdi-channels.conf is included in chan_dahdi.conf, otherwise, run command:

# echo "#include dahdi-channels.conf" >> /etc/asterisk/chan_dahdi.conf

FXO ports use FXS signaling, while FXS ports adopt FXO signaling. A part of system.conf, which is the basic channel configuration file, is displayed.

# Span 1: OPVXA24XX/16 "OpenVox A1610E Board 25" (MASTER) Fxoks=1 fxoks=2 fxoks=3 fxoks=4 … fxsks=13 fxsks=14 fxsks=15 fxsks=16

# Global data

Loadzone= us defaultzone= us

Figure 9 A part of system.conf

9 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

In order to match your country pattern, you need to change parameters loadzone and defaultzone to your country. For example, your system is in CHINA, then, you would like them change to: loadzone = cn defaultzone = cn

Meanwhile, you also need to modify another parameter, which is in file /etc/asterisk/indications.conf: country=cn

A part of file /etc/asterisk/dahdi-channels.conf is showed as below. (Modification, if it is not agree with the hardware setup)

; Span 1: OPVXA24XX/24"OpenVox A1610 Board 25" (MASTER) ;;; line="1 OPVXA24XX/24/0 FXOKS" signalling=fxo_ks //FXS ports use FXO signaling callerid="Channel 1" <4001> mailbox=4001 group=5 context=from-internal channel => 1 callerid= group= context=default

;;; line="2 OPVXA24XX/24/1 FXOKS" signalling=fxo_ks callerid="Channel 2" <4002> mailbox=4002 group=5 context=from-internal channel => 2 callerid= group= context=default

……

;;; line="13 OPVXA24XX/24/12" signalling=fxs_ks //FXO ports use FXS signaling callerid=asreceived group=0 context=from-pstn channel => 13 callerid= group= context=default

;;; line="14 OPVXA24XX/24/13" signalling=fxs_ks callerid=asreceived group=0 context=from-pstn channel => 14 callerid= group= context=default

Figure 10 A part of dahdi-channels.conf

10 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

Check automatically generated files information is agree with your hardware setup, if not, you should modify to your requirements. After you done works above, reboot your PC please.

3. Start asterisk by executing command: asterisk -vvvvvvvvvgc If asterisk is already activate, run “asterisk –r” instead. After entering CLI, run command “dahdi show channels”. If DAHDI channels are found, it means dahdi channels have been loaded into asterisk.

3.4 Call test 1. Log in Elastix Type IP address of Elastix operation system in browser, next come to “Welcome to Elastix” interface, and type your username and password. Elastix login interface is like that

Figure 11 Elastix login interface

Figure 12 Elastix interface

11 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

2. Hardware detection Click “system” option, then you will see “hardware detection”, choose it you will see the following outcome.

Figure 13 A1610E hardware detection

3. Add SIP extensions 1) Click PBX, extension, choose Generic SIP Device, and finally submit it. You also can refer to the following figure.

Figure 14 Add a SIP

2) Configure “User Extension”, “Display Name”, “Secret” these three options, keep others default, and submit your configurations.

Figure 15 SIP extension parameters 12 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

3) After successfully adding, click “Apply Configuration Changes Here” button to take your configurations effect. Also you are able to add another SIP by click “Add Extension”.

Figure 16 SIP Apply Configuration

Once add two or more SIP phones, make them effective and registered, you are able to make the soft phones call each other fluently and conveniently.

4. Add analog phones 1)The way to add an analog phone is similar to SIP phone. The figure below will make you clear.

Figure 17 Add analog phones

2) After finishing works above, interface will come to “Add DAHDI Extension”, please configure “User Extension”, “Display Name”, “channel” these three items, and keep others default, finally click the left bottom “submit”.

Figure 18 Analog extension configurations 13 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

3) Click “Add Extension” button to add more phones, and select device type by your requirement. Do not forget to click “Apply Configuration Changes here” to make your configurations effective. Once add two or more analog phones, make them effective and registered, you are able to make calls fluently and conveniently.

5. Configure inbound routes Click “Inbound Routes”, you may like to fill in “Description” which is optional, and then choose “Extensions” in “Set Destination”. After submitting settings, you are also able to select an extension number you need, submit again, finally “Apply Configuration Changes Here”.

Figure 19 Inbound routes settings

6. Set outbound routes Click “Outbound Routes”, set “Route name”, “Dialplan pattern”, “Trunk sequence” these three items to meet your requirements, finally submit changes. The following settings mean all outbound calls through g0 which is an exterior line.

Figure 20 Outbound routes configurations 14 OpenVox Communication Co. LTD. URL: www.openvox.cn

A1610E/AE1610E base on Elastix user manual

Additional function Users should run command “cat /proc/interrupts” to check A1610E has independent interrupt. If A1610E shares interrupt with other device, it may cause some problems even cannot work normally. While A1610E allows users to modify interrupt pin during firmware upgrade for avoid conflict, please visit the following link for details: http://downloads.openvox.cn/pub/misc/opvx-update%20user%20manual.pdf

4. Reference www.openvox.cn www.digium.com www.asterisk.org www.voip-info.org www.asteriskguru.com www.elastix.org

Tips

Any questions during installation and usage, please consult in our forum or look up for answers from the following websites: http://bbs.openvox.cn/ http://wiki.openvox.cn/index.php/%E9%A6%96%E9%A1%B5

15 OpenVox Communication Co. LTD. URL: www.openvox.cn