*************************************************************** * chan_pika 3.4.2 for Asterisk INSTALL * *************************************************************** Thank you for choosing PIKA Technologies! This document provides a step-by-step procedure for compiling, installing, and configuring chan_pika 3.4 for Asterisk. ======== Contents ======== o License Agreement o Preface o Software Installation o Asterisk configuration o Upgrading from a previous version ================= License Agreement ================= This software is licensed under the terms of the GPL, Version 2. For a copy of the license, please visit: http://opensource.org/licenses/gpl-license.php ======= Preface ======= Related Documents ----------------- o PIKA Asterisk Driver Release Notes (see the README text file) o PIKA's web site http://www.pikatechnologies.com/asterisk o chan_pika (5) manpage o Release history (see the ChangeLog file) ===================== Software Installation ===================== The PIKA channel driver for Asterisk (chan_pika) requires the PIKA low-level board driver and SDK for HMP boards and the Asterisk/Zaptel (ztdummy driver) software to be installed. You must be logged in as the root user to perform these installation steps. In the following instructions, the '#' preceding the commands indicates a shell command. New users should use the following steps. Existing customers should follow the upgrade instructions provided later in this document. Operating System ---------------- Step 1: Install any of the supported Linux distributions with a supported kernel version. Refer to the README file for a list of supported distributions and kernels. Asterisk and Zaptel ------------------- The Asterisk and Zaptel distributions are available at ==> http://www.asterisk.org Step 2: Download and uncompress Zaptel 1.2.x or 1.4.x #tar -zxf zaptel-1.4.x.tar.gz -C /usr/src Step 3: Build and install Zaptel NOTE: If you are using a third-party board and will not be using any PIKA boards, refer to the manufacturer's instructions for the third-party board to determine whether Zaptel should be installed and started before or after the board and its associated driver. If you are using Zaptel 1.2.x: #cd /usr/src/zaptel-1.2.x #make && make install If you are using Zaptel 1.4.x: #cd /usr/src/zaptel-1.4.x #./configure && make && make install To install init scripts and config files: #make config NOTE: Zaptel must be configured to restart at boot time. Refer to the Asterisk documentation for instructions specific to your configuration. Step 4: Download and uncompress Asterisk 1.2.x or 1.4.x #tar -zxf asterisk-1.4.x.tar.gz -C /usr/src/ Step 5: Build and install Asterisk If you are using Asterisk 1.2.x: #cd /usr/src/asterisk-1.2.x #make && make install If you are using Asterisk 1.4.x: #cd /usr/src/asterisk-1.4.x #./configure && make && make install Create the default configuration files that will be installed in /etc/asterisk: #make samples chan_pika and PIKA low-level board driver and SDK ------------------------------------------------- Step 6: If you have not already downloaded chan_pika and the PIKA low-level board driver/SDK, do so now from => http://www.pikatechnologies.com/asterisk. If you are running RedHat Enterprise 4 or a derivative (CentOS 4), ensure that you download the version specific to RH4. Step 7: Uncompress chan_pika #tar -zxf chan_pika-3.4.2.tgz -C /usr/src/ If installing on a RedHat Enterprise 4 based system (ie: CentOS 4): #tar -zxf chan_pika_rh4-3.4.2.tgz -C /usr/src/ Step 8: If you are using a PIKA Digital and/or Analog HMP board, physically install the board(s) in your system. Step 9: Install the PIKA board driver and SDK #cd /usr/src/chan_pika-3.4.2 #./pikaaoh-2.5.2-linux-installer If installing on a RedHat Enterprise 4 based system (ie: CentOS 4), the low-level board driver and SDK installer is named: pikaaoh-2.5.2-rh4linux-installer Note: Installation of the board driver requires the kernel source for the kernel currently running on your system. The kernel must be an SMP kernel. If the installer cannot find the kernel source in a directory where it is typically installed, or it detects that a UNI kernel is installed, the installion will fail and you will given information to correct the error. The installer may then be re-run. Step 10: Activate licenses (if applicable) Licenses are required to enable digital spans, analog trunks, FAX and/or Skype channels. Digital or analog boards purchased after September 2007 include on-board licensing. If you need to activate extra channels or need FAX or Skype channels, refer to Appendix A. Note: Regardless of the board being used (PIKA with onboard licenses, an older PIKA board or 3rd-party board), you will need to activate at least one FAX license to use the pikarxfax and pikatxfax applications. At least one IP voice license must be activated to use Skype. Step 11: Stop Asterisk if it is running. Step 12: Build and install chan_pika NOTE: Asterisk and Zaptel must be installed before building and installing chan_pika. #cd /usr/src/chan_pika-3.4.2 #./configure && make && make install Note: If you installed Asterisk to a prefix path other than /usr (default), use ./configure --with-asterisk-install-path=PATH (e.g. /usr/local). chan_pika.so will be installed to asterisk-install-path/lib/asterisk/modules/ Step 13: Configure chan_pika From the chan_pika source directory (e.g. /usr/src/chan_pika-3.4.2), # make config Note: 'make config' will configure the board driver and SDK to support your PIKA board(s) (/etc/pika/pikagp.cfg and /etc/pika/pikagp_aoh.cfg). It will also generate and install a working pika.conf configuration file which will be installed in /etc/asterisk/. The configuration utility will detect any compatible boards installed in your system as well as the installed licenses. If any digital boards are found, you will be asked to answer some simple questions in order to determine the appropriate span type to use (E1 or T1). You will also have the opportunity to configure your digital board to use Channel Associate Signaling (CAS). Refer to the man page for more details. Additional documentation for chan_pika is available in the form of a manpage. To access it, from any directory: #man chan_pika o Update the pika.conf file as needed for your configuration. !IMPORTANT! The number of channels that can be configured is based on the number of available licenses. For example, if your digital card has one span and you wish to configure all 30 channels, you will require 30 channel licenses. Note that the configuration tool will not configure partial digital spans. o To use PIKA channels in dial plans, the following can be used: Dial(PIKA/digital/g0/34242344) ; dials a digital channel Dial(PIKA/fxo/g1/613343444) ; dials an FXO channel Dial(PIKA/fxs/1) ; dials an FXS channel o Sample dial plans are provided in the extensions.conf.pika file in the samples directory to assist you in configuring the Asterisk dialplan (/etc/asterisk/extensions.conf). The following contexts are provided: [fxo] - Illustrates receiving calls from an analog trunk card and making a call to a SIP phone. [fxs] - Illustrates dialing to an analog phone. [digital] - Illustrates receiving calls from a digital trunk card and making a call to a SIP phone. [sip-context] - This context can use both exten for outgoing calls, for example, use 0XXXXX for the analog card and 9xxxxx for the digital card. Users must change this file to match the SIP phone username/password. Refer to the manpage for additional dial plan examples. o Once complete, you are ready to start Asterisk (asterisk -vvvvvgnc). !IMPORTANT!: To run FAX applications with 3rd-party boards, the chan_pika.so module must be loaded. It is loaded automatically by default, however, if you have turned off the *autoload* option in the /etc/asterisk/modules.conf file, you must add the following lines to load all PIKA modules: load => chan_pika.so load => app_pikarxfax.so load => app_pikatxfax.so ================================= Upgrading From A Previous Version ================================= From chan_pika 3.4.x, 3.3.x, 3.2.x, or 3.1.x -------------------------------------------- Step 1: Stop Asterisk Step 2 : Uninstall chan_pika If chan_pika source code is available: #cd /usr/src/chan_pika-3.x.x #make uninstall Else: #rm -f /usr/lib/asterisk/modules/chan_pika.so #rm -f /usr/bin/gpconfig #rm -f /usr/lib/libpikagp* #rm -f /usr/include/pika/pikagpapi.h Step 3: Uninstall the previous version of the PIKA low-level board driver/SDK: #/usr/share/pika/aoh/uninstall Step 4: Proceed with the installation instructions above. Asterisk installation is not required. Step 5: Review your configuration as above. From chan_pika 3.0 ------------------ Step 1: Stop Asterisk Step 2 : Uninstall chan_pika 3.0 If chan_pika 3.0 source code is available: #cd /usr/src/chan_pika-3.0.0.x/grandprix #make uninstall #rm -f /usr/lib/asterisk/modules/chan_pika.so Else: #rm -f /usr/lib/asterisk/modules/chan_pika.so #rm -f /usr/bin/gpconfig #rm -f /usr/lib/libpikagp* #rm -f /usr/include/pika/pikagpapi.h Step 3: Uninstall the previous version of the PIKA low-level board driver/SDK: #/usr/share/pika/aoh/uninstall Step 4: Proceed with the installation instructions above. Asterisk installation is not required. Step 5: Review your configuration as above. Note that some parameters have changed between 3.0 and 3.1. Expect to have to manually apply any modifications you made to the default configuration. From PIKA Connect for Asterisk 2.2.0 ------------------------------------ Step 1: Stop Asterisk Step 2 : Remove chan_pika2.so #rm /usr/lib/asterisk/modules/chan_pika2.so Step 3: Uninstall the previous version of the PIKA low-level board driver/SDK: #/usr/share/pika/aoh/uninstall Step 4: Proceed with the installation instructions above. Asterisk installation is not required. Step 5: Review your configuration as above. Note that the PIKA configuration file pika2.conf is now called pika.conf. From chan_pika_dsp ------------------ chan_pika and chan_pika_dsp were not designed to live together on the same system. Installing both on the same machine will create conflicts that might hinder their use. Before installing chan_pika on a system with an existing chan_pika_dsp installation: Step 1: Stop Asterisk Step 2: Uninstall chan_pika_dsp This is done by running 'make uninstall' from the chan_pika_dsp sources. If chan_pika_dsp sources were removed, delete the chan_pika_dsp.so Asterisk modules as well as the pikacf application. Step 3: Uninstall PIKA low-level board driver/SDK for DSP boards /usr/share/pika/aob/uninstall Step 4: Proceed with the installation instructions above. Asterisk installation is not required. =============================== Appendix A - License Activation =============================== If you are using an older board, you must activate the licenses for digital spans and/or analog trunks provided when you purchased your card. In the case of Skype, the license provided when you purchased your IP Voice license must be activated. Note that one IP voice license is required for each channel of Skype you want to support. To use the FAX application without PIKA boards, one FAX license is required for each FAX port. If PIKA hardware is present, 4 free FAX ports are available. If additional ports are required, additional licenses must be activated. To activate your licenses, the PIKA low-level board driver/SDK must be installed. The licensing utility is called "pikalm" and will run from any directory. Select one of the options for license activation (single or multiple keys) and follow the directions. NOTE: pikalm does not currently display the number of on-board licenses. It only displays licenses installed on the host using pikalm. This will be fixed in a future release. PIKA log files provide information about both board-based and host-based licenses. If you are not prepared with your licensing information at this time, you may perform these licensing steps later. o Here is an example of the steps to activate a single key (for a single digital Span): Welcome to pikalm activation utility. Attempting to connect to license server ... ... (Connected) +----------------------------------------------------------------+ | Please choose one of the following: or [q]=quit, [m]=main menu | | | | [1] : Show activated licenses | | [2] : Show network interface cards | | [3] : Show license server connection status | | [4] : Single registration key activation | | [5] : Multiple registration key activation - (file-based) | +----------------------------------------------------------------+ > Your input: 4 +----------------------------------------------------------------+ | Please choose one of the following: or [q]=quit, [m]=main menu | | | | [1] : Automatic activation - (requires internet access) | | [2] : Manual activation | +----------------------------------------------------------------+ > Your input: 1 Please enter a registration key. > Your input: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX Please enter a quantity. [all]=remaining. > Your input: 30 *** Done! *** > Your input: The user can now enter: - another registration key to continue the generation of activation keys for this platform - 'm' to return to the main menu, or - 'q' to exit the License Manager ===================================================================== For help with this software, please contact PIKA Customer Care. PIKA Customer Care +1 (613)-591-1555 support@pikatech.com Copyright 2002-2008 PIKA Technologies Inc. All rights reserved. Asterisk is a registered trademark of DIGIUM Inc