Home
MaxAgent ActiveX Programmer`s Guide
Contents
1. ALTIGEN COMMUNICATIONS MaxAgent ActiveX Programmer s Guide This document provides instructions on configuring and using ActiveX controls with MaxA gent API reference information is also provided Contents Using a MaxAgent ActiveX Control Object ccc cc ec ccc cece ee cece e teense 2 Understanding Key Piles ii A GE De ISS Sie setae bea 2 Basic Procedure to Use an ActiveX Object with MaxAgent 0 0 0 cee eee 2 Using AppWizard to Create a Project 0 cece cette teen ees 3 Inserting AltiCtrl into dialog 2 1 cent nen ete eee enes 3 Handle Altieri Events 3 esac nga es aa 3 AltiCtrl Methods 5c 5 eee edie eee as Bh ete ad 3 MaxAgent ActiveX Control API Reference 0 ccc cece cece cere cece eeeees 4 StartAlt Girls edt a ake oe tale eo Maeda ce Mie tk 28 4 AluCtriE vent 222 2 de e o ld ea 4 A A A A A aie dd ed le 4 Ati Ctrl WICC OOS ie a ot 04a A loam ahs Sous Ube elevated Sits lets cians lante 7 SetUserData i it je dace tle eth A a Neb id ote lesa Wied ea ile 7 GetUserDalainc cnet A i Oe eae ee hd DR ee te a age ORNS 7 SCUV RD ata soe A ce hanes oes eae hire eda een Ske ae tae a Oe AEN 8 G l VR Dala 3 ob Sie A ei ae 9 SURE Dat tle tte Sol at slob dt lina 10 GetURL Data ici A ere ite oie Che ta ie A ea eee ia 10 SetCallerName escola est eet tote Aes ok ote haa ct Sat eS oot eno BNL e Saas ot 11 GetEXtNum ber 2 o S34 ei esnace A A SE O A 12 MakeGall cta a de led e el he
2. dialog box appears set CAItiCtrl as the class name and click OK MaxAgent ActiveX Programmer s Guide 3 5 Inthe 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 MaxAgent ActiveX Control API Reference StartAltiCtrl 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 MaxAgent successfully otherwise FALSE Remark This function is the key of using AltiCtrl Client cannot call the method or get any event from MaxAgent 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 MaxCommunicator MaxA gent receives a call event from AltiServ and AltiCtrl sends the event to your application each call will have a unique session ID and 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 4 MaxAgent ActiveX Programmer s Guide Parameters ulSessionID Session ID uStatus Call Status
3. szCallerID Caller ID szCallerName Caller Name szCallDNIS DNIS pszDateTime Call start date and time pszDuration Conversation duration MaxAgent 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 PLAYVOICEMAIL 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 ON Dn FB WN KF O UU UY UY UY N NY NY NY NY NN NY NY NY DN FPR eRe ee Re Ree Ww N FEF OO ONDA FW DN DO WON DA FW DN KF O MaxAgent ActiveX Programmer s Guide AltiCtrl Methods SetUserData Description Set user data for existing call User data is used for MaxA gent to describe a call information for example This call is urgent and so on It can be any information defined by use
4. VC Syntax BSTR GetExtNumber VB Syntax object GetExtNumber Return type String extension number for the MaxAgent login is 256 bytes VC Example CComBSTR bstrData m_altictrl GetExtNumb VB Example Dim data as String data AltiCtrll GetExtNumber MakeCall Description Make a call through MaxAgent VC Syntax long MakeCall BSTR bstrDialNumber VB Syntax object MakeCall string Parameters bstrDialNumber In Destination telephon data False Then er number less than 32 digits Return type 0 Make call command is sent successfully 12 MaxAgent ActiveX Programmer s Guide 1 Unknown error occurs 2 Disconnect MaxA gent 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 AltiCtrl1l1 MakeCall dirNum GetTrunkAccessCode Description Get default trunk access code set in MaxA gent VC Syntax BSTR GetTrunkAccessCode VB Syntax object GetTrunkAccessCode Return type Default trunk access code set in MaxAgent VC Example CComBSTR bstrTrunkAccess m altictrl GetTrunkAccessCode VB Example Dim data As String data AltiCtrll 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 VB Sample AltiCtrll Visi
5. ble TRUI Gl x Gl DropCall Description Drops the current call MaxAgent ActiveX Programmer s Guide 13 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 AltiCtr11 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 AltiCtrl11 SetBk 128 101 122 14 MaxAgent ActiveX Programmer s Guide
6. e Basic Procedure to Use an ActiveX Object with MaxAgent To use ActiveX control object with MaxA gent 1 Make sure MaxA gent is installed on the client desktop PC 2 Copy AltiCtrl ocx file from the MaxA gent API directory to the Windows system32 directory 3 Bring up the command prompt and register altictrl ocx Microsoft Windows 2000 Version 5 00 2195 g C Copyright 1985 2000 Microsoft Corp C gt ed winnt C WINNT gt cd system32 C WINNT system32 gt regsur32 altictrl ocx C WINNT system32 gt 4 Edit VB or VC sample code to interface with destination client application 5 Compile customized code to an executable file 6 Copy that executable file to the same directory as MaxAgent 2 MaxAgent ActiveX Programmer s Guide Using AppWizard to Create a Project Use AppWizard to create a dialog based MFC project 1 Choose MFC App Wizard 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 Sh Ge BS 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 In
7. his 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 GetIVRData ulSessionID VB Example Dim data As String Data AltiCtr11 GetIVRData ulSessionID MaxAgent 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 10 MaxAgent ActiveX Programmer s Guide VB Syntax objec
8. nID SetIVRData Description Set IVR data for existing call used only in Web call VR 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 SetIVRData 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 8 MaxAgent ActiveX Programmer s Guide 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 GetlVRData 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 T
9. r VC Syntax BOOL SetUserData int SessionID BSTR string VB Syntax 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 MaxAgent ActiveX Programmer s Guide 7 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 AltiCtrl11 GetUserData ulSessio
10. sert ActiveX Control dialog box Select AltiCtrl Control and click OK to add it Ge NS Place the control 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 AltiCtrl 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 5 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
11. t GetURLData SessionID 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 MaxAgent ActiveX Programmer s Guide 11 VB Example Dim data As String Data Tom If AltiCtr11 SetCallerName ulSessionID Else End If GetExtNumber Description Get extension number which MaxA gent had been logged in
12. ted ld do 12 GetTruikAccess Code A nee Cains ah ee eee ee Re 13 Related Documentation e MaxAgent Manual information on installation and configuration of the MaxA gent client system software August 2011 MaxAgent ActiveX Programmer s Guide 1 Using a MaxAgent ActiveX Control Object The MaxA gent ActiveX Control Object is an ActiveX Object It will work with MaxA gent getting call related information from MaxA gent 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 MaxA gent ActiveX Control Object files and type library followed by examples in VC and VB Understanding Key Files 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 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 MaxA gent AltiCtrl to develop your application you need to register AltiCtrl ocx using RegSvr32 exe first Because this object will work with MaxA gent you need to run a MaxA gent client when you develop and run your application on the same machin
Download Pdf Manuals
Related Search
Related Contents
HP COMPAQ 377703-001 User's Manual Samsung 400UXN User Manual Grizzly G0664 Saw User Manual 取扱説明書 Unicol VSS1800SC flat panel floorstand Arat NS1234 holder Copyright © All rights reserved.
Failed to retrieve file