Home

AltiAgent ActiveX Programmer`s Guide

image

Contents

1. ALTIGEN COMMUNICATIONS AltiAgent ActiveX Programmer s Guide This document provides instructions on configuring and using ActiveX controls with AltiAgent API reference information is also provided Contents Using an AltiAgent ActiveX Control Object 0 cc cece cece eee cece eee enes 2 Understanding Key Piles ii EI MEM SPARE eae a RR AE AE 2 Basic Procedure to Use an ActiveX Object with AltiAgent oo 2 Using AppWizard to Create a Project 2 eee 3 Inserting AltiCtrl into dialog 0 cece teen ene ae 3 Handl AliCttl Events e AA SRA Ee E EE 3 AlCl Method Sii tee ERAN reet EE ENEE 3 AltiAgent ActiveX Control API Reference o ooooocooocmoocroocorcrorroorocmmomoos 4 StartAlOCteh 50208 serene EE 4 AlCl Event eebe coon de i r ie Re e ba Aah Renee delt rie 4 CallNot Y 00 34224 ida Eege RAS Na ws Hea eile ee a a ee eke 4 AltiCtrl Methods oasis g e dais Fae ee ia WS alate eed wid ned ota ad Ee ug 7 SetUserDala EE EE EH H GetUserD ata it A DEENEN Ee CH 7 SE RDA AAA A A A AA 8 GetlV R Data tai a da aa 9 SetURL Data gees it ate ke fel ee eg tr paula es wi bala os eh 10 Geh ENEE EEN E EELER O Da 10 SetCallerName ia o a EE 11 GetEXtNUMBE Rs Eege deeg 6 hates de 12 MakeGalll as wh Be ott el ee te oh Ale eat see fa oak eg Be hed 12 GetTrinkA ccessCod Are hain Ta Ee wie wa hfe ee Oy EK ee as 13 Related Documentation e AltiGen AltiA gent Manual information on installation and configuration of the AltiA
2. 2 Copy AltiCtrl ocx file from the AltiAgent API directory to the Windows system32 directory 3 Bring up the command prompt and register altictrl ocx Microsoft Windows 2000 Version 5 00 2195 i C Copyright 1985 2000 Microsoft Corp C gt ed winnt C WINNT gt cd system32 C WINNT system32 gt regsur32 altictrl ocx iC WINNT system32 gt i i DiRegsterserver pro succeeded y 4 Edit VB or VC sample code to interface with destination client application Compile customized code to an executable file 6 Copy that executable file to the same directory as AltiAgent AltiAgent ActiveX Programmer s Guide 3 Using AppWizard to Create a Project Use AppWizard to create a dialog based MFC project 1 Choose MFC AppWizard exe and create a new win32 project named ExampleVc press Next Set Dialog based as the type of the Application press Next Keep ActiveX Control and Windows Sockets checkboxes checked The program uses shared MFC DLLs AltiCtrl uses shared MFC DLLs EN ve e Fa Click Finished to create the project Inserting AltiCtrl into dialog AltiCtrl is an ActiveX Control without any GUI It is invisible and can be inserted anywhere 1 Open the main dialog IDD_EXAMPLEVC_DIALOG Right click the dialog and a context menu will display Choose Insert ActiveX Control to display the Insert ActiveX Control dialog box Select AltiCtrl Control and click OK to add it SAS gt 0 DA Place the control
3. 5 In the Add Member Variable dialog create a member variable named m_altictrl 6 Click OK to add it to the class m_altictrl is now a member of CAItiCtrl Now VC has created a member in class CExampleVcDlg which can be used as a general object AltiAgent ActiveX Control API Reference StartA ItiC trl Description Start AltiCtrl on the client This is the first step to use this AltiCtrl VC Syntax BOOL StartAltiCtrl VB Syntax object StartAltiCtrl Return type BOOL TRUE if connect to AltiAgent successfully otherwise FALSE Remark This function is the key of using AltiCtrl Client cannot call the method or get any event from AltiAgent if this function call fails VC Example BOOL bstart m_altictrl StartAltiCtrl VB Example Dim bstart as bool bstart AltiCtrll StartAltiCtrl AltiCtrl Event CallNotify Description When AltiView AltiAgent 5 0 receives a call event from AltiServ AltiCtrl will send the event to your application each call will have an unique session ID each call may several events with its unique session ID Syntax OnCallNotifyXXXXX long ulSessionID short uStatus BSTR szCallerID BSTR szCallerName BSTR szCallDNIS BSTR szWorkgroup BSTR pszDateTime BSTR pszDuration AltiAgent ActiveX Programmer s Guide 5 Parameters ulSessionID Session ID uStatus Call Status szCallerID Caller ID szCallerName Caller Name szCallDNIS DNIS pszDateTime Call start date
4. at a suitable location and size it as desired Please note that the control is invisible at runtime 6 Identify the control as IDC_ALTICTRLCTRL1 default value Handle AltiC tri Events To add an event process function 1 Open Class Wizard and go to Message Maps page 2 Set CExampleVcDlg as current class 3 Set IDC_ALTICTRLCTRL1 as current selection of Object Ids list box and all AltiCtrl Events will be displayed in Message list box 4 Add member functions for the events you would like to handle Add code for these member functions AltiCtrl Methods When adding a function to handle an AltiCtrl Event you don t need to worry about how and when the function is called AltiCtrl will perform the event call back for you When using the AltiCtrl properties of getting and setting methods you can use AltiCtrl to set or monitor a Call property Before doing so you must add a member variable associated with this control To add a member variable associated with this control 1 Open Class Wizard and go to Member Variables page 2 Set CExampleVcDlg as current class 3 Double click IDC_ALTICTRLCTRL1 of Control Ids list box and a message box will be displayed to prompt you to add the ActiveX Control AltiCtrl into the project Click OK to have Developer Studio generate a C wrapper class 4 When the Confirm Classes dialog box appears set CAItiCtrl as the class name and click OK 4 AltiAgent ActiveX Programmer s Guide
5. VB Sample AltiCtrll Visible TRUI Gl DropCall Description Drops the current call 14 AltiAgent ActiveX Programmer s Guide VC Syntax long DropCall VB Syntax long DropCall Return type O Drop call command is sent successfully l 0 Unknown error occurs VC Example long result m_altictrl DropCall VB Example Dim data As Long data AltiCtrl1 DropCall SetBK Description Sets the background color of AltiCtrl VC Syntax long SetBk short sRed short sGreen short sBlue VB Syntax long SetBk short sRed short sGreen short sBlue Parameters sRed in RGB s red value of the background color of AltiCtrl sGreen in RGB s green value of the background color of AltiCtrl sBlue in RGB s blue value of the background color of AltiCtrl VC Example m_altictrl SetBk 128 101 122 VB Example AltiCtrll SetBk 128 101 122
6. and time pszDuration Conversation duration 6 AltiAgent ActiveX Programmer s Guide Remark Call status value LINECALLSTATE_IDLE LINECALLSTATE_OFFERING LINECALLSTATE_ACCEPTED LINECALLSTATE_DIALTONE LINECALLSTATE_DIALING LINECALLSTATE_RINGBACK LINECALLSTATE_BUSY LINECALLSTATE_SPECIALINFO LINECALLSTATE_CONNECTED LINECALLSTATE_PROCEEDING LINECALLSTATE_ONHOLD LINECALLSTATE_CONFERENCED LINECALLSTATE_ONHOLDPENDCONF LINECALLSTATE_ONHOLDPENDTRANSFER LINECALLSTATE_DISCONNECTED LINECALLSTATE_AA LINECALLSTATE_VM LINECALLSTATE_PARK LINECALLSTATE_UNKNOWN LINECALLSTATE_MUSICONHOLD LINECALLSTATE_PLAY VOICEMAIL LINECALLSTATE_CALLPENDING LINECALLSTATE_MONITORSIRENT LINECALLSTATE_CALLBARGEIN LINECALLSTATE_XFER_RINGBACK LINECALLSTATE_XFER_WAITFORONHOOK LINECALLSTATE_DUMMYRING LINECALLSTATE_FORWARDRING LINECALLSTATE_DATALOAD LINECALLSTATE_RECORD LINECALLSTATE_APC LINECALLSTATE_SUPERVISE_COACH LINECALLSTATE_LINE_PARK LINECALLSTATE_RMT_OFFLINE VD 0 Jl nun FW H KF CO U U UU UU N NY N VN NY NY N NY NY N e ra Fa Fa a Fa Fa Fa a LA H rz O O GJ Ch Lu E D H rz DOU AN DN FW H KF Oo AltiAgent ActiveX Programmer s Guide 7 AltiCtrl Methods SetUserData Description Set user data for existing call User data is used for AltiAgent to describe a call information for example This call is urgent and so on It can be any information defined by user VC Syntax BOOL SetUserData int SessionID BSTR string VB Sy
7. d connect event After Disconnect event it is no longer valid VC Example CComBSTR bstrData bstrData m_altictrl GetIVRData ulSessionID VB Example Dim data As String Data AltiCtr11 GetIVRData ulSessionID 10 AltiAgent ActiveX Programmer s Guide SetURLData Description Set URL data for existing call used only in Web call When a call comes to a Web site it can contain URL data such as http www altigen com so that the user application can know where this call comes from Note SetURLData is a reserved API VC Syntax BOOL SetURLData int SessionID BSTR string VB Syntax object SetURLData SessionID string Parameters SessionID In unique ID for a call String In Set URL data for a call maximum length is 256 bytes Return Type BOOL if successful TRUE otherwise FALSE Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event and connect event After Disconnect event it is no longer valid VC Example CComBSTR bstrData _T url data m_altictrl SetURLData ulSessionID bstrData VB Example Dim data As String Data url data If AltiCtrll SetURLData ulSessionID data False Then Else End If GetURLData Description Get URL data for existing call VC Syntax BSTR GetURLData int SessionID AltiAgent ActiveX Programmer s Guide 11 VB Syntax object GetURLData S
8. essionID Parameters SessionID In unique ID for a call Return Type String URL data for a call maximum length is 256 bytes Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event and connect event After Disconnect event it is no longer valid VC Example CComBSTR bstrData bstrData m_altictrl GetURLData ulSessionID VB Example Dim data As String Data AltiCtr11 GetURLData ulSessionID SetCallerName Description Set Caller Name for existing call VC Syntax BOOL SetCallerName int SessionID BSTR string VB Syntax object SetCallerNameData SessionID string Parameters SessionID In unique ID for a call String In Set URL data for a call max length is 256 bytes Return type BOOL The value is TRUE if successful otherwise FALSE Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event and connect event While after Disconnect event it is no longer valid VC Example CComBSTR bstrName _T Tom m_altictrl SetCallerName ulSessionID bstrName 12 AltiAgent ActiveX Programmer s Guide VB Example Dim data As String Data Tom Tf AltiCtrll SetCallerName ulSessionID data False Then Else End If GetE xtNumber Description Get extension number which AltiAgent had been logged i
9. gent client system software 02 2008 2 AltiAgent ActiveX Programmer s Guide Using an AltiAgent ActiveX Control Object The AltiAgent ActiveX Control Object is an ActiveX Object It will work with AltiAgent getting call related information from AltiAgent which acts as a server and implement actions based on the call information for example popping up corresponding customer information and logging caller ID into a database This document contains descriptions of AltiAgent ActiveX Control Object files and type library followed by examples in VC and VB Understanding Key Files e AltiCtrl tlb this type library file contains functions within the AltiCtrl ActiveX Object Methods contained in this type library need to be used directly by Visual C developers In Visual Basic type library functions are handled automatically at run time e AltiCtrl ocx third party applications use this ActiveX control module to develop applications It needs to be registered before starting application development Note Before using AltiAgent AltiCtrl to develop your application you need to register AltiCtrl ocx using RegSvr32 exe first Because this object will work with AltiAgent you need to run an AltiAgent client when you develop and run your application on the same machine Basic Procedure to Use an ActiveX Object with AltiAgent To use ActiveX control object with AltiAgent 1 Make sure AltiAgent is installed on the client desktop PC
10. n VC Syntax BSTR Get VB Syntax object GetExtNumber Return type String extension number for the AltiA gent login is 256 bytes E xtNumber VC Example CComBSTR bstrData m_altictrl GetExtNumber VB Example Dim data as String data AltiCtrl11 GetExtNumber MakeCall Description Make a call through AltiAgent VC Syntax long MakeCall BSTR bstrDialNumber VB Syntax object MakeCall string Parameters bstrDialNumber In Destination telephone number less than 32 digits Return type 0 Make call command is sent successfully AltiAgent ActiveX Programmer s Guide 13 1 Unknown error occurs 2 Disconnect AltiAgent 999 Exception occurred VC Example BOOL bstart m_altictrl MakeCall L 101 VB Example Dim Result as Integer Dim dirNum As String dirNum 101 Result AltiCtrl1 MakeCall dirNum GetTrunkAccessCode Description Get default trunk access code set in AltiAgent VC Syntax BSTR GetTrunkAccessCode VB Syntax object GetTrunkAccessCode Return type Default trunk access code set in AltiAgent VC Example CComBSTR bstrTrunkAccess m_altictrl GetTrunkAccessCode VB Example Dim data As String data AltiCtrl11 GetIVRData ulSessionID Note The ctrl will show a window in the client application To hide the window use the following code VC Example m_altictrl ShowWindow SW_HID Ed
11. ntax object SetUserData SessionID string Parameters SessionID In unique ID for a call String In set user data for a call maximum length is 256 bytes It is only used for trunk line calls Return Type BOOL if successful TRUE otherwise FALSE Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event and connect event After Disconnect event it is no longer valid VC Example CComBSTR bstrdata _T user data m_altictrl SetUserData ulSessionID bstrData VB Example Dim data As String Data user data If AltiCtrll SetUserData ulSessionID data False Then Else End If GetUserData Description Get user data for existing call VC Syntax BSTR GetUserData int SessionID 8 AltiAgent ActiveX Programmer s Guide VB Syntax object GetUserData SessionID Parameters SessionID In unique ID for a call Return Type String user data for a call maximum length is 256 bytes Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event and connect event After Disconnect event it is no longer valid VC Example CComBSTR bstrData bstrData m_altictrl GetUserData ulSessionID VB Example Dim data As String Data AltiCtr11 GetUserData ulSessionID SetiVR Data Description Set IVR data fo
12. r existing call used only in Web call IVR data is the format of name value pairs which can be used in Web Call and Auto Atendant for example FirstName John amp LastName Anny amp Password hello1234 and so on Note SetI VRData is a reserved API VC Syntax BOOL SetIVRData int SessionID BSTR string VB Syntax object SetIVRData SessionID string Parameters SessionID In unique ID for a call String In Set IVR data for a call maximum length is 256 bytes Return Type BOOL if successful TRUE otherwise FALSE Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event and connect event After Disconnect event it is no longer valid AltiAgent ActiveX Programmer s Guide 9 VC Example CComBSTR bstrData _T ivr data m_altictrl SetURLData ulSessionID bstrdata VB Example Dim data As String Data ivr data If AltiCtrll SetURLData ulSessionID data False Then Else End If GetiVR Data Description Get IVR data for existing call VC Syntax BSTR GetIVRData int SessionID VB Syntax object GetIVRData SessionID Parameters SessionID In unique ID for a call Return Type String IVR data for a call maximum length is 256 bytes Remark SessionID Session ID received from OnCallNotify event needs to be provided as input to this function This Session ID is valid in ring event an

Download Pdf Manuals

image

Related Search

Related Contents

EXECUTORY DECREE No.1 TO THE RULES OF OPERATION  Aiphone PS-12C User's Manual    Zanussi ZT 102 Instruction Manual  1 COOLINSIDE Modelos: DUAL, COAG  Manual DM TEKA.qxd  

Copyright © All rights reserved.
Failed to retrieve file