Professional Documents
Culture Documents
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.
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.
Table of Contents
Table of Contents
1 Preface ......................................................................................................6
1.1 1.2 Reference ...........................................................................................................................6 Definitions, Acronyms, and Terminology .......................................................................6
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
Table of Contents
5.2.3.1 ExtensionLine Constructor ..........................................................................................66 5.2.3.2 Open ............................................................................................................................66 5.2.3.3 Close ...........................................................................................................................67 5.2.3.4 Button Press ................................................................................................................67 5.2.3.5 Set Ringer ....................................................................................................................68 5.2.3.6 Set Display ..................................................................................................................68 5.2.3.7 Clear Display ...............................................................................................................69 5.2.3.8 Terminate Display ........................................................................................................69 5.3 SMDR Sample ..................................................................................................................70 5.3.1 Test Procedures .............................................................................................................71 5.3.2 FormSMDR Class ..........................................................................................................72 5.3.2.1 FormSMDR Constructor ..............................................................................................74 5.3.2.2 Shutdown When Form Closing ....................................................................................75 5.3.2.3 Respond to SMDR ON Button Clicked ........................................................................75 5.3.2.4 Respond to SMDR OFF Button Clicked ......................................................................76 5.3.2.5 Respond to Button Get SMDR Information Click .........................................................76 5.3.2.6 C# SDK Events ............................................................................................................77 5.3.2.7 Respond to KX_SMDR_CREATE event .....................................................................78 5.3.2.8 Respond to KX_SMDR_DELETE event ......................................................................78 5.3.3 SystemLine Class ...........................................................................................................79 5.3.3.1 SystemLine Constructor ..............................................................................................79 5.3.3.2 SMDR ON ....................................................................................................................80 5.3.3.3 SMDR OFF ..................................................................................................................80 5.3.3.4 Get SMDR ...................................................................................................................81
1 Preface
1.1 Reference
1. C# SDK Library API Reference Manual 2. Panasonic KX-TDA TAPI Specification Version 3.3 3. TAPI reference from MSDN 2009
2 Introduction to C# SDK
C# SDK library is a DLL composed by C# class library and is a wrapper class located on TAPI. C# SDK provides a simple and easy-to-use programming interface. To use C# SDK library, Panasonic TAPI Service Provider (Panasonic 3rd Party TSP) is required. 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
Panasonic PBX
Note
C# SDK library assumes that no other TAPI application is running on the same PC. 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. Obtain Panasonic 3rd Party TSP from sales companies or dealers distributing C# SDK.
3 Installing C# SDK
3.1 System Requirements
3.1.1 Required Operating System
Panasonic C# SDK version 1.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)
10
3. Select I accept the terms of the license agreement and then click Next to continue installation after
reading the agreement. Click Cancel to abort installation. Click Back to go back to the previous step.
4. Click Next to continue installation with default installation path. Click Cancel to abort installation.
Click Back to go back to the previous step.
11
The default installation path is the setup file location. Click Change and then select desired installation path from the following dialog.
5. Click Install to start installation. Click Cancel to abort installation. Click Back to go back to the previous
step.
12
13
14
4.3.2 Shutdown
4.3.2 Shutdown
To shutdown the C# SDK library:
15
4.4.2 LineClose
4.4.2 LineClose
LineClose is used to stop monitoring a line device.
16
17
4.5.2.2 GetLineInfo
GetLineInfo is used to get line information for a specified line in the system. This method is used to update line information. For details of V_LINEINFO, please refer to C# SDK Library API Reference Manual.
4.5.2.3 GetLineStatus
GetLineStatus is used to get current line status of a line device. This method returns an enumeration, E_LINESTATUS. For monitored line, C# SDK library returns KX_INS or KX_OUS depending on current status of the line. For non-monitored line, C# SDK library returns KX_UNKNOWN.
18
19
20
21
22
23
24
25
26
27
The following are the methods for handling each event according to categories.
28
4.9.1.2 KX_CALLSTATE
KX_CALLSTATE is sent when the state of the specified call has changed. For details of E_LINECALLSTATE, please refer to C# SDK Library API Reference Manual.
4.9.1.3 KX_CALLINFO
KX_CALLINFO is sent when call information about the specified call has changed. For details of V_EVENTCALLINFO, please refer to C# SDK Library API Reference Manual.
29
30
4.9.3.2 KX_SMDR_DELETE
KX_SMDR_DELETE is sent to report that call accounting information is deleted from call account information buffers.
31
4.9.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
4.9.4.3 KX_RECONFIG
KX_RECONFIG is sent when the PBX setting is changed.
33
4.9.5.2 KX_LICENSE_ERROR
KX_LICENSE_ERROR is sent when PBX does not contain an activation key (KX-NCS3930).
34
35
36
37
38
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
39
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.
40
41
42
43
44
45
46
The following figure shows the information dialog for KX_DEVSTATE event:
The following figure shows the error dialog for KX_INIT_ERROR event:
47
The following figure shows the error dialog for KX_LICENSE_ERROR event:
48
The following figure shows the information dialog for KX_REINIT event:
49
The following figure shows the information dialog for KX_RETRIEVE event:
50
51
5.1.3.2 Open
Open method is invoked when the Open button is clicked. This method responsible to call LineOpen to start monitors a line device. Local member bIsLineOpen is set to true if LineOpen succeeds and line information is updated. The following is the code written for Open method:
52
5.1.3.3 Close
Close method is invoked when the Open button is clicked. Method btnMonitor_Click will check whether any line is opened before opening a line. If call control sample is currently opening a line, Close method is invoked to close the line. The following is the code written for Close method:
53
54
55
56
The following are the test procedures: 1. When the Phone Control Sample application started, the first extension line on the list is monitored. In case the user wants to switch to another extension line, select desired extension line and click the Open button to monitor the selected line. 2. Click on radio button in the Ringer Status group box, ringer status is set for the monitored line. 3. Enter row, column and message into text box in the Display group box and then click Set button to set phone display. 4. Click on Clear to clear the display and Terminate to terminate the control to phone display. 5. Click on any key in the Key Pad group box to simulate a button press on a monitored extension line.
57
58
59
60
When application start, MonitorLine member is initialized as an ExtensionLine object. ExtensionLine is a class defined to handle line information and phone control functions. Details for this class will be discussed later in this document.
61
62
63
64
65
5.2.3.2 Open
Open method is invoked when the Open button is clicked. This method will call LineOpen to start monitoring a line device. Local member bIsLineOpen is set to true if LineOpen succeeded. The following is the code written for Open method:
66
5.2.3.3 Close
Close method is invoked when the Open button is clicked. Method btnMonitor_Click will check whether any line is opened before opening a line. If phone control sample is currently opening a line, Close method is invoked to close the line. The following is the code written for Close method:
67
68
69
70
The following are the test procedures: 1. When SMDR application is started, all the SYSTEM lines in the list are monitored. 2. Select a SYSTEM line and click the ON button in the Control group box, call accounting information is enabled for that selected SYSTEM line. 3. Make a CO call for that PBX and KX_SMDR_CREATE event is received once the call ends. 4. Enter the call accounting information ID into the Information ID text box and click Get Info button. Account information is updated. 5. Click the OFF button in the Control group box to disable call accounting information. Note In the above figure, two PBX are connected. One is Line ID of SYSTEM line 7, the other is Line ID of SYSTEM line 389.
71
72
73
All SYSTEM lines are monitored by default during C# SDK library initialization. AddSystemLine method is used to update user interface with available SYSTEM lines only.
74
75
76
Description for KX_INIT_ERROR and KX_LICENSE_ERROR event handling, please refer to Call Control Sample section.
77
78
79
5.3.3.2 SMDR ON
SMDRON method is invoked to enable call accounting information notification. Local member bIsSMDRON is set to true if API call succeeds. The following is the code written for SMDRON method:
80
81
PBX combo box is used to select an interested instance to verify connection. Connection may be: Now Connection TSP instance is initializing connection with PBX. Connected TSP instance is connected with PBX. It is possible to control/monitor with TAPI application(s). Disconnected TSP instance is not communicating with PBX. Not Registered with TAPI TSP instance is not registered in TAPI (Telephony System).
82
If TSP loses connection with PBX, KX_REINIT event is sent and TSP will try to recover the connection. TSP may fail recovery in some case (e.g. When PBX setting changed between KX_REINIT and KX_RETRIEVE. etc). Call event is not notified while TSP sends KX_REINIT event.
83
6.2.3 How do I obtain an activation key for a Third Party CTI (KX-NCS3930)?
Please contact Panasonic Sales Company.
6.2.4 How do I install an activation key for a Third Party CTI (KX-NCS3930)?
Please contact Panasonic Sales Company.
84
6.2.10 How do I find the voice mail group number in order to use SetTwoWayRecording?
For voice mail group number setting, please refer to your PBXs PC Programming Manual.
6.2.11 Why does my application not receive any events from SDK?
A possible cause is KXMessageEvent is not subscribed.
85
6.2.14 How do I know which PBX is returning errors during SDK initialization?
You have to subscribe KXMessageEvent before initializing SDK. Any PBX connection error is notified through this event. KX_LICENSE_ERROR event which contains PBX information (e.g. PBX IP address and PBX Name) is sent for PBX that does not have activation key (KX-NCS3930). KX_INIT_ERROR event with provider name of PBX is sent if C# SDK library failed during initialization. You can trace the PBX information using the following steps. 1. Go to TSP Installed Path MultiPBX Configuration. 2. Select the provider name of PBX provided in KX_INIT_ERROR from TSP Instance list and click the Configure button. 3. Select Link Parameters to trace the IP address of the PBX which failed during initialization.
6.2.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.
6.2.16 Why I did not receive any notification in an SMDR related event after SetSMDROn?
Basically after SetSMDROn, SMDR related event is generated for SYSTEM line whenever a CO call ended. If you did not receive an SMDR related event, this might be because the SYSTEM line has been closed.
6.2.17 Can I install more than one instance of C# SDK in the same PC?
Yes. The installer only performs extraction of C# SDK files on a selected folder.
86
1. Reinitialization of C# SDK
library is forbidden.
2. If reinitialize is needed,
shutdown C# SDK library before reinitializing. KX_REQUESTTIMEOUT PBX is in heavy traffic and failed to respond within time limit for the specified API execution. Retry API execution.
KX_REINIT
1. LAN connection
disconnected.
2. Problem on Telephony
service
KX_INVALCALLSTATE KX_INVALPARAM
The call is not in a valid state for requested operation. Some parameter is out of bounds or not valid for the specific API. C# SDK library is not owner of the specified call. Another TAPI application had monitored the line.
KX_NOTOWNER
KX_INUSE
87
Copyright: This material is copyrighted by Panasonic System Networks Co., Ltd., and may be reproduced for internal use only. All other reproduction, in whole or in part, is prohibited without the written consent of Panasonic System Networks Co., Ltd. Panasonic System Networks Co., Ltd. 2010
PNQX2715YA KK1109MH1010