Adrian Sai-wah TAM (swtam@school.net.hk)
Hong Kong School Net, The Chinese University of Hong Kong
Version 0.2: September 2, 2002
Dialogic is a subsidiary of Intel Corporation. It produces a series of telephony devices for computers. The Dialogic devices are proud of its generic software interface - all Dialogic device share the same API and device drivers (a.k.a. System Release), as said by Intel. However, the Dialogic's API is not a very efficient tool for developing telephony applications, especially in terms of the Rapid Application Development tilde.
Bayonne, a software project of GNU, is aimed to provide a generic framework for telephony hardware. It provides a high level abstraction so that all different hardware uses the same script to do the same thing (of course, provided that the hardware supports such features required). The script that Bayonne uses is simple and easy to understand. With the use of Bayonne, we can develop a telephony application easily.
Bayonne do not support all the telephony devices on the market. But lucky, Dialogic series is one of the brand it supports. The following describes how you can do with Dialogic and Bayonne on the Linux platform, from the hardware set up to application development.
The Dialogic devices usually have a board identification switch on the board. The switch is something like a dial, with hexadecimal numbers 0 to F printed on it. This switch is for identifying and distinguishing the board from others when you have more than one board installed in a system. Every Dialogic board should have a unique identification number, but if you don't care about which board and which board, you can just make every board the identification number 0, which then, automatic assignment is applied base on the PCI bus and slot number. If you are not using the automatic assignment, remember to record the identification number and the corresponding board models. These are needed during the driver installation.
The Linux system can be any distribution. But I would prefer classifying the distributions into RedHat-alike and Debian-alike. Their difference is somewhat large. But in this document, you only need to know one thing: Do you use RPM for installation of new packages. If not, you just read the Debian-alike part.
I have tried the RedHat version 7.3 as well as Mandrake 9.0 beta 1 and beta 3. Installation on RedHat is easy. Just as the Intel says, install Linux Stream package first, then do the Dialogic system release installation. However, I found that installation on Mandrake is a little bit difficult. I don't know it is the problem of Mandrake-modified kernel or the instability of beta distributions. However, there is still ways to solve it. Anyway, if you found that your RedHat-alike distribution has some problem, do the tasks according to the paragraphs followed. If you are RedHat, you can probably skip section 4.1.1 and go from 4.1.3.
The Dialogic system release version 5.1 is tailored for kernel version 2.4 series. Therefore, it would be best to keep up with the most current 2.4 kernel. I have not tried the installation on kernel 2.2 and the development kernel 2.5, please tell me the result if you tried this.
You should first, go the ftp://ftp.kernel.org/pub/linux/kernel/v2.4/ and get the kernel tar ball. The one I'd tried is version 2.4.19. After you get the tar ball (say, linux-2.4.19.tar.bz2), you extract it into somewhere like /usr/src, like follows:
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.19.tar.bz2
cd /usr/src
tar jxf /var/tmp/linux-2.4.19.tar.bz2
If you don't want to make your kernel from the tar ball, or you are novice enough that do not know how to do it, or you have any reason don't want to do it, you can also use the RedHat package manager for the kernel upgrade purpose.
Dialogic System Release requires a clean and pure kernel. That means, it would be better if you are using RedHat because RedHat seldom modify the kernel. That was my experience that Mandrake 8.2 beta 1 has some problem in the kernel that would give tons of harmless but noisy messages during the SR's modules load. The System Release 5.1 requires kernel version of 2.4.9+, therefore, if you are using RedHat 7.2, your kernel must be upgraded. If you are using Red Hat 7.3, that's great! You basically needs no upgrade of kernel. However, the make sure you have the following packages installed:
Linux Streams (LiS) is important to Dialogic System Release. It uses LiS to make the driver for your system. So the first thing you have to do is to go to: ftp://ftp.gcom.com/pub/linux/src/LiS/ and get the latest Linux Stream package. The lastest one at the time I write this document is version 2.14.6. Same as downloading and installing the kernel, you just download the tar ball (say, LiS-2.14.6.tar.gz) and extract everything into somewhere like /usr/src (recommended).
After that, you go to /usr/src/LiS-2.14.6 and run make. Then you will have an interactive configuration session which is same as running ./configure. Following is the questions you found:
First of all, please go to Intel's web (http://resource.intel.com/telecom/support/releases/unix/index.html) and download the ``System Release 5.1 for Red Hat Linux 7.1/7.2 on Intel Architecture'' (SR 5.1). You will find a file named LINUX_SR5.1.tgz of 140 MB. Extract it into a directory, you will than find 15 RPM files and 6 other files. If you are using RPM for package management, just run ./install.sh and you will see a menu of 6 items. The first two are for SpringWare boards and the later four are for DM3 boards. You just need to follow the instruction of menu and install the required package.
For example, I am using a D/480JCT-1T1 card and therefore I choose 1 to indicate that I am using a card of SpringWare series. It will than show you a list of packages to be installed and install the RPM packages by using the ``rpm -i'' command. After the installation is complete without error, you will see the menu again and in this case, you can choose Q to quit. Further details on installation can be obtained from Intel. There is a document called ``Installation and Configuration Guide for Linux'' at the above URL describing how to do installations of the System Release 5.1 on RedHat (and alike systems).
Some remarks here: Unless you know specifically that you have Antares hardware, make sure not to select option 2 in the menu of install.sh. That option will create some entries in your config file that will clutter your screen with all kinds of mean, nasty, ugly messages during initialization. (Thanks Gerry)
After the installation of the SR 5.1, configuration is required. The configuration process is aimed to identify the model of board you are using, the IRQ it should be used, create the kernel modules for use as the device driver for the Dialogic devices and so on. Under Red Hat-alike system, it is quite easy. You just go to the SR 5.1 directory where you just extracted the 140 MB tar ball, there is a shell script called config.sh. Run it and you will see that the first question asked is whether you have a DM3 type board. If you answer no (that's me!), you will be prompted for whether you have other type of Intel Dialogic Board. Answering these few question is very important as wrong answer will give (may be) miserable results.
After these, you should follow the instructions appeared. It will help you copy the required files into /usr/src/LiS/ and build a kernel modules (with installation to /lib/modules/version/misc/). It will also help creating configuration files in /usr/dialogic/conf/ by asking what models you have and what parameters (IRQs and board IDs, for example) you want to use. Please follow sections 2.4 to 5.9 of the ``Installation and Configuration Guide for Linux'' for better descriptions.
Rebooting is never a good practice for Linux systems! The real Linux user only reboots at two occations: first is doing something with the kernel, and the second is dealing with the hardware which means you must stop the power. After installing the Dialogic SR, you don't need to reboot. Just call the following commands:
. /usr/dialogic/bin/setenv.sh
/etc/rc.d/init.d/orbacus start
/etc/rc.d/init.d/dialogic start
All the Dialogic files relies in /usr/dialogic/, for example, the executables are at /usr/dialogic/bin/. You can try go there and call dlstart - a script for starting the Dialogic devices. If everything goes fine, it will download something onto the Dialogic hardware and started some daemons with some diagnostic information shown. After that, you can call the program detect in the same directory which will than tell you about what's installed in your system. You should normally see the model and board ID of the telephony boards. If what I say is happened, congradulation! You've make it. If not, try to read the Installation Guide or call the vendor for help. Probably it is the problem of your kernel version or you have chosen a wrong model during the post-install configuration. If it still fails, try think your system as some scratch system and follow the solution for Debian-alike distributions.
Seems that Intel belives Linux is equivalent to Red Hat. It looks do not understand what Linux really is. However, frankly, I don't like RedHat as many Linux gurus. Debian is my favoriate Linux favor, but it do not have RPM given in parallel with Debian Package system. I have no patience to install the RPM for it as well. Therefore, after reading the ``Installing Dialogic Boards in Slackware Linux'' by Diego Betancor on May 2001 (http://diego.betancor.com/dialogicinlinux/), I decided to do it by hand.
Just as described in sections 4.1.1 and 4.1.3, you should first keep the kernel up to date and with telephony options enabled. Then give the Linux Streams installed as modules.
The first step is the same as the Red Hat-alike installation: please get the 140 MB package first. Then extract it into some directory. At there, just call the install.sh script. It should fail definitely because we have no RPM system. But never mind, I just need the output. The install script will tell you what packages you should install. For example, in my case, I am installing a SpringWare board and it told me that I should have DLGCcom, DLGCcsp, DLGCdev, DLGCgc, DLGCooc, DLGCparms, DLGCpri packages. Then, assuming you have the rpm2cpio and cpio utilities, convert all the required RPMs into cpio formats. In my case, I did this:
rpm2cpio DLGC${pkgs}-*.i386.rpm > DLGC${pkgs}.cpio
done
cpio -id < /path/to/files/DLGC${pkgs}.cpio
done
Debian is somewhat differs from Red Hat. Its start up script is at /etc/init.d/ instead of /etc/rc.d/init.d/, so you have to move the dialogic startup script and other files to correct locations. I would suggest to make a symbolic link as there is still some scripts in /usr/dialogic/bin believes there is a /etc/rc.d/init.d/orbacus script. Commands are as follows:
ln -s /etc/rc.d/rc3.d/S85orbacus /etc/rc3.d/S85orbacus
ln -s /etc/rc.d/rc5.d/S85orbacus /etc/rc5.d/S85orbacus
ln -s ${dyn} /usr/lib/`basename ${dyn}`
done
for header in /usr/dialogic/inc/*.h; do
ln -s ${header} /usr/include/`basename ${header}`
done
ln -s /usr/lib/libxerces_c1_5.so /usr/lib/libxerces.so
mkdir -p /var/dialogic/log
chmod 766 /var/dialogic /var/dialogic/log
ln -s /var/dialogic/log /usr/dialogic/log
cp /usr/dialogic/init.d/dialogic /etc/init.d/dialogic
ln -s /etc/init.d/dialogic /etc/rc3.d/S90dialogic
ln -s /etc/init.d/dialogic /etc/rc5.d/S90dialogic
ln -s /etc/init.d/dialogic /etc/rc0.d/K90dialogic
ln -s /etc/init.d/dialogic /etc/rc6.d/K90dialogic
cp /usr/dialogic/cfg/RtfConfig.xml /usr/dialogic/cfg/DefaultRtfConfig.xml
chmod -w /usr/dialogic/cfg/DefaultRtfConfig.xml
echo '. /etc/profile.d/orbacus.sh' >> /etc/profile
echo '. /usr/dialogic/bin/setenv.sh' >> /etc/profile
00201 ant an 1 0
After your modification, just execute config.sh and do the configuration as in section 4.1.4 et voila!
One thing very important: If your /etc/init.d/orbacus script fails and says relocation error and do not understand the symbol __dynamic_cast_2, it is not Debian's fault! The orbacus stuff are used to run on Red Hat and it seems that the Red Hat's dynamic library is required. Two possible solutions to this is (any one will work):
Alright, back to the basic. After the installation, you should first test the system according to section 4.1.5. If it works, that's great and skip to the next section for the works on Bayonne. If not, probably you need to change something in /usr/dialogic/cfg/. The most critical configuration file is dialogic.cfg (for SpringWare only). In most case, you need to have a ``Dialog/HD=YES'' in the section [Genload - All Boards], which the config.sh and mkcfg scripts always missed. For others parameters usable in the dialogic.cfg file, you should consult section 3.3 of the Installation and Configuration Guide. The following is my configuration file for the system with one VFX/PCI card for your reference:
Dialog/HD=YES
BusType=SCBus
SCBusClockMaster=AUTOMATIC
SCBusClockMasterSource=AUTOMATIC
#[Genload - ID 0] /* T1/E1 voice HD */
#Feature=dpd_in
#ParameterFile=spandti.prm
#[Genload - ID 1] /* T1/E1 voice HD */
#ISDNProtocol=ne1
The main portal of Bayonne is at the GNU: http://www.gnu.org/software/bayonne/. As described in the Bayonne User Manual, you needs four more components to make Bayonne works, namely the CommonC++, ccAudio, ccRTP, ccScript. These four components can be obtained via HTTP and FTP from ftp.gnu.org or any other GNU FTP mirrors. At the time I write this document, the latest versions available are: CommonC++2 1.0.1 (commoncpp2-1.0.1.tar.gz), ccAudio 1.0 RC 1 (ccaudio-1.0rc1.tar.gz), ccRTP 0.9.1 (ccrtp-0.9.1.tar.gz), ccScript 2.2.1 (ccscript-2.2.1.tar.gz). The latest version of Bayonne is 1.0.0 (bayonne-1.0.0.tar.gz).
After obtaining all the tar balls, extract and install the CommonC++ first, then the ccAudio, ccRTP and ccScript in any other, and finally extract and install the Bayonne package. The following screen dumps shows what's being done:
bayonne-1.0.0.tar.gz ccrtp-0.9.1.tar.gz commoncpp2-1.0.1.tar.gz
ccaudio-1.0rc1.tar.gz ccscript-2.2.1.tar.gz
# for x in *; do tar zxf $x; done
# ls -l
bayonne-1.0.0/ ccrtp-0.9.1/ commoncpp2-1.0.1/
bayonne-1.0.0.tar.gz ccrtp-0.9.1.tar.gz commoncpp2-1.0.1.tar.gz
ccaudio-1.0rc1/ ccscript-2.2.1/
ccaudio-1.0rc1.tar.gz ccscript-2.2.1.tar.gz
# cd commoncpp2-1.0.1
# ./configure -prefix=/usr
....
# make && make install
....
# cd ../ccaudio-1.0rc1
# ./configure -prefix=/usr
....
# make && make install
....
# cd ../ccrtp-0.9.1
# ./configure -prefix=/usr
...
# make && make install
...
# cd ../ccscript-2.2.1
# ./configure -prefix=/usr
...
# make && make install
...
# cd ../bayonne-1.0.0
# ./configure -prefix=/usr
...
# make && make install
...
After the Bayonne and its depending packages are installed, you can have a try to see if it works. Just start the Dialogic daemon (/usr/dialogic/init.d/dialogic), and the Bayonne daemon (/etc/rc.d/init.d/bayonne). Then you will find that a demo program starts. Dial to the telephony card and have a try.
Bayonne is not the only way to drive Dialogic devices. Intel provides another suite of development software called Global Call for such a purpose. Global Call is a suite of API, however, it is different from the older, low-level C-API. The Global Call can make us share the same code base between all different Dialogic devices, no matter it is a DM3 or SpringWire board, it is digital or analog. Nevertheless, it is not the purpose of discussing Global Call in this document. If you are interested, please refer to http://resource.intel.com/telecom/support/releases/protocols/GCProtocols20/index.html for details.
Pending
This document was generated using the LaTeX2HTML translator Version 2K.1beta (1.48)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -no_subdir -split 0 -show_section_numbers /tmp/lyx_tmpdir813Uptblf/lyx_tmpbuf813GY5Rhb/bayonne_linux_dialogic_howto.tex
The translation was initiated by Debian User on 2002-09-03