C SDK Developers Guide



Comments



Description

C# SDK Developer’s GuideC# Software Development Kit Model No. KX-NCS6100 Thank you for purchasing this Panasonic product. Please read this manual carefully before using this product and save this manual for future use. Purpose and Scope The purpose of this document is to guide software developers who are interested in using the API interfaces which are provided by C# SDK version 1.1. The scope of the document is to describe how a developer will use the C# SDK library to develop applications. Trademarks • • • Microsoft, MSDN, Windows, Windows Server, Windows Vista and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks identified herein are the property of their respective owners. Microsoft product screen shots reprinted with permission from Microsoft Corporation. 2 C# SDK Developer’s Guide Table of Contents Table of Contents 1 Preface ......................................................................................................6 1.1 1.2 Reference ...........................................................................................................................6 Definitions, Acronyms, and Terminology .......................................................................6 2 Introduction to C# SDK ............................................................................7 3 Installing C# SDK .....................................................................................8 3.1 3.1.1 3.1.2 3.1.3 3.2 3.2.1 3.2.2 3.2.3 3.3 4.1 4.2 4.3 4.3.1 4.3.2 4.4 4.4.1 4.4.2 4.5 4.5.1 4.5.2 4.5.2.1 4.5.2.2 4.5.2.3 4.5.3 4.6 4.6.1 4.6.2 4.6.3 4.6.4 4.7 4.7.1 4.7.2 4.7.3 4.8 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.9 4.9.1 4.9.1.1 4.9.1.2 System Requirements ......................................................................................................8 Required Operating System .............................................................................................8 Minimum Hardware Requirements ...................................................................................8 Software Requirements ....................................................................................................8 PBX Settings ......................................................................................................................9 Supported PBX Types ......................................................................................................9 TCP/IP Setting ..................................................................................................................9 Activation Key ...................................................................................................................9 Installing C# SDK Library ...............................................................................................10 Before Calling C# SDK API .............................................................................................14 Using C# SDK Namespace .............................................................................................14 Starts and Ends C# SDK Library ...................................................................................15 Initialize ..........................................................................................................................15 Shutdown .......................................................................................................................15 Monitoring Line Device ...................................................................................................16 LineOpen ........................................................................................................................16 LineClose .......................................................................................................................16 Information Gathering ....................................................................................................17 PBX Information .............................................................................................................17 Line Information ..............................................................................................................17 GetLineInfoList ............................................................................................................17 GetLineInfo ..................................................................................................................18 GetLineStatus ..............................................................................................................18 Call Information ..............................................................................................................19 Basic Call Control ...........................................................................................................20 Answer Call ....................................................................................................................20 Drop Call ........................................................................................................................20 Make Call .......................................................................................................................21 Two Way Recording .......................................................................................................21 Call Accounting Control .................................................................................................22 Set SMDR On .................................................................................................................22 Set SMDR Off .................................................................................................................22 Get SMDR ......................................................................................................................23 Physical Device Control .................................................................................................24 Button Press ...................................................................................................................24 Set Ringer Status ...........................................................................................................24 Set Display .....................................................................................................................25 Clear Display ..................................................................................................................25 Terminate Display ..........................................................................................................26 C# SDK Events Handling ................................................................................................27 Call Control Events .........................................................................................................28 KX_APPNEWCALL .....................................................................................................28 KX_CALLSTATE .........................................................................................................29 4 C# SDK Programming Guide ................................................................14 C# SDK Developer’s Guide 3 Table of Contents 4.9.1.3 4.9.2 4.9.2.1 4.9.3 4.9.3.1 4.9.3.2 4.9.4 4.9.4.1 4.9.4.2 4.9.4.3 4.9.5 4.9.5.1 4.9.5.2 KX_CALLINFO ............................................................................................................29 Device State Events .......................................................................................................30 KX_DEVSTATE ...........................................................................................................30 SMDR Events .................................................................................................................31 KX_SMDR_CREATE ...................................................................................................31 KX_SMDR_DELETE ...................................................................................................31 PBX Setting and Connection Events ..............................................................................32 KX_REINIT ..................................................................................................................32 KX_RETRIEVE ............................................................................................................32 KX_RECONFIG ...........................................................................................................33 Initialization Error Events ................................................................................................34 KX_INIT_ERROR ........................................................................................................34 KX_LICENSE_ERROR ...............................................................................................34 5 C# SDK Sample Program ......................................................................35 5.1 Call Control Sample ........................................................................................................35 5.1.1 Test Procedures .............................................................................................................36 5.1.2 FormCallControl Class ...................................................................................................37 5.1.2.1 FormCallControl Constructor .......................................................................................39 5.1.2.2 Shutdown When Form Closing ....................................................................................40 5.1.2.3 Respond to Open Button Clicked ................................................................................41 5.1.2.4 Respond to Answer Call Button Clicked ......................................................................41 5.1.2.5 Respond to Drop Call Button Clicked ..........................................................................42 5.1.2.6 Respond to Make Call Button Clicked .........................................................................42 5.1.2.7 Respond to Two-Way Recording Button Clicked ........................................................43 5.1.2.8 C# SDK Events ............................................................................................................44 5.1.2.9 Respond to KX_APPNEWCALL event ........................................................................45 5.1.2.10 Respond to KX_CALLSTATE event ............................................................................45 5.1.2.11 Respond to KX_CALLINFO event ...............................................................................46 5.1.2.12 Respond to KX_DEVSTATE event ..............................................................................46 5.1.2.13 Respond to KX_INIT_ERROR event ...........................................................................47 5.1.2.14 Respond to KX_LICENSE_ERROR event ..................................................................48 5.1.2.15 Respond to KX_RECONFIG event ..............................................................................49 5.1.2.16 Respond to KX_REINIT event .....................................................................................49 5.1.2.17 Respond to KX_RETRIEVE event ...............................................................................50 5.1.3 Line Class .......................................................................................................................51 5.1.3.1 Line Constructor ..........................................................................................................52 5.1.3.2 Open ............................................................................................................................52 5.1.3.3 Close ...........................................................................................................................53 5.1.3.4 Make Call .....................................................................................................................53 5.1.3.5 Drop Call ......................................................................................................................54 5.1.3.6 Answer Call .................................................................................................................54 5.1.3.7 Set Two Way Recording ..............................................................................................55 5.2 Phone Control Sample ....................................................................................................56 5.2.1 Test Procedures .............................................................................................................57 5.2.2 FormPhoneControl Class ...............................................................................................58 5.2.2.1 FormPhoneControl Constructor ...................................................................................60 5.2.2.2 Shutdown When Form Closing ....................................................................................61 5.2.2.3 Respond to Open Button Clicked ................................................................................62 5.2.2.4 Respond to Ring Mode Checked Changed Event .......................................................62 5.2.2.5 Respond to Set display Button Clicked .......................................................................63 5.2.2.6 Respond to Clear Display Button Clicked ....................................................................63 5.2.2.7 Respond to Terminate Display Button Clicked ............................................................64 5.2.2.8 Respond to Keypad Button Clicked .............................................................................64 5.2.3 ExtensionLine Class .......................................................................................................65 4 C# SDK Developer’s Guide ...3.................................................................2 6...........................................3.......................................................................2........................78 5...............................................................................................................................4 Button Press ....................................78 5.....2 6.......2.....3.....................................85 Can I initialize SDK more than one time in my application? ......................................13 6.......................................................................1 ExtensionLine Constructor ..........68 5.....3..................................................................67 5..........66 5..............2 Shutdown When Form Closing ........................2...................................8 Respond to KX_SMDR_DELETE event ........................................................18 General TSP Setting ......3........................................................................................85 How do I find the dialable address for destination to be dialed? ...................4 Get SMDR ............2.............................1...84 Can C# SDK library work with 1st Party TSP? .........................2...............86 What are those APIs which need to execute on an opened line? ........5 6......................86 Can I install more than one instance of C# SDK in the same PC? .....................2.......................................................1 Test Procedures .................................86 How can I uninstall C# SDK? ......................2...............84 How do I identify a PBX? .......................................................................................3..................11 6.........................6 6...............................6 C# SDK Events ...2.....76 5.........76 5...3..........2 Open ..................................................3...............................................................3....2.............17 6.....................68 5...................................................2.................2..................................................................................3 6...........82 6....................................................................................3......................................................................................................7 Clear Display ...........................................2.........3....................84 How do I find the IP address for the connected PBX? ....................................................................8 Terminate Display .....1 SystemLine Constructor .............9 6.........................................3 Close ...................69 5......2....................72 5.....................................75 5....................3...............................80 5..................................................................................................1 FormSMDR Constructor .............2.2 SMDR ON ..........2....................67 5.7 6............70 5.82 How to verify TSP <-> PBX connection? ..2.3................85 How do I find the voice mail group number in order to use SetTwoWayRecording? .1..82 How to generate KX_REINIT and KX_RETRIEVE event? .....87 C# SDK Developer’s Guide 5 .......................15 6......10 6.............................2..85 How do I know which PBX is returning errors during SDK initialization? .......................2................86 7 C# SDK Error Troubleshooting ............................2............1...............................3........3 Respond to SMDR ON Button Clicked ....Table of Contents 5..............2...............................................................................................................................12 6.................3...............................3........................3 SMDR Sample .............................84 How do I obtain an activation key for a Third Party CTI (KX-NCS3930)? ...................2.......6 Set Display ..75 5...................3 SMDR OFF ...................................................3............84 How do I find the name of a line? ...............2.69 5................85 Why does my application not receive any events from SDK? ........................................................................................................................................2.......................2.....2.............2..........................................................4 Respond to SMDR OFF Button Clicked ...............................3......84 How do I find a call ID of a call? ....................1 6.................2...............2..........2 FormSMDR Class ...3.........................................82 How to configure multiple PBX? ......84 How do I install an activation key for a Third Party CTI (KX-NCS3930)? ................2..........3.............................................7 Respond to KX_SMDR_CREATE event .......................14 6.....................................3.......................................4 6..........................79 5......3 SystemLine Class .......86 Why I did not receive any notification in an SMDR related event after SetSMDROn? .........................................................................3........................66 5.........77 5.................3...................................5 Respond to Button Get SMDR Information Click ...............71 5.............................1 6........80 5...................2 6.....................81 6 Frequently Asked Questions ........82 How to know the CTI port of a PBX? ............1.................2..............................................2..................4 6............3............................3.8 6.........2........1 6...............3..................5 Set Ringer ...........................................................................2...............74 5...........84 What is the C# SDK library? ..............83 C# SDK Information ...85 Do I need to shutdown SDK when my application exits? .............................................................................3 6............3........................79 5...............2...........16 6.. 2 Definitions. Acronyms.3 3.1 Reference 1. and Terminology 1 Preface 1.2 Definitions. C# SDK Library API Reference Manual 2. Panasonic KX-TDA TAPI Specification Version 3. Acronyms. and Terminology SDK TSP DLL SMDR PS PT DPT Software Development Kit TAPI Service Provider Dynamic Link Library Station Message Detail Recording Portable Station Proprietary Telephone Digital Proprietary Telephone 6 C# SDK Developer’s Guide .1. TAPI reference from MSDN® 2009 1. This is to ensure that C# SDK library has full control over the PBX. Use a Panasonic 3rd Party TSP that is compatible with the environment in which the C# SDK library is being used.2 Introduction to C# SDK C# SDK library is a DLL composed by C# class library and is a wrapper class located on TAPI. Obtain Panasonic 3rd Party TSP from sales companies or dealers distributing C# SDK. To use C# SDK library. C# SDK provides a simple and easy-to-use programming interface. The following figure shows the architecture of C# SDK application. Windows PC User Application C# API C# SDK Library TAPI Windows Telephony Service Panasonic 3rd Party TSP 3rd Party CSTA Panasonic PBX Note • • C# SDK library assumes that no other TAPI application is running on the same PC. C# SDK Developer’s Guide 7 . Panasonic TAPI Service Provider (Panasonic 3rd Party TSP) is required. 3 Software Requirements 3 Installing C# SDK 3.1 System Requirements 3.1. 3.1.1.2 Minimum Hardware Requirements • • Windows has to work on the PC LAN interface is needed.1.1 Required Operating System Panasonic C# SDK version 1.5 Microsoft Visual Studio® 2008 Panasonic 3rd Party TSP version 3.3 Software Requirements • • • Microsoft .3 or later 8 C# SDK Developer’s Guide .NET Framework version 3.1 library will be able to work on the following operation system: • Microsoft® Windows® XP (32-bit only) • Microsoft Windows Vista® (32-bit and 64-bit) • Microsoft Windows Server® 2008 (32-bit and 64-bit) • Microsoft Windows 7 (32-bit and 64-bit) 3.3. Panasonic 3rd Party TSP uses TCP/IP to connect and control the KX-TDE/KX-NCP series PBX. and KX-NCP500/KX-NCP1000.2.0000 or later).3.0000 or later).2. – Activation Key for Third Party CTI (KX-NCS3930) To obtain and install the activation key.2. KX-TDE600 (PGMPR Software File Version 3. please make sure you know the IP address of the PBX and its CTI port.1 Supported PBX Types Supported PBX types are KX-TDE100/200 (PMMPR Software File Version 3. 3.2 PBX Settings 3.2.3 Activation Key 3.3 Activation Key • • To use C# SDK features.2 TCP/IP Setting Before installation.4 How do I install an activation key for a Third Party CTI (KX-NCS3930)? C# SDK Developer’s Guide 9 .3 How do I obtain an activation key for a Third Party CTI (KX-NCS3930)? and 6.2. By default the CTI port is 33333. Note KX-TDA100/200/600 are not supported. 3. the following activation key is required. refer to section 6.2. 2.3 Installing C# SDK Library 1. Double-click the C# SDK setup file. Note If another installation is already running. 10 C# SDK Developer’s Guide .3. Click “Next” to continue installation.3 Installing C# SDK Library 3. the following dialog is displayed and the installation process is aborted. Click “Cancel” to abort. Click “Back” to go back to the previous step. Select “I accept the terms of the license agreement” and then click “Next” to continue installation after reading the agreement. Click “Back” to go back to the previous step. Click “Next” to continue installation with default installation path. Click “Cancel” to abort installation. Click “Cancel” to abort installation. 4. C# SDK Developer’s Guide 11 .3 Installing C# SDK Library 3.3. 12 C# SDK Developer’s Guide .3 Installing C# SDK Library The default installation path is the setup file location. Click “Back” to go back to the previous step. Click “Install” to start installation. Click “Change” and then select desired installation path from the following dialog. Click “Cancel” to abort installation.3. 5. C# SDK Developer’s Guide 13 .3. Click “Finish” to complete the installation.3 Installing C# SDK Library 6. 2 Using C# SDK Namespace C# SDK namespace must be added. • The application project must make a reference to KXTapiAPI.2 Using C# SDK Namespace 4 C# SDK Programming Guide 4.1 Before Calling C# SDK API In order to use the C# SDK library. the application needs the following: • Install Panasonic 3rd Party TSP and configure the settings for connecting to the PBX. • PBX contains Activation Key for Third Party CTI (KX-NCS3930).4. 4.dll found in C# SDK. 14 C# SDK Developer’s Guide . 3.2 Shutdown To shutdown the C# SDK library: C# SDK Developer’s Guide 15 .1 Initialize Initialize is used to start the C# SDK library.4. Error event is sent if error occurred or activation key validation failed during initialization.3 Starts and Ends C# SDK Library 4.2 Shutdown 4. 4.3.3. User application which is interested in receiving initialization error event needs to subscribe to C# SDK event before calling Initialize method. 1 LineOpen LineOpen is used to monitor a line device.4.4.4 Monitoring Line Device 4. 4.2 LineClose LineClose is used to stop monitoring a line device. 16 C# SDK Developer’s Guide .4.4.2 LineClose 4. C# SDK Developer’s Guide 17 .1 GetLineInfoList GetLineInfoList is used to get a list of line information for all available lines in the system.5. For details of V_LINEINFO.2.2 Line Information 4. This method is used to obtain line information after initialization (e.4.g: line ID. For details of V_PBXINFO. 4.5. extension number).5. please refer to C# SDK Library API Reference Manual. please refer to C# SDK Library API Reference Manual.2 Line Information 4.1 PBX Information GetPBXInfo is used to get PBX information for an opened line device.5.5 Information Gathering 4. 2.3 GetLineStatus GetLineStatus is used to get current line status of a line device.2. C# SDK library returns KX_UNKNOWN. This method is used to update line information. This method returns an enumeration. E_LINESTATUS. C# SDK library returns KX_INS or KX_OUS depending on current status of the line. For non-monitored line.4. For details of V_LINEINFO. 4.2 GetLineInfo GetLineInfo is used to get line information for a specified line in the system. 18 C# SDK Developer’s Guide . For monitored line. please refer to C# SDK Library API Reference Manual.5.5.5.2 Line Information 4. GetCallInfo method is used.3 Call Information 4. GetCallInfo returns a V_CALLINFO structure containing requested call information.3 Call Information To get current call information of a call.4. C# SDK Developer’s Guide 19 . For details of V_CALLINFO.5. please refer to C# SDK Library API Reference Manual.5. 6.1 Answer Call AnswerCall is used to answer a specified incoming call. For called party.6. The call state of the incoming call must be offering.2 Drop Call DropCall is used to drop a specified call.6. 20 C# SDK Developer’s Guide . the call state must be connected otherwise KX_INVALCALLSTATE error is returned. 4.4.2 Drop Call 4.6 Basic Call Control 4. 4.4 Two Way Recording SetTwoWayRecording is used to record a specified connected conversation into the requesting device’s mailbox. Voice mail setting is required to use this feature.6.4 Two Way Recording 4.6. This method is not available for a SIP type of extension.6. C# SDK Developer’s Guide 21 .3 Make Call MakeCall is used to place a call on a specified line to a destination address as specified.4. 4. 22 C# SDK Developer’s Guide .7.1 Set SMDR On SetSMDROn is used to enable call accounting information.7.7 Call Accounting Control Note All SYSTEM lines for PBX with activation key (KX-NCS3930) are monitored by default when Initialize method is called.2 Set SMDR Off 4. 4. application will not receive an SMDR event. SYSTEM line needs to be monitored in order to use call accounting control methods. KX_SMDR_CREATE event is generated for SYSTEM line whenever a CO call ends.7.2 Set SMDR Off SetSMDROff is used to disable call accounting information. After starting SMDR off.4. After starting SMDR on. 7.4.3 Get SMDR GetSMDR is used to get a specified call accounting information.3 Get SMDR 4. please refer to C# SDK Library API Reference Manual. C# SDK Developer’s Guide 23 . This method returns call account information of type V_CALLACCOUNTINFO.7. For details of V_CALLACCOUNTINFO. 24 C# SDK Developer’s Guide .8.8 Physical Device Control 4.1 Button Press ButtonPress is used to simulate activation of a specified button for a specified proprietary telephone. 4.8. For details of E_RINGMODE.4.2 Set Ringer Status 4. please refer to C# SDK Library API Reference Manual.2 Set Ringer Status SetRingerStatus is used to ring a specified extension telephone using a specified ring mode.8. 4 Clear Display ClearDisplay is used to clear all text on the telephone display. 4.4 Clear Display 4.4.8.8. This method supports PT (DPT and IP-PT) and PS extension lines only. C# SDK Developer’s Guide 25 .3 Set Display SetDisplay is used to set specified text to a telephone display. This method supports PT (DPT and IP-PT) and PS extension lines only.8. 8.4.5 Terminate Display TerminateDisplay is used to terminate the control for telephone display.8. This method supports PT (DPT and IP-PT) and PS extension lines only. 26 C# SDK Developer’s Guide .5 Terminate Display 4. 9 C# SDK Events Handling C# SDK library uses events to notify user applications regarding change of line or call state. call information and PBX setting or connection.4.9 C# SDK Events Handling 4. C# SDK Developer’s Guide 27 . User applications that are interested in C# SDK events needs to subscribe KXMessageEvent. 1 Call Control Events 4.1.1 KX_APPNEWCALL KX_APPNEWCALL is sent when a new call ID is created.1 Call Control Events The following are the methods for handling each event according to categories. 4. 28 C# SDK Developer’s Guide .4.9.9.9. 9. C# SDK Developer’s Guide 29 . For details of V_EVENTCALLINFO.1.1 Call Control Events 4.9.2 KX_CALLSTATE KX_CALLSTATE is sent when the state of the specified call has changed.9. 4.4. please refer to C# SDK Library API Reference Manual. For details of E_LINECALLSTATE. please refer to C# SDK Library API Reference Manual.3 KX_CALLINFO KX_CALLINFO is sent when call information about the specified call has changed.1. 2 Device State Events 4.9.9. 30 C# SDK Developer’s Guide .9.2.1 KX_DEVSTATE KX_DEVSTATE is sent when the state of a specified line device has changed. For details of E_LINEDEVSTATE.4. please refer to C# SDK Library API Reference Manual.2 Device State Events 4. 9.9.3 SMDR Events 4.3.1 KX_SMDR_CREATE KX_SMDR_CREATE is sent to report that call accounting information is added into call account information buffers.9. C# SDK Developer’s Guide 31 .3. 4.2 KX_SMDR_DELETE KX_SMDR_DELETE is sent to report that call accounting information is deleted from call account information buffers.4.3 SMDR Events 4.9. 4 PBX Setting and Connection Events 4.9.9.4 PBX Setting and Connection Events 4. 4.9.9.4.4.1 KX_REINIT KX_REINIT is sent when any connection error between PBX and C# SDK Library has occurred.4.2 KX_RETRIEVE KX_RETRIEVE is sent when connection between PBX and C# SDK Library has been recovered after a connection error occurred. 32 C# SDK Developer’s Guide . 3 KX_RECONFIG KX_RECONFIG is sent when the PBX setting is changed.4 PBX Setting and Connection Events 4.4. C# SDK Developer’s Guide 33 .9.4.9. 5 Initialization Error Events 4.9.5 Initialization Error Events 4.2 KX_LICENSE_ERROR KX_LICENSE_ERROR is sent when PBX does not contain an activation key (KX-NCS3930).5. 4.9. 34 C# SDK Developer’s Guide .9.1 KX_INIT_ERROR KX_INIT_ERROR is sent when an initialization error occurs.4.5.9. dll must be in the same folder to execute the executables.5. The source code is located in the “Sample Code” folder.1 Call Control Sample This sample demonstrates how to use the C# SDK library to develop simple call control application. The executables are located in the “Executables” folder in the “Sample Code” folder. Call control sample will demonstrate how to use the following APIs supported by C# SDK library: • Initialize • GetLineInfoList • GetLineInfo • LineOpen • LineClose • MakeCall • DropCall • AnswerCall • SetTwoWayRecording • Shutdown This sample will also demonstrate how to handle the following C# SDK events: • KX_APPNEWCALL • KX_CALLSTATE • KX_CALLINFO • KX_INIT_ERROR • KX_LICENSE_ERROR • KX_DEVSTATE • KX_RECONFIG • KX_REINIT • KX_RETRIEVE C# SDK Developer’s Guide 35 . 5. KXTapiAPI. make an outgoing call.1 Call Control Sample 5 C# SDK Sample Program C# SDK includes three sample programs. drop a call. Call control sample is able to monitor a line. answer an incoming call and set two-way recording during call connection. 2.1 Test Procedures The following figure shows the Call Control Sample program running. 5. Click “Open” button to monitor the selected line. Select an extension line device from the available line devices list. The following are the test procedures: 1. 3.5. Click “Make Call” button to place a call. Click “Drop Call” button to drop the call. For destination number of desired line device. refer to “Ext Number” of its line information. 36 C# SDK Developer’s Guide . Extension name and status will be updated for the monitored line. 6.1. 4. Enter destination number in the Called Number text box. Call information will be updated according to call events.1 Test Procedures 5.1. 5.1.2 FormCallControl Class 5.1.2 FormCallControl Class This FormCallControl class in CallControlForm.cs responds to button clicks, C# SDK events and updates user interface. FormCallControl constructor is responsible to initialize C# SDK and register to SDK events. The following is the outline of FormCallControl class. C# SDK Developer’s Guide 37 5.1.2 FormCallControl Class 38 C# SDK Developer’s Guide 5.1.2 FormCallControl Class 5.1.2.1 FormCallControl Constructor FormCallControl constructor initialize C# SDK library once the application is started. C# SDK library uses events to facilitate communication with a user program. An event is sent to a user application during initialization if there is any occurrence of an activation key validation error. User applications that are interested in receiving an initialization error event are required to subscribe to a C# SDK event before calling initialize. The following is the code written to subscribe C# SDK event, initialize C# SDK library, get list of available lines and line information. When this application starts, FormCallControl will initialize call and line information using ClearCallInformation and ClearLineInformation methods. MonitorLine is initialized as a Line object. Line is a C# SDK Developer’s Guide 39 5.1.2 FormCallControl Class class defined to handle line related information and line functions. Details for this class will be discussed later in this document. KXMessageEvent is subscribed, followed by C# SDK library initialization. GetLineInfoList is called after initialization to get all available lines for the system. In case of initialization failed or no PBX is available, KX_NOLINE message is returned. The following error message is shown and call control sample application is terminated. 5.1.2.2 Shutdown When Form Closing When form is closing, call control sample calls Shutdown method to end C# SDK library usage. 40 C# SDK Developer’s Guide 2. When “Open” button is clicked. the event handling method for click event of “Answer Call” button: C# SDK Developer’s Guide 41 .2. CallID is set to 0 if no call exists. If an application is monitoring a line. this monitored line will be closed and the currently selected line is monitored or opened.1.1.4 Respond to Answer Call Button Clicked When “Answer Call” button is clicked and if a call exists.3 Respond to Open Button Clicked Method btnMonitor_Click is registered as the event handling method for a click event of Open button. The following is the code written for btnAnswerCall_Click.2 FormCallControl Class 5. btnMonitor_Click will open the currently selected line. AnswerCall method in Line class will be invoked.5. Value for CallID indicates the existence of a call. The following is the code written to respond to monitor button click: 5. clear call information and update line information.1. CallID is updated once MakeCall successful.1. The following is the code written for btnDropCall_Click.2 FormCallControl Class 5.2.5.1.5 Respond to Drop Call Button Clicked DropCall method in Line class will be invoked if a call exists when “Drop Call” button is clicked.1.2.6 Respond to Make Call Button Clicked MakeCall method in Line class is invoked when “Make Call” button is clicked. The following is the code written for btnMakeCall_Click method: 42 C# SDK Developer’s Guide . CallID is set to 0 if no call exists and no action will be performed if drop call button is clicked. the event handling method for click event of “Drop Call” button: 5. 7 Respond to Two-Way Recording Button Clicked Method btnTwoWayRecord_Click is registered as the event handling method for click event of the “Two-Way Recording” button.2 FormCallControl Class 5. TwoWayRecording method in Line class will be invoked if call exists and voice mail number is entered.5.1.1. When the “Two-Way Recording” button is clicked. The following is the code written for btnTwoWayRecord_Click method: C# SDK Developer’s Guide 43 .2. 2. The following is the code written for OnKxRespond method: 44 C# SDK Developer’s Guide .5.8 C# SDK Events OnKxRespond method is registered as event handling method for C# SDK events when an application starts.2 FormCallControl Class 5.1.1. KX_CALLSTATE event is sent when status of a call has changed. KX_APPNEWCALL event is sent when a new call is created.2.9 Respond to KX_APPNEWCALL event OnNewCallEvent method is invoked when KX_APPNEWCALL event is received. OnCallStateEvent method is invoked when KX_CALLSTATE event is received. The following is the code written for OnCallStateEvent method: C# SDK Developer’s Guide 45 .2 FormCallControl Class 5.1.2.10 Respond to KX_CALLSTATE event KX_APPNEWCALL event is always followed by a KX_CALLSTATE event which indicates the initial state of the call. The following is the code written for OnNewCallEvent method: 5. This event provides call ID for a new call.1.5.1. 2 FormCallControl Class 5. The following is the code written for OnDevState method: 46 C# SDK Developer’s Guide . This scenario occurs when TSP fails to retrieve broken connection.1. For detailed information about V_EVENTCALLINFO.11 Respond to KX_CALLINFO event OnCallInformationEvent method is invoked when KX_CALLINFO event is received. V_EVENTCALLINFO.2.12 Respond to KX_DEVSTATE event OnDevState method is invoked when KX_DEVSTATE event is received. The following is the code written for OnCallInformationEvent method: 5. KX_CALLINFO event is sent when call information has changed. Windows Telephony Service should be restarted. please refer to C# SDK Library API Reference Manual. KX_DEVSTATE event is sent when state of a monitored line has changed.2. This event is sent along with call information structure.5.1. In case application received KX_REINIT state.1. The following is the code written for OnInitError method: The following figure shows the error dialog for KX_INIT_ERROR event: C# SDK Developer’s Guide 47 .1.2.2 FormCallControl Class The following figure shows the information dialog for KX_DEVSTATE event: 5. The provider name of the SYSTEM line is provided in this event.13 Respond to KX_INIT_ERROR event KX_INIT_ERROR is sent when C# SDK library fails to LineOpen a SYSTEM line during initialization.1.5. 1. please refer to C# SDK Library API Reference Manual. For detailed information about V_PBXINFO.14 Respond to KX_LICENSE_ERROR event KX_LICENSE_ERROR is sent if specified PBX does not contain activation key (KX-NCS3930).5. The following is the code written for OnLicenseError method: The following figure shows the error dialog for KX_LICENSE_ERROR event: 48 C# SDK Developer’s Guide .2. The PBX information for the PBX which failed is sent along with this event.1.2 FormCallControl Class 5. 2 FormCallControl Class 5.1.2.16 Respond to KX_REINIT event KX_REINIT is sent if specified PBX connection error occurred. User needs to shutdown and reinitialize the C# SDK library to get updated PBX setting.15 Respond to KX_RECONFIG event KX_RECONFIG is sent if specified PBX setting changed.1. The following is the code written for OnReinit method: The following figure shows the information dialog for KX_REINIT event: C# SDK Developer’s Guide 49 . The following is the code written for OnReconfig method: 5.1.2. This message is sent to all monitored lines. All APIs are unavailable during connection retrieve process.5. TSP tries to retrieve the connection for several times. 17 Respond to KX_RETRIEVE event KX_RETRIEVE is sent when connection between PBX and the C# SDK library has been recovered by connection recovery process after a connection error occurred.1. This message is sent to all monitored lines.5.2 FormCallControl Class 5. The following is the code written for OnRetrieve method: The following figure shows the information dialog for KX_RETRIEVE event: 50 C# SDK Developer’s Guide .1.2. 1.3 Line Class 5.5. The following is the outline of Line class.1. C# SDK Developer’s Guide 51 .3 Line Class This Line class in CallControlForm.cs is responsible for storing line information and performing line related operations. This method responsible to call LineOpen to start monitors a line device.1 Line Constructor Line constructor initialized local members.1.2 Open Open method is invoked when the “Open” button is clicked. Local member bIsLineOpen is set to true if LineOpen succeeds and line information is updated.5. The following is the code written for Line constructor: 5.1.1.3. The following is the code written for Open method: 52 C# SDK Developer’s Guide .3.3 Line Class 5. 3 Close Close method is invoked when the “Open” button is clicked. Close method is invoked to close the line. The following is the code written for MakeCall method: C# SDK Developer’s Guide 53 .1. Call ID for the newly placed call is returned.1.3. If call control sample is currently opening a line.5.3 Line Class 5. Method btnMonitor_Click will check whether any line is opened before opening a line.1.4 Make Call MakeCall method is invoked when the “Make Call” button is clicked.3. The following is the code written for Close method: 5. 3.1. The following is the code written for AnswerCall method: 54 C# SDK Developer’s Guide .5.6 Answer Call AnswerCall method is invoked when the “Answer Call” button is clicked. The following is the code written for DropCall method: 5. This method is called only if call exists for monitored line.1.3.1. This method is called only if call exists for monitored line.5 Drop Call DropCall method is invoked when the “Drop Call” button is clicked.3 Line Class 5. 5.3.1.1. This method is called only if call exists for monitored line and voice mail number is entered.3 Line Class 5.7 Set Two Way Recording TwoWayRecording method is invoked when the “Two-Way Recording” button is clicked. The following is the code written for TwoWayRecording method: C# SDK Developer’s Guide 55 . 5. Phone control sample will demonstrate how to use the following APIs supported by the C# SDK library: • Initialize • GetLineInfoList • LineOpen • LineClose • SetDisplay • ClearDisplay • TerminateDisplay • SetRingerStatus • ButtonPress • Shutdown This sample will also demonstrate how to handle the following initialization error events: • KX_INIT_ERROR • KX_LICENSE_ERROR • KX_DEVSTATE • KX_RECONFIG • KX_REINIT • KX_RETRIEVE Note Description for events handling. set ringer status and simulate a button press. 56 C# SDK Developer’s Guide . control phone display.2 Phone Control Sample This sample demonstrates how to use the C# SDK library to develop simple phone control applications. please refer to Call Control Sample section. A phone control sample is able to monitor an extension line.2 Phone Control Sample 5. Phone control sample is focused on the extension line only because only the extension line is eligible to set phone control. 2. column and message into text box in the “Display” group box and then click “Set” button to set phone display. select desired extension line and click the “Open” button to monitor the selected line.2. Click on any key in the “Key Pad” group box to simulate a button press on a monitored extension line. In case the user wants to switch to another extension line. When the Phone Control Sample application started. The following are the test procedures: 1.5.1 Test Procedures The following figure shows the Phone Control Sample program running. Click on “Clear” to clear the display and “Terminate” to terminate the control to phone display. the first extension line on the list is monitored. Enter row. 3. Click on radio button in the “Ringer Status” group box. ringer status is set for the monitored line. 4.1 Test Procedures 5. 5.2. C# SDK Developer’s Guide 57 . 2 FormPhoneControl Class 5. The following is the outline of FormPhoneControl class.5. 58 C# SDK Developer’s Guide .2.2.cs used to respond to user interface action and C# SDK events.2 FormPhoneControl Class This FormPhoneControl class in FormPhoneControl. FormCallControl constructor is responsible to initialize the C# SDK library and register to C# SDK events. 2 FormPhoneControl Class C# SDK Developer’s Guide 59 .2.5. An event is sent to a user application during initialization if there is any occurrence of an activation key validation error.2. C# SDK library uses events to facilitate communication with a user program.1 FormPhoneControl Constructor FormPhoneControl constructor initialize the C# SDK library once the application is started. initialize C# SDK library. User applications that are interested in receiving an initialization error event are required to subscribe to a C# SDK event before calling initialize.2. The following is the code written for FormPhoneControl constructor to subscribe to a C# SDK event.5. 60 C# SDK Developer’s Guide . First available extension line is monitored when application is started.2 FormPhoneControl Class 5.2. and get list of available extension lines and line information. 5.2.2 FormPhoneControl Class When application start. MonitorLine member is initialized as an ExtensionLine object. C# SDK Developer’s Guide 61 .2.5. ExtensionLine is a class defined to handle line information and phone control functions. Details for this class will be discussed later in this document.2 Shutdown When Form Closing When form is closing. phone control sample calls Shutdown method to end C# SDK library usage.2. 2.4 Respond to Ring Mode Checked Changed Event When the ring mode radio button is checked. the monitored line is closed and currently selected line is monitored or opened. The following is the code written to respond to a monitor button click: 5.3 Respond to Open Button Clicked When the “Open” button is clicked. If an application is monitoring a line. btnMonitor_Click will check whether any other line is monitored. FormPhoneControl will invoke ExtensionLine class SetRinger method to ring the monitored line.2 FormPhoneControl Class 5.2.2. The following is the code written for RingMode_CheckedChanged method: 62 C# SDK Developer’s Guide .2.2.5. SetDisplay method in ExtensionLine class will be called.2.2. User interface for FormPhoneControl is updated if SetDisplay is successfull.2. The following is the code written for btnClear_Click method: C# SDK Developer’s Guide 63 . The following is the code written for btnSetDisplay_Click method: 5.5 Respond to Set display Button Clicked When the “Set” button is clicked and if the row and column edit box have valid input.5.2. the displayed message on phone LCD is cleared.2 FormPhoneControl Class 5.6 Respond to Clear Display Button Clicked When the “Clear” button is clicked.2. 2. control over phone display is stopped.5. When button for keypad is clicked.2.2.2 FormPhoneControl Class 5. ButtonClick event is sent to FormPhoneControl.2.8 Respond to Keypad Button Clicked Keypad is a customized user control according to physical phone keypad.2. The following is the code written for btnTerminate_Click method: 5. The following is the code written for CtrlKeypad_ButtonClick method: 64 C# SDK Developer’s Guide .7 Respond to Terminate Display Button Clicked When the “Terminate” button is clicked. CtrlKeypad_ButtonClick used to respond to keypad button click event. The following is the outline of ExtensionLine class.cs is responsible for storing line information and performing phone control related operations.3 ExtensionLine Class 5.3 ExtensionLine Class This ExtensionLine class in FormPhoneControl. C# SDK Developer’s Guide 65 .2.5.2. The following is the code written for Open method: 66 C# SDK Developer’s Guide . Local member bIsLineOpen is set to true if LineOpen succeeded.5.2.3 ExtensionLine Class 5. The following is the code written for ExtensionLine constructor: 5.1 ExtensionLine Constructor ExtensionLine constructor initializes local members. This method will call LineOpen to start monitoring a line device.3.2 Open Open method is invoked when the “Open” button is clicked.3.2.2. 3 Close Close method is invoked when the “Open” button is clicked. Close method is invoked to close the line. If phone control sample is currently opening a line.5.3. The following is the code written for Close method: 5.2.2. Method btnMonitor_Click will check whether any line is opened before opening a line.3 ExtensionLine Class 5.3.2. The following is the code written for ButtonPress method: C# SDK Developer’s Guide 67 .4 Button Press ButtonPress method is invoked when a KeyPad button is clicked. The following is the code written for SetDisplay method: 68 C# SDK Developer’s Guide . The following is the code written for SetRinger method: 5.2.3.6 Set Display SetDisplay method is invoked as respond for the “Set” button click event.3 ExtensionLine Class 5.2.3.5.5 Set Ringer RingMode_CheckedChanged method invokes SetRinger when ring mode radio button is checked.2. The following is the code written for ClearDisplay method: 5.3.3.5.7 Clear Display ClearDisplay method is invoked as respond for “Clear” button click event.8 Terminate Display TerminateDisplay method is invoked as a response for the “Terminate” button click event.2. The following is the code written for TerminateDisplay method: C# SDK Developer’s Guide 69 .2.3 ExtensionLine Class 5.2. 3 SMDR Sample This sample demonstrates how to use the C# SDK library to develop simple call accounting applications. Call accounting information can only be stored in SYSTEM line. This sample will also demonstrate how to handle the following C# SDK events: • KX_SMDR_CREATE • KX_SMDR_DELETE • KX_INIT_ERROR • KX_LICENSE_ERROR • KX_DEVSTATE • KX_RECONFIG • KX_REINIT • KX_RETRIEVE Note Description for KX_SMDR_CREATE and KX_SMDR_DELETE will be discussed in this section. 70 C# SDK Developer’s Guide . The SMDR sample is used to enable or disable call accounting information and get call accounting information.3 SMDR Sample 5. please refer to the Call Control Sample section. Description for others event handling.5. hence the SYSTEM line is the focus for an SMDR sample. An SMDR sample will demonstrate how to use the following APIs supported by the C# SDK library: • Initialize • GetLineInfoList • SetSMDROn • SetSMDROff • GetSMDR • Shutdown Note LineOpen and LineClose for SYSTEM line are not required because SYSTEM line is monitored by default during C# SDK library initialization. call accounting information is enabled for that selected SYSTEM line. Account information is updated. Enter the call accounting information ID into the Information ID text box and click “Get Info” button. 4.1 Test Procedures 5. 5.3.1 Test Procedures The following figure shows the SMDR Sample program running. 2. When SMDR application is started.5. One is Line ID of SYSTEM line 7. Select a SYSTEM line and click the “ON” button in the “Control” group box. the other is Line ID of SYSTEM line 389. two PBX are connected. The following are the test procedures: 1. C# SDK Developer’s Guide 71 . Make a CO call for that PBX and KX_SMDR_CREATE event is received once the call ends. Click the “OFF” button in the “Control” group box to disable call accounting information. 3.3. Note In the above figure. all the SYSTEM lines in the list are monitored. 3.2 FormSMDR Class 5. FormSMDR constructor is responsible for initializing the C# SDK library and registering to C# SDK events. The following is the outline of FormSMDR class.2 FormSMDR Class This FormSMDR class in FormSMDR.3. 72 C# SDK Developer’s Guide .cs is used to respond to user interface action and C# SDK events.5. 5.2 FormSMDR Class C# SDK Developer’s Guide 73 .3. The following is the code written for FormSMDR constructor to subscribe C# SDK event. An event is sent to a user application during initialization if there is any occurrence of activation key validation error. initialize the C# SDK library. AddSystemLine method is used to update user interface with available SYSTEM lines only.1 FormSMDR Constructor FormSMDR constructor initializes the C# SDK library once the application is started.2.2 FormSMDR Class 5.5. User applications that are interested in initialization error events are required to subscribe to C# SDK event before calling initialize. and get a list of lines and add an available SYSTEM line to the list box. All SYSTEM lines are monitored by default during C# SDK library initialization. 74 C# SDK Developer’s Guide .3.3. 2 Shutdown When Form Closing When the form is closing.3 Respond to SMDR ON Button Clicked When the “ON” button is clicked.2.3.3.2. 5. btnSMDRON_Click will invoke an SMDRON method in SystemLine Class to enable call accounting information. the SMDR sample invokes a Shutdown method to end C# SDK library usage.2 FormSMDR Class 5.5.3. The following is the code written for btnSMDRON_Click method: C# SDK Developer’s Guide 75 . 3.3. If call accounting ID is valid. GetSMDR in SystemLine class is invoked and account information is updated. btnSMDROFF_Click will invoke an SMDROFF method in SystemLine Class to disable call accounting information. btnGetSMDR_Click will check whether call accounting ID is valid.5. The following is the code written for btnGetSMDR_Click method: 76 C# SDK Developer’s Guide .4 Respond to SMDR OFF Button Clicked When the “OFF” button is clicked.2 FormSMDR Class 5.2.5 Respond to Button Get SMDR Information Click When the “Get Info” button is clicked.3.2. The following is the code written for btnSMDROFF_Click method: 5. please refer to Call Control Sample section.2.3.6 C# SDK Events OnKXLinesRespond method is registered as event handling method for C# SDK event when application start. C# SDK Developer’s Guide 77 .2 FormSMDR Class 5. The following is the code written for OnKXLinesRespond method: Description for KX_INIT_ERROR and KX_LICENSE_ERROR event handling.3.5. The following is the code written for OnSMDRDelete method: 78 C# SDK Developer’s Guide . KX_SMDR_CREATE event is sent to report that call accounting information is added into call account information buffer.3. The following is the code written for OnSMDRCreate method: 5.2.5. This event provides the call account ID that had been created.7 Respond to KX_SMDR_CREATE event OnSMDRCreate method is invoked when KX_SMDR_CREATE event is received.3.2. KX_SMDR_DELETE event is sent to report that call accounting information is deleted into call account information buffer. This event provides the call account ID that had been deleted.2 FormSMDR Class 5.3.8 Respond to KX_SMDR_DELETE event OnSMDRDelete method is invoked when KX_SMDR_DELETE event is received. 3. The following is the code written for SystemLine constructor: C# SDK Developer’s Guide 79 .5.cs is responsible to store SYSTEM line information and performs call accounting related operations.3. 5. The following is the outline of SystemLine class.3 SystemLine Class 5.3 SystemLine Class This SystemLine class in FormSMDR.3.3.1 SystemLine Constructor SystemLine constructor initializes local members. 3.3 SMDR OFF SMDROFF method is invoked to disable call accounting information notification.3. The following is the code written for SMDROFF method: 80 C# SDK Developer’s Guide . Local member bIsSMDRON is set to true if API call succeeds.3 SystemLine Class 5.3. The following is the code written for SMDRON method: 5.3. Local member bIsSMDRON is set to false if API call succeeds.5.3.2 SMDR ON SMDRON method is invoked to enable call accounting information notification. 3.3. please refer to C# SDK Library API Reference Manual.4 Get SMDR GetSMDR method is invoked for obtaining call account information for a specified call account ID. The following is the code written for GetSMDR method: C# SDK Developer’s Guide 81 .3 SystemLine Class 5.3. For details of V_CALLACCOUNTINFO.5. 1.3 How to verify TSP <-> PBX connection? 6 Frequently Asked Questions This section lists frequently asked questions (and answers) about TSP setting and C# SDK library. It is possible to control/monitor with TAPI application(s).1. To start this tool open “Start Menu ® Program ® Panasonic ® KX-TDA TSP ® Connection Monitor”. Disconnected – TSP instance is not communicating with PBX.2 How to know the CTI port of a PBX? You can check the port setting using PC Maintenance Console under “[1-1] Slot – Card Property – IPCMPR – Port Number tab”. Connected – TSP instance is connected with PBX.1 How to configure multiple PBX? Please refer to Panasonic 3rd Party TSP Installation Manual for multiple PBX configurations.6. 6. 6. For details.1. 82 C# SDK Developer’s Guide . Not Registered with TAPI – TSP instance is not registered in TAPI (Telephony System). 6. please refer to the PC Programming Manual. “PBX” combo box is used to select an interested instance to verify connection.3 How to verify TSP <-> PBX connection? Panasonic KX-TDA TSP Monitor is a tool used to verify connection with PBX for each TSP instance.1 General TSP Setting 6. “Connection” may be: Now Connection – TSP instance is initializing connection with PBX.1. C# SDK Developer’s Guide 83 .1. Call event is not notified while TSP sends KX_REINIT event.1. KX_REINIT event is sent and TSP will try to recover the connection.4 How to generate KX_REINIT and KX_RETRIEVE event? 6.6. If TSP loses connection with PBX. You may use the provided shortcut under “TSP Installed Path ® MultiPBX Configuration”. When PBX setting changed between KX_REINIT and KX_RETRIEVE. etc).4 How to generate KX_REINIT and KX_RETRIEVE event? KX_REINIT and KX_RETRIEVE event is generated only when “Send KX_REINIT and KX_RETRIEVE” check box in configuration GUI is checked and TSP works in Standard Mode.g. TSP may fail recovery in some case (e. 5 How do I find the IP address for the connected PBX? The IP address for the connected PBX is obtainable using GetPBXInfo method for any opened line.2. 6.2.2.strName. 6.strName is empty by default.7 How do I find a call ID of a call? 6.6.1 What is the C# SDK library? The C# SDK library is a C# class library (wrapper on TAPI) which provides simpler interfaces for third party developers to develop software for Panasonic PBX.9 System Options – Option 6(CTI) – PBX Name) in order to get value for this structure.2. 6. Call ID for an outgoing call is returned from MakeCall API.3 How do I obtain an activation key for a Third Party CTI (KX-NCS3930)? Please contact Panasonic Sales Company. The mentioned information is provided by V_PBXINFO. Note V_PBXINFO.7 How do I find a call ID of a call? The call ID for an incoming call can be obtained by KX_APPNEWCALL event. 6. IP address is provided by V_PBXINFO. C# SDK library only work with Panasonic 3rd Party TSP.2.6 How do I identify a PBX? A PBX can be identified by an IP address and PBX Name.4 How do I install an activation key for a Third Party CTI (KX-NCS3930)? Please contact Panasonic Sales Company. 84 C# SDK Developer’s Guide . System – 2. 6.strIPAddress.2.strIPAddress and V_PBXINFO.2 C# SDK Information 6.2 Can C# SDK library work with 1st Party TSP? No. 6.2.2. User needs to assign PBX name by using PC Maintenance Console (2. User can obtain line information including the name of a line using a GetLineInfo method by passing in lineID of the specific opened line as parameter.13 Do I need to shutdown SDK when my application exits? 6.strExtName is available for extension.2. please refer to your PBX’s PC Programming Manual. please refer to C# SDK Library API Reference Manual.2. C# SDK Developer’s Guide 85 . 6. 6.strExtNumber provides the dialable address for the line.strExtName is only available for an opened line only. V_LINEINFO. 6.13 Do I need to shutdown SDK when my application exits? It is always recommended to shutdown the C# SDK library and unsubscribe KXMessageEvent before exiting the application. You can only initialize one C# SDK library in an application. This is to free and release the memory which is no longer in use.2.2.2. Sensor. please refer to C# SDK Library API Reference Manual.10 How do I find the voice mail group number in order to use SetTwoWayRecording? For voice mail group number setting.2. For details of V_LINEINFO structure.6. 6. 6. SVM.2.8 How do I find the name of a line? The name of a line is provided in a V_LINEINFO structure. V_LINEINFO.11 Why does my application not receive any events from SDK? A possible cause is KXMessageEvent is not subscribed. For details of V_LINEINFO structure. Group and CO lines only.9 How do I find the dialable address for destination to be dialed? V_LINEINFO.12 Can I initialize SDK more than one time in my application? No. Select the provider name of PBX provided in KX_INIT_ERROR from “TSP Instance list” and click the “Configure” button.2. • KX_LICENSE_ERROR event which contains PBX information (e.2.6. 3. 1. PBX IP address and PBX Name) is sent for PBX that does not have activation key (KX-NCS3930). The installer only performs extraction of C# SDK files on a selected folder.g.18 How can I uninstall C# SDK? 6. Select “Link Parameters” to trace the IP address of the PBX which failed during initialization. Go to “TSP Installed Path ® MultiPBX Configuration”. Any PBX connection error is notified through this event. If you did not receive an SMDR related event.2. this might be because the SYSTEM line has been closed.18 How can I uninstall C# SDK? No uninstallation is needed for C# SDK. 6. 6. You may delete the files if it is not in use. SMDR related event is generated for SYSTEM line whenever a CO call ended. 6. • KX_INIT_ERROR event with provider name of PBX is sent if C# SDK library failed during initialization.16 Why I did not receive any notification in an SMDR related event after SetSMDROn? Basically after SetSMDROn.2. You can trace the PBX information using the following steps.2.14 How do I know which PBX is returning errors during SDK initialization? You have to subscribe KXMessageEvent before initializing SDK.2. 86 C# SDK Developer’s Guide . 6. 2.17 Can I install more than one instance of C# SDK in the same PC? Yes.15 What are those APIs which need to execute on an opened line? Basically all APIs which required LineID or SystemLineID as a parameter need an opened line except LineOpen and GetLineInfo. Another TAPI application had monitored the line. Proper connection between TSP and PBX 2. Ensure no other TAPI application is running on the same PC. Heavy traffic for PBX KX_INVALLINEID 1. 2. KX_NOPROVIDER KX_SDKNOTINIT KX_FAILEDREINIT No Panasonic 3rd Party TSP is registered to TAPI. 2. If reinitialize is needed. shutdown C# SDK library before reinitializing. Initialize C# SDK library. C# SDK library is not initialized. C# SDK library is not owner of the specified call. Ensure the parameter is valid and within the range. Reinitialization of C# SDK library is forbidden.7 C# SDK Error Troubleshooting This section lists possible causes for C# SDK errors and solutions. 2. Error KX_NOLINE Possible Cause No Panasonic line is available. LAN connection disconnected. Activation key for Third Party CTI is installed on PBX. Solution 1. KX_INVALCALLSTATE KX_INVALPARAM The call is not in a valid state for requested operation. Problem on Telephony service 3. C# SDK library had been initialized. KX_REINIT 1. Make sure Line ID is valid. 2. Restart windows telephony service. 1. KX_REQUESTTIMEOUT PBX is in heavy traffic and failed to respond within time limit for the specified API execution. Retry API execution. Check if specific API needs an opened line. Ensure no other TAPI application is running on the same PC. Register Panasonic 3rd Party TSP with TAPI. Ensure the call is in required state before calling the API. Specified line is not opened. Some parameter is out of bounds or not valid for the specific API. 1. KX_NOTOWNER KX_INUSE C# SDK Developer’s Guide 87 . Line ID is not valid. .. 2010 PNQX2715YA KK1109MH1010 ..Copyright: This material is copyrighted by Panasonic System Networks Co. is prohibited without the written consent of Panasonic System Networks Co. and may be reproduced for internal use only. Ltd. in whole or in part.. All other reproduction. © Panasonic System Networks Co. Ltd. Ltd.
Copyright © 2024 DOKUMEN.SITE Inc.