IP Media Server (Global Call) Demo Guide August 2005 05-2065-003
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT.
Contents Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 About This Publication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1 Demo Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Figures 1 2 3 4 5 4 Demo Voice Menu Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 IP Media Server (Global Call) Demo Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 EventRouter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 IP Media Server (Global Call) Demo Threads . . . . . . . . . . . . . . . . . . . . .
Contents Tables 1 2 3 4 5 6 7 8 9 10 Quality of Service Parameter Defaults for DM/IP Series Boards. . . . . . . . . . . . . . . . . . . . . . . . Quality of Service Parameter Defaults for IPT Series Boards . . . . . . . . . . . . . . . . . . . . . . . . . . Command Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Runtime Keyboard Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents 6 IP Media Server (Global Call) Demo Guide – August 2005
Revision History This revision history summarizes the changes made in each published version of this document. Document No. Publication Date 05-2065-003 August 2005 Description of Revisions Globally added Linux-specific filenames, paths, and commands. Globally updated paths to use environment variables for installation base directory. Demo Description chapter : Added note about channel density and numbering restrictions Editing the IPMediaServer.
Revision History 8 IP Media Server (Global Call) Demo Guide — August 2005
About This Publication This section describes the purpose of the guide, the intended audience, and provides references to other documents that may be useful to the user. • Purpose • Intended Audience • How to Use This Publication • Related Information Purpose This guide provides information on the IP Media Server (Global Call) demo that is provided with Intel® Dialogic® System Release 6.1. The guide describes the demo, its requirements, and provides details on how it works.
About This Publication • Chapter 2, “System Requirements” outlines the hardware and software required to run the demo • Chapter 3, “Preparing to Run the Demo” describes the preparations required before running the demo • Chapter 4, “Running the Demo” describes how to run the demo • Chapter 5, “Demo Details” provides details on how the demo works Related Information See the following for more information: • the Release Guide for your Intel Dialogic System Release • the Configuration Guide for your Intel
Demo Description 1. 1 This chapter describes the basic features of the IP Media Server (Global Call) demo. The IP Media Server (Global Call) demo is an object-oriented host-based application that demonstrates using the Global Call API to build an IP media server, providing voice and fax services via IP technology. The demo source code can be used as sample code for those who want to begin developing an application from a working application.
Demo Description 12 IP Media Server (Global Call) Demo Guide — August 2005
System Requirements 2. 2 This chapter discusses the system requirements for running the IP Media Server (Global Call) demo. It contains the following topics: • Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 • Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.
System Requirements 14 IP Media Server (Global Call) Demo Guide — August 2005
Preparing to Run the Demo 3. 3 This chapter discusses the preparations necessary to run the IP Media Server (Global Call) demo. It provides information about the following topics: • Editing Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 • Compiling and Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.
Preparing to Run the Demo • InBand – usually used with G.711 coders • RFC2833 Capability Describes the transmit and receive coders. See the Global Call IP Technology Guide for specific information about coder support.
Preparing to Run the Demo Table 2. Quality of Service Parameter Defaults for IPT Series Boards QoS Type Fault Threshold 1 Time Interval (ms) Debounce On (ms) Debounce Off (ms) % Success Threshold % Fail Threshold Jitter 30 (ms) 0 (n/a) 0 (n/a) 0 (n/a) 0 (n/a) 0 (n/a) Lost Packets 100 (%) 0 (n/a) 0 (n/a) 0 (n/a) 0 (n/a) 0 (n/a) Notes: 1. Units for Fault Threshold are different for different QoS Types. See unit indications in table cells.
Preparing to Run the Demo # # # # TxVAD = 0 RxType = g711Alaw RxFramesPerPkt = 30 RxVAD = 0 TxType = g711Mulaw TxFramesPerPkt = 20 TxVAD = 0 RxType = g711Mulaw RxFramesPerPkt = 20 RxVAD = 0 # TxType = t38UDPFax } MediaAlarmLostPackets { Threshold = DebounceOn = DebounceOff = Interval = PercentSuccess = PercentFail = } MediaAlarmJitter { Threshold DebounceOn DebounceOff Interval PercentSuccess PercentFail } = = = = = = 20 10000 10000 1000 60 40 # # # # # # Threshold Threshold Threshold Threshold Thre
Preparing to Run the Demo Linux To compile the IP Media Server (Global Call) demo on a Linux system, use gcc version 3.2.3.
Preparing to Run the Demo 20 IP Media Server (Global Call) Demo Guide — August 2005
4 Running the Demo 4. This chapter discusses how to run the IP Media Server (Global Call) demo. It contains the following topics: • Starting the Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 • Demo Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 • Using the Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Running the Demo Table 3. Command Line Switches (Continued) -n Sets the number of channels The lesser of Voice Devices or IP devices -q Activates Quality of Service Disabled Example The following example shows how to launch the demo from a command line with options: IPMediaServer -n64 -cmyconfig.cfg -ea This command launches the demo with 64 channels, using the myconfig.cfg configuration file and A-law encoding. 4.
Running the Demo Voice Mail Menu [Voicemail_Menu] 1 - Record Message 2 - Listen to message from a mailbox * - Quit Send Message Prompt [SendMsg_Menu] Enter Mailbox Number - between 101 - 299 * - Quit Start Record Prompt [Record_Menu] 2 - Start Record Press 2 at end of message to stop recording (at end, Stop Record Prompt is played) * - Quit Stop Record Prompt [StopRec_Menu] 2 - Discard Message and re-record message to same mailbox 3 - Confirm Message [Save_Confirm] 4 - Listen to Message (and replay Stop
Running the Demo Figure 1.
Running the Demo 4.4 Stopping the Demo The IP Media Server (Global Call) demo runs until it is terminated. Press “q” or “Q” to terminate the demo application.
Running the Demo 26 IP Media Server (Global Call) Demo Guide — August 2005
5 Demo Details 5. This chapter discusses the IP Media Server (Global Call) demo in more detail. It contains the following topics: • Files Used by the Demo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 • Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 • Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Demo Details Table 5. Files in IPMediaServer Folder Used by the IP Media Server (Global Call) Demo Sub-Directory (if any) File Name Purpose Release unavConf.vox Voice file Release cspPrompt.vox Voice file Release errorInput.vox Voice file Release IPMediaServer.cfg Demo configuration file Release IPMediaServer.exe Demo executable Release listenMenu.vox Voice file Release mainMenu.vox Voice file Release savecCnfirm.vox Voice file Release sendfaxMenu.
Demo Details Table 6. Files in Modules Folder Used by the IP Media Server (Global Call) Demo (Continued) Sub-Directory 5.1.2 File Name Purpose IPModule CIPStateMachine.cpp Implements the operations of the CIPStateMachine class IPModule CIPStateMachine.h Function prototype for cipstatemachine.cpp IPModule CIPTBoard.cpp Implements the operations of the CIPTBoard class IPModule CIPTBoard.h Function prototype for ciptboard.cpp IPModule CMediaAlarms.
Demo Details Table 7. PDL Files Used by the IP Media Server (Global Call) Demo Sub-Directory (if any) release 5.2 File Name Purpose iptransport.cpp PDL IP transport functions iptransport.h Function prototype for iptransport.cpp pdl.c Platform dependency functions pdl.h Function prototype for pdl.c pdl.ver PDL version information pdl_win.dsp PDL Visual C project file pdl_win.dsw PDL Visual C project workspace makefile PDL make file (Linux only) psl_win.
Demo Details Figure 2. IP Media Server (Global Call) Demo Architecture Voice Module Board Device State Machine IP Module Board Device EventRouter State Machine User Module Board Device State Machine Each module is composed of four elements: • Board • Device • State Machine (call control) • Wrapper The Wrapper acts like a manager, receiving requests from the EventRouter and distributing the request to the boards or devices. A device can have one or multiple state machines attached to it.
Demo Details Figure 3. EventRouter Retrieve event data from GC library Forward result to destination For which technology? IP Voice Voice Module IP Module Yes result result No result.destination = NONE ? 5.2.3 Interfaces The modular architecture implements a unified interface that allows replacement of modules by including new header files and adjusting routing statements. A module is treated by the EventRouter as a block box.
Demo Details • • • • GetNumOfDevices( ) – returns the number of devices available to the application GetDeviceHandle( ) – returns a device handle GetDeviceXmitSlot( ) – returns a device transmit timeslot SetDeviceReceiveSlot( ) – sets a device receive timeslot Runtime • ProcessEvent( ) – processes event data Termination • Exit( ) – exits a module 5.2.4 Classes This section describes the classes contained in the demo and within each module.
Demo Details Table 9. IP Module Classes Category Module Class Name Interface CIPModule • Interacts with CIPBoard and CIPDevice. • Exports IP module functions to CEventRouter. Init( ) • Starts host based IP protocol • Creates and initializes IPT (virtual) board objects • Creates and initializes IPM (media) board objects • Creates and initializes IP device objects Note: The public functions in this class can be accessed by classes outside the IP module.
Demo Details Table 9. IP Module Classes (Continued) Category Board Class Name Interface CIPTBoard • Interacts with the Global Call library to handle IP virtual boards Init( ) • Opens IPT (virtual) board and sets board parameters Note: The public function in this class should only be accessed by classes inside the IP module.
Demo Details Table 9. IP Module Classes (Continued) Category Device Class Name CIPDevice • Handles IP device operations, such as making/dropping calls, sending H.323 messages, making timeslot connections, etc. • Holds CIPStateMachine (or call control) Note: The public functions in this class should only be accessed by classes inside the IP module. Interface Init( ) • Opens an IP device. If successful, creates an IP state machine. If QoS is enabled, creates a media alarm object.
Demo Details Table 10. Voice Module Classes Category Module Class Name CVoiceModule • Interacts with CVoiceBoard and CVoiceDevice. • Exports Voice module functions to CEventRouter. Note: The public functions in this class can be accessed by classes outside the Voice module. Board CVoiceBoard • Interacts with the voice library to handle voice boards Note: The public function in this class should only be accessed by classes inside the Voice module.
Demo Details Table 10. Voice Module Classes (Continued) Category Device Class Name CVoiceDevice • Handles voice device operations, such as playing, recording, tone detection, and tone generation • Holds CVoiceStateMachine Note: The public functions in this class should only be accessed by classes inside the Voice module. Interface Init( ) • Opens the voice device. If successful, creates voice state machine.
Demo Details Table 10. Voice Module Classes (Continued) Category State Machine Class Name Interface CVoiceStateMachine • Handles voice events and maintains voice state machine(s) Init( ) • Opens vox files • Creates mailbox utility object that manages mailboxes Note: The public functions in this class should only be accessed by the classes inside the voice module.
Demo Details The threads are created as follows: 1. The first (main) thread is created by the demo application to get the keyboard input. 2. The second thread is an SRL thread, created as a result of the demo application calling PDLsr_enblhdlr( ). All Global Call events are received through the SRL. 5.4 Initialization This section describes the IP Media Server (Global Call) demo initialization as shown in Figure 5. A system is started in the following sequence: 1.
Demo Details Figure 5. System Initialization 1. Parse .cfg file Application Configuration 2. Start router 3. Start IP Module Event Router 4. Start IP Board IP Module IP Board 5. Start IP Device IP Device 6. Start IP State Machine IP State Machine 7. Start Voice Module Voice Module 8. Start Voice Board Voice Board 9. Start VoiceDevice Voice Device 10.
Demo Details 5.5 Event Handling This section describes how the IP Media Server (Global Call) demo handles events. It contains the following topics: • Event Mechanism • Handling Keyboard Input Events • Handling SRL Events • Handling Application Exit Events • TSUsrEvent Structure 5.5.1 Event Mechanism The IP Media Server (Global Call) demo uses the SRL mechanism to retrieve events. When an event occurs, SRL calls event handlers automatically.
Demo Details 5.5.5 TSUsrEvent Structure The TSUsrEvent structure is used by the demo modules to return event processing results to the event router. The TSUserEvt structure is defined as follows: typedef struct { int event; TDeviceType destination; int lineDevice; long xmitSlot; long neighborDevice; char dialString[MAX_STRING_LENGTH]} TSUserEvent; The fields of the TSUserEvt structure are described as follows: event the name of a user-defined event, such as USR_CONNECTED, etc.
Demo Details 44 IP Media Server (Global Call) Demo Guide — August 2005
Glossary Codec: see COder/DECoder COder/DECoder: A circuit used to convert analog voice data to digital and digital voice data to analog audio. Computer Telephony (CT): Adding computer intelligence to the making, receiving, and managing of telephone calls.
International Telecommunications Union (ITU): An organization established by the United Nations to set telecommunications standards, allocate frequencies to various uses, and hold trade shows every four years. Internet: An inter-network of networks interconnected by bridges or routers. LANs described in H.323 may be considered part of such inter-networks. Internet Protocol (IP): The network layer protocol of the transmission control protocol/Internet protocol (TCP/IP) suite.
T1: A digital transmission link with a capacity of 1.544 Mbps used in North America. Typically channeled into 24 digital subscriber level zeros (DS0s), each capable of carrying a single voice conversation or data stream. T1 uses two pairs of twisted pair wires. TCP: see Transmission Control Protocol Terminal: An H.323 Terminal is an endpoint on the local area network which provides for real-time, two-way communications with another H.323 terminal, Gateway, or Multipoint Control Unit.
IP Media Server (Global Call) Demo Guide — August 2005
Index A G application classes 33 application exit events 42 gc_GetMetaEvent( ) 42 GetDeviceXmitSlot( ) 33, 34 GetDigitCount( ) 38 GetDigits( ) 38 GetDigitString( ) 38 GetFaxHandle( ) 36 GetMailBox( ) 39 GetNumOfDevices( ) 33, 34, 35 GetNumOfDevicesOnBoard( ) 35 GetStoppedReason( ) 38 GetXmitSlot( ) 36, 38 C CallbackHdlr( ) 42 CConfig( ) 40 CEventRouter( ) 40 ChannelNumber( ) 33 CheckAndConvertDigits( ) 39 classes 33 application classes 33 IP module classes 34 command-line switches 21 commands, keyboard
O W OnPlayComplete( ) 38 waitForKey( ) 42 P ParseConfigFile( ) 33 PDL files 29 PDLSetApplicationExitPath( ) 42 PDLsr_enbhdlr( ) 42 PDLsr_enblhdlr( ) 40 Play( ) 38 ProcessEvent( ) 33 programming model 30 R Record( ) 38 requirements hardware 13 runtime commands, keyboard 22 S SetDeviceReceiveSlot( ) 33, 34, 36 SetFaxHandle( ) 36 SetReceiveSlot( ) 38 source code files 27 SRL events, handling 42 starting the demo 21 stopping the demo 25 switches, command line 21 system initialization 41 system requirement