IP Media Server (Global Call) Demo Guide for Windows Operating Systems November 2003 05-2065-002
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 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Figures 1 2 3 4 5 Demo Voice Menu Flowchart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IP Media Server (Global Call) Demo Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EventRouter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IP Media Server (Global Call) Demo Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Tables 1 2 3 4 5 6 7 6 Command Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Runtime Keyboard Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Files Used by the IP Media Server (Global Call) Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 PDL Files Used by the IP Media Server (Global Call) Demo . . . . . . . . . . . . . . . . . . . . .
Revision History This revision history summarizes the changes made in each published version of this document. Document No. Publication Date Description of Revisions 05-2065-002 November 2003 Fax not supported in SR 6.0 PCI Windows demo - removed all references 05-2065-001 September 2003 Initial version of document.
Revision History 8 IP Media Server (Global Call) Demo Guide — November 2003
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 available with your Intel® Dialogic® System Release 6.0 on PCI for Windows. 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: • Intel® Dialogic® System Release 6.
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 — November 2003
System Requirements 2. 2 This chapter discusses the system requirements for running the IP Media Server (Global Call). It contains the following topics: • Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 • Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.
System Requirements 14 IP Media Server (Global Call) Demo Guide — November 2003
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.
Preparing to Run the Demo Quality of Service The application can set threshold values to monitor the quality of service during calls. A fault occurs when the result of a measurement of a QoS parameter crossed a predefined threshold. A success occurs when the result of a measurement of a QoS parameter did not cross a predefined threshold. The QoS parameters are measured during time intervals, starting when a call is established.
Preparing to Run the Demo # If capability is g711Alaw /Mulaw ==> FramesPerPkt = 10,20,30. # G711 frame per packet defines the packet size in # milliseconds # If capability is g723_5_3k / 6_3k ==> FramesPerPkt = 1, 2, 3 . # FrameSize isn't needed, default= 30ms. # If capability is gsm ==> FramesPerPkt = 1, 2, 3 . # FrameSize isn't needed, default= 20ms. # If capability is gsmEFR ==> FramesPerPkt = 1, 2, 3 . # FrameSize isn't needed, default= 20ms. # If capability is g729a ==> FramesPerPkt = 3, 4 .
Preparing to Run the Demo Set IpMediaServer as the active project and build in debug mode.
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 • Demo Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 • Using the Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Running the Demo 4.3 Using the Demo This section describes how to use the IP Media Server (Global Call) demo and contains the following topics: • Keyboard Commands • Using the Media Server 4.3.1 Keyboard Commands The demo always waits for input from the keyboard. While the demo is running, you may enter any of the commands listed in Table 2. Table 2. Runtime Keyboard Commands Command Function q or Q or Ctrl+c 4.3.
Running the Demo 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 Record Prompt) * - Quit without saving Confirm Message Saved [StopRec_Menu] 1 - Record a message 2 - Listen to a message from a mailbox * - Quit Listen to Message Prompt [ListenMsg_Me
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” or “Ctrl+C” to terminate the demo application.
Running the Demo 24 IP Media Server (Global Call) Demo Guide — November 2003
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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 • Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 • Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Demo Details Table 3. Files Used by the IP Media Server (Global Call) Demo (Continued) Directory 26 File Name Purpose IPMediaServer\Release errorInput.vox Voice file IPMediaServer\Release IPMediaServer.cfg Demo configuration file IPMediaServer\Release IPMediaServer.exe Demo executable IPMediaServer\Release listenMenu.vox Voice file IPMediaServer\Release mainMenu.vox Voice file IPMediaServer\Release savecCnfirm.vox Voice file IPMediaServer\Release sendfaxMenu.
Demo Details Table 3. Files Used by the IP Media Server (Global Call) Demo (Continued) Directory 5.1.2 File Name Purpose Modules\ VoiceModule CCSPDevice.cpp Implements the operations of the CCSPDevice class Modules\ VoiceModule CCSPDevice.h Function prototype for ccdspdevice.cpp Modules\ VoiceModule CMailBoxBtil.cpp Implements the operations of the CMailBoxUtil class Modules\ VoiceModule CMailBoxUtil.h Function prototype for cmailboxutil.cpp Modules\ VoiceModule CVoiceBoard.
Demo Details Table 4. PDL Files Used by the IP Media Server (Global Call) Demo (Continued) Directory 5.2 File Name Purpose pdl_win pdl_win.dsp PDL Visual C project file pdl_win pdl_win.dsw PDL Visual C project workspace pdl_win\release psl_win.lib Compiled PDL library Programming Model This section describes the IP Media Server (Global Call) demo architecture. It contains the following topics: • Module Structure • EventRouter • Interfaces • Classes 5.2.
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.
Demo Details A module is treated by the EventRouter as a block box. It has three types of APIs: Initialization • Init( ) – for initializing a module • 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.
Demo Details Table 6. IP Module Classes Category Module Class Name Interface Init( ) CIPModule • Interacts with CIPBoard and CIPDevice. • Starts host based IP protocol • Exports IP module functions to CEventRouter. • Creates and initializes IPT (virtual) board objects Note: The public functions in this class can be accessed by classes outside the IP module.
Demo Details Table 6. IP Module Classes (Continued) Category Board Class Name CIPTBoard • Interacts with the Global Call library to handle IP virtual boards Note: The public function in this class should only be accessed by classes inside the IP module.
Demo Details Table 6. IP Module Classes (Continued) Category Device Class Name Interface Init( ) 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. • Opens an IP device. If successful, creates an IP state machine. If QoS is enabled, creates a media alarm object.
Demo Details Table 7. 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.
Demo Details Table 7. Voice Module Classes (Continued) Category Device Class Name Interface Init( ) 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. • Opens the voice device. If successful, creates voice state machine.
Demo Details Table 7. Voice Module Classes (Continued) Category State Machine Class Name Interface Init( ) CVoiceStateMachine • Opens vox files • Handles voice events and maintains voice state machine(s) • 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 demo initialization as shown in Figure 5. A system is started in the following sequence: 1. The application creates CConfig( ) to parse the configuration file. 2.
Demo Details Figure 5. System Initialization 1. Parse .cfg file Application Configuration 2. Start router 3. Start IP Module 4. Start IP Board Event Router 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. Start Voice State Machine Voice State Machine 5.5 Event Handling This section describes how the IP Media Server (Global Call) demo handles events.
Demo Details 5.5.2 Handling Keyboard Input Events There is an endless loop {while(0)} in the main( ) function in the Main.cpp file. In that loop, the application waits forever for a keyboard event by calling the waitForKey( ) function. The event must be handled immediately and event-specific information should be retrieved before the next call to waitForKey( ). 5.5.3 Handling SRL Events When the R4/Global Call event is received, the application performs the following: 1.
Demo Details typedef struct { int event; TDeviceType destination; int lineDevice; long xmitSlot; long neighborDevice; char dialString[MAX_STRING_LENGTH]} TSUserEvent; IP Media Server (Global Call) Demo Guide — November 2003 41
Demo Details 42 IP Media Server (Global Call) Demo Guide — November 2003
Glossary Codec: see COder/DECoder COder/DECoder: A circuit used on Dialogic boards 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.
IFT: Internet Facsimile Transfer 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.
platforms provide an SCbus interface for interconnection of multiple DM3 platforms, or connection to other SCSAcompatible hardware. The DM3 platform supports timeslot bundling for high bandwidth, and can access up to 256 of the 2048 SCbus timeslots via two SC4000 ASICs. SIP: Session Initiation Protocol: an Internet standard specified by the Internet Engineering Task Force (IETF) in RFC 2543. SIP is used to initiate, manage, and terminate interactive sessions between one or more users on the Internet.
IP Media Server (Global Call) Demo Guide — November 2003
Index Symbols FreeMailBox( ) 37 {while(0)} 40 G A Application Classes 31 C CallbackHdlr( ) 39 CConfig( ) 38 CEventRouter( ) 38 ChannelNumber( ) 31 CheckAndConvertDigits( ) 37 Classes 31 Command Line Switches 19 Compiling and Linking 17 Connect( ) 34, 36 CreateMailBoxFileName( ) 37 D Demo Description 11 Demo Details 25 Demo Options 19 Demo Source Code Files 25 Demo Voice Menu Flowchart 22 Disconnect( ) 34, 36 E Editing Configuration Files 15 Editing the ipmediaserver.
O W OnPlayComplete( ) 36 waitForKey( ) 40 P ParseConfigFile( ) 31 PDL Files 27 PDL Files Used by the IP Media Server (Global Call) Demo 27 PDLSetApplicationExitPath( ) 40 PDLsr_enbhdlr( ) 39 PDLsr_enblhdlr( ) 38 Play( ) 36 Preparing to Run the Demo 15 ProcessEvent( ) 31, 32, 33, 34, 35, 36, 37 Programming Model 28 R Record( ) 36 Running the Demo 19 Runtime Keyboard Commands 20 S SetDeviceReceiveSlot( ) 31, 32, 34 SetFaxHandle( ) 34 SetReceiveSlot( ) 36 Starting the Demo 19 Stopping the Demo 23 System