table of Contents
Chapter 1 Chapter ............................................................. 4
1- 1 research motive .................................................................................
1- 2 topic goal ............................................................ ..5
1- 3 Development Environment and Equipment ...................................................... 6
Chapter II SIP and Vocal System ..............................................7
2- 1 SIP .............................................................................................. ..7
2-1.1 SIP? .................................................. 7
2-1.2 SIP architecture .................................................... ..7
2-1.3 SIP's advantages .................................................... ..8
2-1.4 SIP development status ..................................................9
2- 2 Vocal System ... .. .................................................... 10
2-2.1 What is VOCAL? ................................................ 10
2-2.2 Vocal software architecture .............................................................
Chapter 3 hardware environment .........................................................................................
3- 1 pc ................................................................... 12
3- 2 PDA .........................................................................
Chapter 4 Software Environment .....................................................................
4- 1 system .........................................................................................
4.1-1 pc windows .................................................................................
4.1-2 PC Linux .......................................................................
4.1-3 PDA Linux .................................. ................ .15
4- 2 Development Tools ...........................................................................................
4.2-1 Cross Compiler ...................................................................... ... ..17
4.2-2 Qt / Embedded ...........................................................
4.2-3 TCL / TK / EXPECT ...............................................................................................................................................................................................................................
Chapter 5, actual part .............................................................................
5-1 set up SIP Server .......................................................... ....21
5-2 Compile UA ...................................................................... .23
5.2-1 PC Windows UA .............................. .. ............. ......23
5.2-2 pc Linux ua .................................................................... 23
5.2-3 PDA Linux UA ............................................... 23
5-3 Operation Vocal Server and UA ............................... ... ...... ..25
5-4 To ua plus graphics interface and photo display function ........................... ... 27
Chapter 6 experience ............................................................ ..29
Reference data .................................................................... ..31
Chapter 1
1- 1 research motive
In modern society, people's demand for communications will never end. Many people's mobile bills are tens of thousands. It is really a small burden, and the high rate of long distance calls is more troubles. On the other hand, the computer network is rapidly popular, coupled with the development of IPv6, and the world of ALL IP has been foreseen. Because of this, VoIP combined with computer network and voice communication is a research area that is currently very interested, and SIP (Session Initiation Protocol is a communication protocol that is very potential in this field. This topic is hoping to install a set of SIP voice communication software, read the relevant files, and try to add new features to it, to learn about SIP. 1- 2 Topic Target
I will set up a Vocal system's SIP Server, and in three different platforms of PC Windows, PC Linux, PDA Linux, and install it. In addition, the GUI interface is established and the functions displayed are added.
1- 3 Development Environment and Equipment
PC x 2
IPAQ 3630 PDA
IPAQ Transmission Base (Serial X 1, USB X 1)
IPAQ CF back clip
Symbol Spectrum24 CF Wireless Card
Chapter 2 SIP and Vocal System
2- 1 SIP
2-1.1 SIP?
SIP is the abbreviation of session initiation protocol. It is a communication protocol for "application layer" for "establishing" "Change" "End" multimedia communication talk and conversation, is not responsible for actually speech transmission. Since it is communicated with a pure text similar to HTTP, the architecture is relatively simple and is currently a popular VoIP communication protocol.
2-1.2 SIP architecture
SIP is mainly constructed of three yuan:
1. USER Agent: The Client side is responsible for issuing SIP requirements and has a unique SIP number.
2. Registry Server: Responsible for recording each SIP number and its corresponding IP location.
3. Proxy Server: Responsible for accepting the UA and requests the required data to the Registry Server, and pass it to UA.
When a UA starts, it must first register its IP and SIP Number to Registry Server, this SIP Number uses the URI's form to make memories, so that people who call them only need to know the other party's URI number, not Need to know the other's IP because IP may change, but SIP Number will not change.
When you want to perform a conversation, the call end UA issues inviterative requirements to Proxy Server. After the Proxy Server queries the REGISTER Server Query the other party's IP, the requirements forward will give this request forward to the other party. After receiving the other party, it will respond to the proxy server. Proxy Server In the calling end, the PROXY Server responds to the call end, the call end responds to the other party. At this time, the online connection has been established, and the Media Stream can transfer directly in IP.
2-1.3 SIP's Advantages
SIP mainly has three advantages:
Innovation
SIP is different from H.323, which uses text-base communication, making it easier to understand and can transmit diversified information in the same online. In addition, it is built in the application layer, so that many existing applications can be set with SIPs without too much modification. 2. Dosability
The SIP only needs to call the Server end when the start communication is connected. After the connection is established, the transmission of Peer-to-Peer is greatly reduced to reduce the center of the central host to reduce costs. In addition, SIP is also a simple and efficient communication protocol, which has only 5 calls and 8 responses. In establishing links, SIP is more than 50% less than H.323.
3. Easy to develop
SIP uses standard URI to do location, using Text-Base's message transmission, establishing an Application level, and simple error messages, showing its easy development characteristics, making many manufacturers and academic units to invest in research and development, data acquisition is also quite easy .
2-1.4 SIP development
SIP simple features, making many manufacturers in investing, including Microsoft, Cisco et al, have hardware and software products, in addition to speaking, in addition to speech, more than images, graphics, data delivery. With the development of computer wireless networks and ALL IP, people will be able to walk through the world with a SIP number, completely reach the purpose of communication action.
2- 2 Vocal System
2-2.1 What is VOCAL?
Vocal is an abbreviation of VOVIDA Open Communication Application Library, which is a set of Open Source software developed by the VOVIDA.org organization, which focuses on making VoIP's products easier to market. Vocal provides community software to establish existing or new VoIP applications and services. Vocal System includes SIP Based Redirect Server, Feature Server, Provisioning Server, Marshal Proxy, etc.
2-2.2 Vocal Software Architecture
Vocal contains some of the SIP part and voice communication, and an ProVisioning Server for managing the system, the next page is the entire Vocal System architecture:
Vocal System: Vocal is an IP Base's Call Phone System, using a variety of pain agreements, including now hot SIP.
GUI: Vocal includes a management system for a web base interface, as well as a Java's Client interface.
The most important thing in Vocal System is a voice communication software, which combines with the SIP's USER Agent, and the user can call the phone through the IP network through the UA.
Marshal Server: Corresponds to the Register Server of SIP.
Feature Server: Corresponds to the SIP's Proxy Server.
Provisioning Server: It is used to manage the entire Vocal System's service and the user's registration.
Chapter III Hardware Environment
3- 1 PC
This topic is to try to construct a Vocal communication system on various platforms, so I have prepared three general PCs to install different operating systems:
PC 1:
This computer is primarily used to compile Vocal UA of the Windows version and operate two (Linux) and PDA (Linux) with remote login. Alternatively, the Linux system is installed on the PDA and also rely on this computer. Connect to the IPAQ Serial base with the IPAQ USB base.
PC 2:
This computer mainly is mainly compiled with Vocal UA of Linux version, and also writes and compiled Linux software and PDA software.
PC 3:
This computer is used to install Vocal Server.
3- 2 PDA
In order to display the formation of SIP on the action equipment, I have an IPAQ 3630 PDA and port Vocal UA to the above.
The specifications of the IPAQ 3630 PDA are as follows:
Intel Strong ARM CPU (206MHz)
4096 color reflective liquid crystal screen
Resolution 240 x 320
32 MB RAM
16 MB ROM
Touch screen
speaker
microphone
In addition, in order to use a wireless network, it is also necessary to add two devices:
IPAQ CF back clip
Symbol Spectrum24 CF Wireless Card
Before the wireless network has not been set, the PDA must be connected to the PC with a base, both of which are connected to the PC 1.
Chapter IV Software Environment
4- 1 system
4-1.1 PC Windows
PC 1 Installation is Microsoft's Windows 2000 operating system, and some programs must also be installed:
1. Super Terminal: This is the software built in Windows, mainly used to complete the PDA before the PDA network is not set.
2. Microsoft ActiveSync: The PDA starts is a Windows CE operating system. To convert to a Linux system To install a burning program on the PDA, you should use Microsoft's synchronization software.
3. Microsoft Visual C 6.0: Vocal UA used to Compile Windows.
4. Putty: This is an SSH online software that manipulates the PDA after the PDA network setting is completed.
5. TCL / TK / EXPECT: The instructions will be made in 4.2.3.
4-1.2 PC Linux
Linux is the key environment of this topic because it makes it easy, the resources are rich, and the environment of Vocal System is the main application and development is Linux. We must install some software on Linux:
1. x Window: The graphical interface used to display the Vocal UA.
2. Cross Compiler: Introduction to 4.2.1.
3. QTE: Introduction at 4.2.2.
4. TCL / TK / EXPECT: Introduction to 4.2.3.
4-1.3 PDA Linux
IPAQ 3630 originally equipped is Microsoft Windows CE 3.0 operating system. In order to facilitate porting Vocal UA to the PDA, it must be replaced with a Linux system. Familiar Project is such a plan, which is a plan of the Handhelds organization, which puts Linux port to various PDAs, official web pages are www.handhelds.org.
Brief introduction how to install Familiar Linux on the IPAQ 3630:
1. Www.handhelds.org2. Select Familiar Linux Distribution3. Select a new Release entry 4. See The Installation Guide5. Download, you can choose a graphic interface, GPE graphics interface or Opie graphics interface 6. Install new bootldr / useing ActiveSync7 Install Via Serial Port
The above will create a Linux environment on iPAQ, and let us control it with a terminal emulation program, but it does not have a network function, let it have network functions, you can have the following methods: 1. Use USB base (cable) simulation network starts with general Linux setting networks and sets USBF network interface, installs this USB simulation network card driver: http://www.bahia21.com /Download.htm and set network resource sharing. 2. Use the CF / PCMCIA cable / wireless network card if your luck is good, the network card can be found directly, then you can use the serial to set the network environment with the general Linux instruction, you can use the network card. If the network card needs to install another driver, you must first install the driver to the PDA to install but you must have a network on the PDA, so you still have to use a USB network.
4- 2 Development Tool
4-2.1 CROSS Compiler
The implementation files compiled with Compiler on the X86 PC can only be on the X86 series CPU RUN. In order to be able to compile the ARM CPU on the X86 PC, we must use Cross Compiler. From the beginning, it is a very complex and time-time, but fortunately, Handhelds.org provides ready-made Cross Compiler for us to use. I installed this Cross Compiler on PC 2. The installation steps are as follows:
1. Download ARM-Linux-Toolchain-currtne.tar.gz and ARM-Linux-libz.tar.gz.
2. Unlock ARM-Linux-Toolchain-Current.tar.gz in the root directory. This will produce a Skiff directory in root instruction.
3. Unlocked ARM-Linux-libz.tar.gz under / Skiff / Local.
4. Finally, set the PATH, so the installation is complete.
The use of Cross Compiler is the same as GCC. Only the name is different, the name corresponds to:
GCC: ARM-Linux-GCCG : ARM-Linux-G Ar: ARM-Linux-Arstrip: ARM-Linux-Strip
4-2.2 QTE
QT is a set of Open Source, which is developed by Trolltech, mainly used to develop graphics interfaces. In X Window, the famous KDE desktop environment is built with this LIB. It uses C grammar, there are all graphics objects available, and there is a slot-oriented event call, which is a weapon for developing software under X.
QTE is the abbreviation of Qt Embedded, as the name suggests, is the QT used in the embedded environment. All listed Linux PDAs on the market are all use QTE as a library of graphics interfaces. QTE's characteristics are not required to display graphical interfaces directly on FrameBuffer, which is very important for hardware and capacity-limited embedded environments, and because of this layer, the speed of the reaction Faster. There are two sets of graphics environments in Familiar, one is Opie, and the other is the official qtopia of Trolltech. Although Familiar provides QTE environment, it is still necessary to install the PC version of QTE in a general PC. Trolltech only provides Source Code, so we must compile the X86 PC version of QTE for us to write program tests on the PC. After completion, compile it to the ARM version to the PDA. If the program is to run on Windows, you must get Windows to compile once with Visual C , and the process is quite troublesome.
At the beginning I used QTE as a development tool, but later encountered many problems, including communication, too many compilation issues of different platforms, etc., and finally gave up, and the TCL / TK / EXPECT.
4-2.3 TCL / TK / EXPECT
TCL is the abbreviation of Tool Command Language, which is widely used in the UNIX world. Like shell script, it is not necessary to compile after the program is written. As long as it can be implemented directly, it can be transplanted directly. .
TK is a TCL graphical extension tool, plus TK, you can use TCL to write a graphics interface program under X WINDOW. Expect is the extension tool for TCL to complete the automation job.
TCL, TK, EXPECT has its own direct translator, where TK and Expect's direct translator can perform TCL programs, but cannot execute the other person. For the sake of convenience, someone will take TK with Expect's straight translator, called Expectk, and there is currently a PC Linux version of the PC Windows version of Binary, but there is no version of the PDA.
Chapter V
5- 1 Set Vocal Server
VoCal only provides Source downloads when I do this topic, so I have to build Vocal Server must be compiled by themselves.
To the vovida.org website Download the entire TAR BALL, there are more than 100 MB after the Linux environment, and the standard three steps in the top of the Source:
./configure
Make
Make Install
Next to the Vocal installed directory (assuming / usr / local / vocal) to set:
Cd ./bin/allinoneconfigure/
AllinoneConfugure
Thanks Vocal, which provides this convenient Configure tool. The problem is that it will automatically guess the installation environment, and often wrong, so sometimes some things in this script, I am not the same every time, but later Discover the old version installed
There is no problem (version 1.3).
Next to start Vocal Server in BIN:
./vocalctl
If there is no problem, Vocal Server is installed.
5- 2 compile UA
5-2.1 PC Windows UA
In the entire Vocal's Source Tree, the part of the UA is placed under ./SIP/ua, but only take this part to compile this part is unable to succeed, so it is best to get the entire Source Tree gets under Windows, but It is compiled in ./sip/ua, you can get the UA of Windows after compiling.
It should be noted that in addition to ua.exe, pthread.dll also has Tone this directory must be in the same directory with ua.exe, UA.exe can execute. There is also a call setting file, in 5-3.
5-2.2 PC Linux UA
UA should have been compiled after the previous Vocal Server compilation is completed, just below ./sip/ua. If not, play Make directly in this directory, you should be able to compile.
5-2.3 PDA Linux UA
This is the most troubled part. If you use a 1.4 or previous version, then the incorrect error will not be imagined, so you must use its latest version 1.5 Beta, which supports Compile to become the version of ARM IPAQ. However, this setting file must be found on himself and set it to the default, then modify Makefile will replace the GCC to install the CROSS Compiler installed before you can start compilation.
There is a problem with the process of compilation, that is, it requires libssl and libcropty, and must be the version of ARM, so it is recommended to get openssl's Source before compiling UA and make it cross compile to ARM version to make UA's compilation process smoothly get on.
After completing the completion, the executive UA is transferred to the PDA along with the TONE directory.
5-3 Operation Vocal Server and UA
The provisioning server in Vocal Server is one of the features to manage the utility's account. Each user's SIP number must first be used after provisioning registration. Vocal Server is just automatically registered with two numbers: 1000, 1001. To increase, as long as the new Web management system of Vocal Server can be added.
UA must have a dial setting file, and VoCal provides a dial-up setting file of 1000 and 1001 in advance, placed under / usr / local / vocal / etc, ua1000.cfg and ua1001.cfg is. Open these two files, find that only user_name is different, one is 1000, the other is 1001, then give the new user to create a set file, as long as copying one, then replace User_name.
Place the dial setting file in the UA execution file in the same directory, you can start dialing. The start-up method is (in a Windows environment):
UA -S -F uaxxx.cfg
Uaxxxx.cfg is naturally the name of the dial setting file.
After both ends are started, you can start dialing. Suppose I want to call 1001 from 1000:
1. Press A at 1000.
2. Press the number of the other party to 1001
3. Dialonic sound, 1001 here will see incoming call ...
4. 1001 Press A to pick up, the two sides start call 5. After the call is completed, the two sides shall hang up.
Note: PC Linux Environment will not be executed, and it is speculated that the sound card driver is incorrect, so it is impossible to hear the sound under linux.
5-4 to UA plus graphics interface and photo display
VOCAL originally a Command Line Application, inconvenience, and other Vocal only a call function. In order to improve the above two, I wrote a front-end GUI for VoCal and add the photos displayed. The programming used is TCL / TK / EXPECT.
Chapter VI
This topic is due to most of the LINUX, plus the PDA cross-platform, so many problems have been met:
1. Linux hardware driver is not easy: Linux ua has no way to break through the part of the voice, because UA will automatically find the sound device it want, and the sound device when the original Linux is installed, so it is not possible to use -s parameters under Linix .
2. The PDA ARM version UA has never been able to compile smoothly. After a while, it will find that the latest version of Vocal can be solved, and the previous version is not supported.
3. Cross Compiler under Linux is unlike Windows Visual Studio Embedded has a highly integrated interface, compile, test, upload can be completed once, or even simulates on the PC. In Linux, use the GCC port program to have worked hard, but also pay attention to whether the various forms library is complete. If there is an error, you must speculate yourself, modify the problem with the text interface, the more you change the error message, the more this topic Have the largest part of the problem.
4. Write the GUI, because I don't intend to modify the original code of UA, it is another layer of GUI outside. At first I chose QTE to do development tools, and encountered serious stroke communication issues, and finally gave up. Later, the TCL / TK / EXPECT can be used to complete. However, the direct translator Expectk has only x86 Linux version with the Windows version, and the PDA ARM version has never been compiled, so there is no way to use graphics interfaces on the PDA.
In this topic, I met the above problems, so in addition to SIP and Vocal, I also exposed to Cross Compiler, Linux PDA, QT / Embedded, TCL / TK / EXPECT, etc., although the result is not satisfactory, it has been Many valuable experiences are also a harvest.