Sie sind auf Seite 1von 93

uAgent OCX

Developer Series
Altitude uCI 7.1

Altitude Software
Tel. +351-21-4129800
Fax. +351-21-4129890
info@altitude.com
www.altitude.com

First released: 2003-11


Last revised: 2009-06
Published: 2010-03-31

Contents
uAgent OCX.....................................................................................................................7
How uAgent OCX works...................................................................................................................7
How to set up the uAgent OCX.........................................................................................................7
uAgent OCX return codes.................................................................................................................8
Arrays................................................................................................................................................8
Properties of uAgent OCX User Control...........................................................................................9
Properties of uAgent OCX Timer......................................................................................................9

New functionality...........................................................................................................11
New functionality in Altitude uCI 7.1.............................................................................................11
New functionality in Altitude uCI 6.2.............................................................................................12
New functionality in Altitude uCI 6.1.............................................................................................15
New functionality in Easyphone 5.1................................................................................................15

How to upgrade older programs..................................................................................17


Upgrading from Altitude uCI 6.2 to Altitude uCI 7.1.....................................................................17
Upgrading EpTalkControl from Altitude uCI 6.1 to Altitude uCI 6.2.............................................17
Upgrading EpTalkControl from Easyphone 5.1 to Altitude uCI 6.1...............................................18
Upgrading EpTalkControl from Easyphone 4.04 to Easyphone 5.1...............................................19

Main methods................................................................................................................20
global_dial.......................................................................................................................................20
login.................................................................................................................................................20
logout...............................................................................................................................................20
get_acd.............................................................................................................................................21
get_agent_info.................................................................................................................................21
get_user_id.......................................................................................................................................22
exit_talk...........................................................................................................................................23
get_default_extension......................................................................................................................23
get_login_name...............................................................................................................................23
get_full_name..................................................................................................................................23
get_extension...................................................................................................................................23
set_extension....................................................................................................................................24
get_password...................................................................................................................................24
change_password.............................................................................................................................24
get_callcenter_timezone..................................................................................................................24
get_not_ready_reasons....................................................................................................................25
get_last_error...................................................................................................................................25
get_session.......................................................................................................................................25
set_site.............................................................................................................................................26
get_site_info....................................................................................................................................26
release_session.................................................................................................................................26

Campaign methods........................................................................................................27
get_campaign_info..........................................................................................................................27
open_campaign................................................................................................................................27

2010-03-31

uAgent OCX

close_campaign...............................................................................................................................28
get_campaign_name........................................................................................................................28
get_campaigns.................................................................................................................................28
get_campaign_agents_list................................................................................................................29
get_from_field.................................................................................................................................30
is_phone_op_pending......................................................................................................................30
get_message_of_the_day.................................................................................................................30
set_not_ready...................................................................................................................................31
set_ready..........................................................................................................................................31
sign_off............................................................................................................................................31
sign_on.............................................................................................................................................31
start_session.....................................................................................................................................32

Telephony methods........................................................................................................33
answer..............................................................................................................................................33
blind_transfer...................................................................................................................................33
clear.................................................................................................................................................34
conference........................................................................................................................................34
extend...............................................................................................................................................34
dial...................................................................................................................................................35
get_blind_data.................................................................................................................................36
get_dnis............................................................................................................................................36
get_phone_number..........................................................................................................................36
get_phone_state...............................................................................................................................37
hangup.............................................................................................................................................37
hold..................................................................................................................................................37
retrieve.............................................................................................................................................38
supervisor_help................................................................................................................................38
transfer.............................................................................................................................................38
send_DTMF.....................................................................................................................................39
enqueue_call....................................................................................................................................39
dequeue_call....................................................................................................................................40
query_queue_position......................................................................................................................40
start_record......................................................................................................................................41
stop_record......................................................................................................................................41

Data interaction methods..............................................................................................42


answer_data_interaction..................................................................................................................42
get_data_interaction_state...............................................................................................................42
clear_data_interaction......................................................................................................................42
restart_data_transaction...................................................................................................................43
count_outgoing_mails_gui..............................................................................................................43
create_data_interaction....................................................................................................................43
destroy_data_interaction..................................................................................................................44
get_mails_in_queue.........................................................................................................................44
forward_gui.....................................................................................................................................44
pickup_mail.....................................................................................................................................45
query_email.....................................................................................................................................45

uAgent OCX

2010-03-31

query_email_document...................................................................................................................46
query_email_mime..........................................................................................................................46
get_bcc_field...................................................................................................................................47
get_cc_field.....................................................................................................................................47
get_subject_field..............................................................................................................................48
get_to_field......................................................................................................................................48
query_email_text_body...................................................................................................................48
query_email_attachments_info........................................................................................................49
store_email_mime...........................................................................................................................49
query_web.......................................................................................................................................50
reply_gui..........................................................................................................................................50
reply_all_gui....................................................................................................................................50
send_email_mime............................................................................................................................51
send_email_text...............................................................................................................................51
show_email_gui...............................................................................................................................52
edit_email_gui.................................................................................................................................52
open_browser_for_web_interaction_gui.........................................................................................53
remove_email..................................................................................................................................53
save_attachment...............................................................................................................................53

Data transaction methods.............................................................................................55


discard_data_transaction.................................................................................................................55
end_data_transaction.......................................................................................................................55
get_easy_code..................................................................................................................................56
get_preview_mode...........................................................................................................................56
get_timezone....................................................................................................................................56
in_node............................................................................................................................................57
load_contact.....................................................................................................................................57
new_call ..........................................................................................................................................58
new_contact.....................................................................................................................................58
reschedule_contact_with_failed_reason..........................................................................................59
select_contact...................................................................................................................................60
send_data.........................................................................................................................................60
set_call_type....................................................................................................................................60
set_timezone....................................................................................................................................61
start_script.......................................................................................................................................61

SQL methods.................................................................................................................62
cursor_close.....................................................................................................................................62
cursor_fetch.....................................................................................................................................62
cursor_nrows....................................................................................................................................62
cursor_open.....................................................................................................................................63
sql_execute......................................................................................................................................63
sql_select.........................................................................................................................................64

Can methods..................................................................................................................65
can_answer......................................................................................................................................65
can_answer_data_interaction...........................................................................................................65
can_blind_transfer...........................................................................................................................65

2010-03-31

uAgent OCX

can_clear..........................................................................................................................................66
can_clear_data_interaction..............................................................................................................66
can_conference................................................................................................................................66
can_dequeue_call.............................................................................................................................67
can_dial............................................................................................................................................67
can_discard_data_transaction..........................................................................................................67
can_end_data_transaction................................................................................................................68
can_enqueue_call.............................................................................................................................68
can_exit............................................................................................................................................68
can_extend.......................................................................................................................................68
can_get_campaigns..........................................................................................................................69
can_hangup......................................................................................................................................69
can_hold...........................................................................................................................................69
can_load_contact.............................................................................................................................70
can_login.........................................................................................................................................70
can_logout.......................................................................................................................................70
can_new_call...................................................................................................................................70
can_new_contact..............................................................................................................................71
can_retrieve......................................................................................................................................71
can_set_extension............................................................................................................................71
can_set_not_ready...........................................................................................................................72
can_set_ready..................................................................................................................................72
can_sign_off....................................................................................................................................72
can_sign_on.....................................................................................................................................73
can_start_record...............................................................................................................................73
can_start_script................................................................................................................................73
can_start_session.............................................................................................................................74
can_stop_record...............................................................................................................................74
can_supervisor_help........................................................................................................................74
can_transfer.....................................................................................................................................75

Events.............................................................................................................................76
CampaignActivated.........................................................................................................................76
CampaignAvailable..........................................................................................................................76
CampaignClosed..............................................................................................................................76
CampaignSuspended.......................................................................................................................77
CampaignUnavailable......................................................................................................................77
CampaignUnavailableSuspended....................................................................................................77
DataEvent........................................................................................................................................77
DataInteractionEvent.......................................................................................................................78
DataInteractionProgressEvent.........................................................................................................78
DataTransactionEnd........................................................................................................................79
ConnectionState...............................................................................................................................79
ExtensionCleared.............................................................................................................................80
FeatureInvoked................................................................................................................................80
FeatureProgress...............................................................................................................................80
PhoneEvent......................................................................................................................................81

uAgent OCX

2010-03-31

PhoneProgressEvent........................................................................................................................82
SendMailEvent................................................................................................................................83
SessionClearedEvent.......................................................................................................................83
SessionEvent....................................................................................................................................83
SessionPhoneEvent..........................................................................................................................85
UserMessage....................................................................................................................................85

uAgent OCX enumerated types...................................................................................86


OLE_AM_ERROR..........................................................................................................................86
OLE_COMMS_ERROR.................................................................................................................87
OLE_DB_ERROR...........................................................................................................................87
OLE_LC_ERROR...........................................................................................................................87
OLE_PBX_ERROR........................................................................................................................87
OLE_ETALK_ERROR....................................................................................................................89
OLE_RUNNER_ERROR................................................................................................................89

2010-03-31

uAgent OCX

uAgent OCX
uAgent OCX allows the user application to control the uAgent Windows functionality and hides the user application
from the complexity of managing sessions, campaigns, and other unnecessary details. uAgent OCX has the user
controls uAgent OCX and uAgent OCX Timer. uAgent OCX exports the functionality of the uAgent OLE Automation
server. uAgent OCX Timer allows you to access the telephony time of the active session. Agents can increase the
wrap-up time using uAgent OCX.
This document assumes technical knowledge of the following:

uAgent Windows
Visual Basic 6.0.

How uAgent OCX works


Recovery time
The recovery time defines the amount of time that the agent waits for uAgent OCX to recover the existing uAgent
Windows session. If the system crashes, uAgent OCX loses contact with the OLE Automation server, but the agent
is still logged in to the server.
The agent must execute a forced logout from uAgent OCX if there are any open sessions. After the agent logs out,
uAgent OCX stops responding to the ping requests of the Assisted Server. The server clears the state of the agent
and allows a new login operation after two minutes.
Campaigns without associated scripts
If a campaign does not have an associated script, you have access to the full functionality of uAgent OCX. However,
the following restrictions apply when you specify a script in the working campaign:

Data transaction operations are not available. The methods start_script (page 61),
end_data_transaction (page 55), and discard_data_transaction (page 55) return an error.
The operations set_timezone (page 61), get_timezone (page 56), get_easy_code (page 56),
select_contact (page 60), load_contact (page 57), new_call (page 58), new_contact (page 58),
and in_node (page 57) are not available and return an error.

uAgent OCX return codes


uAgent OCX asks the Assisted Server if the requested operation can be executed in that session. If the answer from
the Assisted Server is FALSE, the method returns ETALK_CAN_ERROR, avoiding more complex error messages.

How to set up the uAgent OCX


Install the Altitude Developer. Then, install the uAgent OCX. Drag the file uAgentOCX.ocx to the Visual Basic
toolbox.
Workstation requirements
The development workstation should have the following:

Windows operating system


uAgent Windows.

uAgent OCX

2010-03-31

Install the uAgent OCX


After installing the Altitude Developer, the setup of the uAgent OCX is typically located at C:\Program
Files\Altitude\Altitude uCI 7.1\Altitude Script Developer\project\uAgentOCX.
Run the setup to install the uAgent OCX, typically at C:\Program Files\uAgentOCX.
How to use the uAgent OCX
To use the uAgent OCX Control, you need to drag the file uAgentOCX.ocx to the Visual Basic toolbox to create
the controls uAgentOCXControl and uAgentOCXTimer. The file is typically located at C:\Program
Files\uAgentOCX\uAgentOCX.ocx.

uAgent OCX return codes


uAgent OCX asks the Assisted Server if the requested operation can be executed in that session. If the answer from
the Assisted Server is FALSE, the method returns ETALK_CAN_ERROR, avoiding more complex error messages.
All the functions of uAgent OCX return one of the elements of the enumerated type ACB_RETURN_CODE, as follows:
ETALK_OK

The operation succeeded.


ETALK_VB_ERROR

A run time error occurred.


ETALK_OLE_ERROR

An error occurred while connecting to the uAgent Windows Automation server.


ETALK_CAN_ERROR

The Assisted Server did not allow the operation.


ETALK_SET_EXT_ERROR

The method failed to set the extension of the agent.


ETALK_EXIT_ERROR

uAgent OCX failed to exit the uAgent Windows application.


ETALK_PRESENTATION_ERROR

The IPresentation object is missing.


ETALK_AGENT_ERROR

The IAgent object was not created or the agent is logged out.
ETALK_INCORRECT_CPG_ERROR

The name of the campaign is not valid or the campaign is not open.
ETALK_SESSION_ERROR

The parameter of the session is not valid. If the parameter is omitted, the session does not have telephony.
ETALK_CPG_ALREADY_OPEN_ERROR

The campaign was already open.

Arrays
The arrays of uAgent OCX must have the following properties:
Dimension
Dimension of the arrays. uAgent OCX uses two dimension arrays. Array indexes start at one.

2010-03-31

uAgent OCX

Output data
Arrays used to receive information. The arrays should be empty. uAgent OCX OLE server returns an error
message for filled arrays.
Attribute arrays record information. The methods end_data_transaction (page 55), new_contact (page
58), and load_contact (page 57) use the arrays. The contact and phone tables reflect the arrays of the attributes.

Properties of uAgent OCX User Control


To use uAgent OCX User Control, you need to drag the user control to your application. You must configure the
following properties in run time or in design time:
Logg As Boolean

If TRUE, generates basic log information.


error_logging As Boolean

If TRUE, adds error logs to the log file.


extra_logg As Boolean

If TRUE, generates extra log information.


message_logging As Boolean

If TRUE, displays uAgent OCX message windows.


filename As String

Asks for the path name of the uAgent OCX log file. If the path name is omitted, the property assumes the
default file name EpACBOcxLog.
talk_visible As Boolean

If TRUE, sets uAgent Windows visible on the workstation of the agent.


can_logg As Boolean

If TRUE, creates log files.


logg_fixed As Boolean

If FALSE, creates a new log file each time the program runs.
multilogin As Boolean

If TRUE, allows several agents to log in on the same computer.


server_instance As String

Mandatory. Assisted Server instance. For example, instance:1500 where instance is the host name of the
Assisted Server and 1500 is the port number of the instance.

Properties of uAgent OCX Timer


To use uAgent OCX Timer, you need to drag uAgent OCX Timer to your application. The functionality of uAgent
OCX Timer depends on uAgent OCX and should not be used without uAgent OCX. uAgent OCX controls the timer
automatically without interacting with the user application.
You must configure the following properties in run time or in design time:
font As StdFont

Label font of uAgent OCX Timer.


not_ready_reasons As string

Reason for uAgent OCX Timer to extend the wrap-up time of the agent.

uAgent OCX

2010-03-31

The properties below have colors that relate to the state of the session. You must also configure the properties in
run time or in design time:
phone_alerting_color
phone_cleared_color
phone_dialing_color
phone_extended_color
phone_hold_color
phone_pending_color
phone_routing_color
phone_setup_color
phone_talk_color
phone_wrapup_color
interaction_arriving_color
interaction_wrapup_color
interaction_cleared_color
interaction_cleared_delivered_color

As
As
As
As
As
As
As
As
As
As
As
As
As
As

OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR
OLE_COLOR

The colors of the properties are used to indicate the telephony and data interaction states. The uAgent OCX Timer
allows the agent to keep track of telephony and data interactions by displaying the interaction states. The interaction
states are properties. The uAgent OCX Timer window displays the following interaction states:

Ringing
Cleared
Dialing
Pending
On hold
Routing
Extended
Phone setup
Wrap-up
Talking
Phone caption
Data arrive
Data wrap-up
Data cleared and delivered.

How to increase the wrap-up time


uAgent OCX allows agents to increase the wrap-up time. If the phone state of the agent is PHS_DISCONNECTED or
the data interaction state is DIS_WRAPUP and the agent still has contact data, the agent must click the time label of
uAgent OCX Timer to stop the countdown.
uAgent OCX Timer stops in the following cases:

The call and data interaction are in wrap-up


The timer of the call has stopped and the wrap-up time of the data interaction is reached
The timer of the data interaction has stopped and the wrap-up time of the call is reached.

When the agent stops uAgent OCX Timer, the agent becomes not ready to receive calls until ending the current
session. When the session ends, the agent is automatically set ready and starts to receive calls again.
uAgent OCX queries the uCI Repository to find out the wrap-up time of a specific campaign. The query is made
only when a campaign is open to avoid fetching a new value when a new session arrives. If the supervisor changes
the wrap-up time without closing the campaign, the query to the database produces inconsistent information.

10

2010-03-31

uAgent OCX

New functionality
In Altitude uCI 6.1 and earlier, the uAgent OCX was called the EpTalkControl.
This section describes the new functionality introduced in Altitude uCI releases. The section does not describe small
changes to the uAgent OCX that do not introduce improved functionality.

New functionality in Altitude uCI 7.1


The uAgent OCX supports preview interactions using the following new events and methods:
SessionEvent

The new Boolean parameter i_PreviewMode is true if the session has preview data.
get_preview_mode

Retrieves the preview mode. If true, the session has a preview interaction.
reschedule_contact_with_failed_reason

Requests the automatic reschedule of a preview interaction for the contact. The possible reasons are busy,
machine, no answer, invalid number, modem, fax, line overflow, and rejected.
The following new events and methods provide general improvements:
campaign_unavailable

Indicates that a campaign was closed on the Assisted Server.


campaign_unavailable_suspended

Indicates that a campaign not open by the agent was suspended on the Assisted Server.
get_acd

Retrieves the directory number of the last ACD traversed by the call.
get_site_info

Retrieves information about the Assisted Server instances (sites) configured on the agent desktop, as stored
on the Windows registry of the agent computer.
send_dtmf

Sends a sequence of DTMF (dual tone multiple frequency) tones.


set_site

Sets the Assisted Server instance (site).


get_campaign_agents_list

Retrieves a list of agents related to a campaign.


Scripts can use the following new methods to retrieve and compose emails:
get_mails_in_queue

Returns the list of queued emails for all open campaigns.


get_to_field

Retrieves the header field To of the email.


get_from_field

Retrieves the header field From of the email.


get_bcc_field

Retrieves the header field Bcc of the email.

uAgent OCX

2010-03-31

11

get_cc_field

Retrieves the header field Cc of the email.


query_email_attachments_info

Returns the name, size, and MIME content type of the email attachments.
save_attachment

Saves an email attachment into a file.


store_email_mime

Stores an email in MIME format in the document manager.


remove_email

Removes an email from the document manager.

New functionality in Altitude uCI 6.2


The uAgent OCX supports sessions with data interactions using the new methods below:
answer_data_interaction

Answers an alerting data interaction.


clear_data_interaction

Clears the data interaction.


get_data_interaction_state

Retrieves the state of the data interaction.


query_email

Retrieves email information for the session. If hasEmail is true, the output arguments emailId, mailFrom,
mailReplyTo, mailSubject, and mailArrived describe the email.
query_web

Retrieves information about the Web collaboration in the session. If hasWeb is true, the output arguments
webUrl, webSecret, webBrowser, and webPhoneNumber describe the Web collaboration.
Sessions can generate the following new or improved events:
DataInteractionEvent

Notifies that a data interaction event has occurred and reports the resulting data interaction status.
DataInteractionProgressEvent

Notifies that a pending data interaction operation has evolved.


SessionEvent

The new argument i_di_state reports the state of the data interaction. The new arguments i_hasMail
and i_hasWeb are true if the session has email data or Web collaboration data.
uAgent OCX scripts can also use the following new methods to create and destroy data interactions:
create_data_interaction

Creates a data interaction.


destroy_data_interaction

Destroys a data interaction.


query_queue_position

Retrieves the queue position and the expected waiting time for calls or data interactions.
The following methods are improved to also handle data interactions:

12

2010-03-31

uAgent OCX

get_agent_info

The new output arguments with_email and with_web are true if the agent has an email or a Web
collaboration. The new output arguments n_webs and n_emails have the number of queued Web
collaborations and emails for the agent.
get_campaign_info

The new output parameters n_emails and n_webs have the number of queued emails and Web collaborations
for the campaign.
blind_transfer

If the new argument sendDataInteraction is true, sends the email or Web collaboration data with the
call.
dial

If the new argument sendDataInteraction is true, sends the email or Web collaboration data with the
call.
extend

If the new argument sendDataInteraction is true, sends the email or Web collaboration data with the
call.
supervisor_help

If the new argument sendDataInteraction is true, sends the email or Web collaboration data with the
call.
To handle a Web collaboration, scripts can use the new method below:
open_browser_for_web_interaction_GUI

Opens the browser for a Web collaboration.


To handle emails using the uAgent Windows email editor, scripts can use the following new methods and event:
count_outgoing_mails_GUI

Retrieves the number of outgoing email windows currently open on uAgent Windows.
edit_email_GUI

Edits a new email on uAgent Windows.


forward_GUI

Edits a forward email on uAgent Windows.


reply_GUI

Edits a reply email on uAgent Windows.


reply_all_GUI

Edits a reply email on uAgent Windows.


show_email_GUI

Displays the received email on uAgent Windows.


SendMailEvent

Notifies that an email was sent.


Scripts can use the following new methods to retrieve and compose emails:
get_from_field

Retrieves the sender address configured for the campaign.


pickup_mail

Picks up the specified email from the campaign queue.


query_email_document

Retrieves email information for the specified email.


query_email_mime

Retrieves an email with the format MIME.

uAgent OCX

2010-03-31

13

query_email_text_body

Retrieves the text body of the specified email or the textual part of a MIME email.
send_email_mime

Sends an email in MIME format.


sent_email_text

Sends an email with a textual body.


Scripts that integrate with uBusiness can use the following new or improved methods:
end_data_transaction

Has the new parameter user_id, that identifies the uBusiness contact.
get_user_id

Retrieves the identifier of the contact on uBusiness.


new_contact

The method new_contact has two new arguments. If active is true, the reschedule information will be
applied to the contact. user_id is the identifier of the contact on uBusiness. If -1, the contact is not on
uBusiness.
The following new methods manipulate time zones for the contact and the contact center:
get_callcenter_timezone

Retrieves the time zone of the contact center.


get_timezone

Retrieves the time zone of the contact.


set_timezone

Sets the time zone of the contact.


The following new or improved methods and events improve telephony handling:
ExtensionCleared

Notifies that the extension of the agent is cleared, typically after a queued call is delivered.
SessionPhoneEvent

The event has the extra argument isEnqueued. If true, the call is enqueued.
dequeue_call

Removes a call from the campaign queue.


enqueue_call

Enqueues a call into the campaign queue, optionally specifying the handicap and the agent skills.
get_blind_data

Retrieves the blind data associated with the call.


is_phone_op_pending

Checks for pending telephony operations in a specific campaign.


The following new property, event, and methods provide general improvements:
server_instance

Holds the Assisted Server instance.


UserMessage

Notifies that the supervisor sent a message to the agent.


exit_talk

Exits uAgent Windows.


get_login_name

Retrieves the login name of the agent.

14

2010-03-31

uAgent OCX

get_password

Retrieves the encrypted password of the agent.


restart_data_transaction

Restarts the data transaction.


send_data

Sends data to another agent.


sign_off

Signs off the agent from the campaign.


sign_on

Signs on the agent to the campaign.


The following new methods check that the corresponding method can be invoked:
can_answer_data_interaction
can_clear_data_interaction
can_defer_next_call
can_dequeue_call
can_enqueue_call
can_exit
can_get_campaigns
can_launch_next_call
can_load_contact
can_new_call
can_new_contact
can_set_extension
can_sign_off
can_sign_on
can_start_script

New functionality in Altitude uCI 6.1


The following new property provides improved functionality:
multilogin

If true, allows several agents to log in to the same computer.

New functionality in Easyphone 5.1


The following new event provides improved functionality:
CampaignAvailable

Indicates that a campaign is available on the Assisted Server.


The following methods provide new or improved functionality:
dial

The optional new parameter cpg_name specifies the target campaign. The optional new parameters attrs
and blinddata send data values or arbitrary data with the call.
extend

The new argument purpose is typically PURPOSE_EXTEND_DEFAULT, but on the Nortel switch you must
specify PURPOSE_EXTEND_TO_TRANSFER or PURPOSE_EXTEND_TO_CONFERENCE.
supervisor_help

Requests help from the supervisor by dialing or extending a call.

uAgent OCX

2010-03-31

15

get_agent_info

Retrieves information about the specified agent.


get_campaign_info

Retrieves information about the specified campaign.


get_message_of_the_day

Retrieves the message of the day.


get_not_ready_reasons

Retrieves the not ready reasons for agents.


set_not_ready

The new argument reason specifies why the agent becomes not ready.
release_session

Releases a session.
set_call_type

Associates a call type to the call.


The following new properties provide improved functionality:
Version

Version of the uAgent OCX.


logg_fixed

If false, creates a new log file each time the program runs. If true, uses the same log file.
can_logg

If true, creates log files.

16

2010-03-31

uAgent OCX

How to upgrade older programs


In Altitude uCI 6.1 and earlier, the API was called EpTalkControl.
To upgrade programs that use the uAgent OCX, you must revise and recompile your programs as described in this
section. The revised programs maintain functionality, but do not use the new functionality introduced in later releases.

Upgrading from Altitude uCI 6.2 to Altitude uCI 7.1


You only need to recompile programs that use the uAgentOCXTimer. You must revise programs that use the
uAgentOCXControl methods, events and enumerated values below:
easy_shutdown

Replaced by the event ConnectionState. Modify your program to handle the event ConnectionState
with the state CONN_STATE_FORCED_LOGOUT.
enqueue_call

No longer accepts the parameter extension. Remove the argument from calls to the method. If your program
uses the parameter extension, you must change the program logic to use the name of the agent.
SessionEvent

Has the new parameter i_PreviewMode. Modify your program to ignore or handle the new mode.
PhoneProgressEvent

The event arguments phoneReq and prog can have different values. The event no longer returns the values
PHR_ROUTED and PHP_OK_CALL_OVERFLOWED, but can return the new values PHR_AUTO_START_RECORD,
PHP_KO_FAILED_FAX, PHP_KO_FAILED_MODEM, PHP_OK_CALL_CONFERENCED and PHP_OK_CALL_ROUTED.

Upgrading EpTalkControl from Altitude uCI 6.1 to Altitude uCI 6.2


In Altitude uCI 6.1 the uAgentOCXControl was called TALKControl, and uAgentOCXTimer was called the
TALKTimer. You must revise programs that use the TALKControl methods and events below:
blind_transfer

Has the new argument sendDataInteraction. To maintain functionality, insert the argument False when
calling the method.
dial

Has the new argument sendDataInt. To maintain functionality, insert the argument False when calling
the method.
end_data_transaction

Has the new argument user_id. To maintain functionality, insert the argument -1 when calling the method.
extend

Has the new argument sendDataInteraction. To maintain functionality, insert the argument False when
calling the method.
get_agent_info

Has the new output arguments with_email, with_web, n_webs, and n_emails. To maintain functionality,
pass extra variables when calling the method.

uAgent OCX

2010-03-31

17

get_campaign_info

Has the new output parameters n_emails and n_webs. To maintain functionality, pass extra variables when
calling the method.
new_contact

Has the new arguments active and user_id. To maintain functionality, insert the arguments True and -1
when calling the method.
SessionEvent

Has the new parameters i_di_state, i_hasMail and i_hasWeb. Modify your program to ignore or handle
the new data interaction states. Altitude uCI 7.1 also changes the event.
SessionPhoneEvent

Has the new parameter isEnqueue. Modify your program to ignore or handle the queuing state. Altitude
uCI 7.1 also changes the event SessionPhoneEvent.
start_data_transaction
Rename to start_script.
supervisor_help

Has the new argument sendDataInteraction. To maintain functionality, insert the argument False when
calling the method.
You must revise programs that use the TALKTimer properties and methods below:
alerting_color
Rename to phone_alerting_color.
cleared_color

Rename to phone_cleared_color.
dialing_color

Rename to phone_dialing_color.
extended_color
Rename to phone_extended_color.
hold_color

Rename to phone_hold_color.
pending_color

Rename to phone_pending_color.
routing_color

Rename to phone_routing_color.
setup_color

Rename to phone_setup_color.
talk_color

Rename to phone_talk_color.
wrapup_color

Rename to phone_wrapup_color.
set_color

Has the new argument fromPhone. To maintain functionality, add the argument True when calling the
method.

Upgrading EpTalkControl from Easyphone 5.1 to Altitude uCI 6.1


You only need to recompile your program. In Easyphone 5.1 the uAgentOCXControl was called TALKControl,
and the uAgentOCXTimer was called TALKTimer.

18

2010-03-31

uAgent OCX

Upgrading EpTalkControl from Easyphone 4.04 to Easyphone 5.1


In Easyphone 4.04 the uAgentOCXControl was called TALKControl, and the uAgentOCXTimer was called
TALKTimer. You must revise the programs that use the TALKControl methods and events below:
dial

Has the extra optional arguments cpg_name, attrs, and blinddata. To maintain functionality if your
program uses multiple sessions, insert an empty campaign name when calling the method. Altitude uCI 6.2
also changes the method.
extend

Has the extra parameter purpose. To maintain functionality, insert the argument PURPOSE_EXTEND_DEFAULT
when calling the method. Altitude uCI 6.2 also changes the method.
init

No longer exists. To maintain functionality, remove all calls to the method.


set_not_ready

Has the extra parameter reason. To maintain functionality, insert an empty string as argument when calling
the function.
set_synch

No longer exists. To maintain functionality, remove all references to the property.


sql_execute

No longer has the parameter trans. To maintain functionality, remove the Boolean argument when calling
the method.

uAgent OCX

2010-03-31

19

Main methods
The main methods return information about the agent, handle uAgent Windows, and hold error handling functions.

global_dial
Dials a number and returns a new session.
Public Function global_dial(
[in]phone
As String,
[out]sess_num As Integer ) As ACB_RETURN_CODE

The session has only telephony components.


Parameters
phone

Number to dial.
sess_num

Index of the new session in the global session array.

login
Logs in the agent to the Assisted Server.
Public Function login
[in]usr
[in]passwd
[in]recovery_time

(
As String,
As String,
As Long, ) As ACB_RETURN_CODE

Parameters
usr

Name of the agent registered on the Assisted Server.


passwd

Password of the agent.


recovery_time

Amount of time that the agent waits for uAgent OCX to recover from an interaction in uAgent Windows.

logout
Logs out the agent from the Assisted Server.
Public Function logout ()

20

2010-03-31

As ACB_RETURN_CODE

uAgent OCX

get_acd
Retrieves the directory number of the last ACD traversed by the call.
Public Function get_acd (
acd
As String,
sess_num As Variant[Integer]) As ACB_RETURN_CODE

Parameters
acd

Last ACD traversed by the call.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

get_agent_info
Retrieves information about the specified agent.
Public Function get_agent_info (
[in]agent
As String,
[out]ag_type
As OCX_AGENT_TYPE,
[out]logged
As Boolean,
[out]ext
As String,
[out]ready
As Boolean,
[out]wrapup
As Boolean,
[out]working
As Boolean,
[out]with_ph_call
As Boolean,
[out]with_email
As Boolean,
[out]with_web
As Boolean,
[out]with_preview
As Boolean,
[out]n_calls
As Long,
[out]n_webs
As Long,
[out]n_emails
As Long,
[out]avg_work
As Long,
[out]n_skills
As Long,
[out]skill_names() As String,
[out]skill_values() As Double ) As ACB_RETURN_CODE

Parameters
agent

Name of the agent.


ag_type

Type of agent.
logged

If TRUE, the agent is logged.


ext

Extension of the agent.


ready

If TRUE, the agent is ready.


wrapup

If TRUE, the agent is in wrap-up.

uAgent OCX

2010-03-31

21

Working

If TRUE, the agent has a data interaction.


with_ph_call

If TRUE, the agent has a phone call.


with_email

If TRUE, the agent has an email interaction.


with_web

If TRUE, the agent has a Web collaboration.


with_preview

If TRUE, the agent has a preview interaction.


n_calls

Number of calls queued.


n_webs

Number of Web collaborations queued.


n_emails

Number of email interactions queued.


avg_work

Average duration of the data transaction.


n_skills

Number of agent skills.


skill_names

Array with the skill names.


skill_values

Array with the skill values.


The types of agents are the following:
Public Enum OCX_AGENT_TYPE
AGTYPE_AGENT
= 0,
AGTYPE_SUPERVISOR
= 1,
AGTYPE_IVR
= 2,
AGTYPE_ADMINISTRATOR = 3,
AGTYPE_ROUTING
= 4,
AGTYPE_WALLBOARD
= 5,
AGTYPE_THIRDPARTY
= 6,
AGTYPE_SCHEDULER
= 7
End Enum

get_user_id
Retrieves the identifier of the contact on uBusiness.
Public Function get_user_id (
[out]userId
As Long,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
userId

Identifier of the CRM user.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

22

2010-03-31

uAgent OCX

exit_talk
Exits uAgent Windows.
Public Function exit_talk() As ACB_RETURN_CODE

get_default_extension
Retrieves the default extension of the agent.
Public Function get_default_extension (
[out]ext As String ) As ACB_RETURN_CODE

Parameters
ext

Default extension of the agent.

get_login_name
Retrieves the login name of the agent.
Public Function get_login_name (
[out]loginName As String ) As ACB_RETURN_CODE

Parameters
loginName

Login name of the agent.

get_full_name
Retrieves the full name of the agent.
Public Function get_full_name (
[out]full_name As String ) As ACB_RETURN_CODE

Parameters
full_name

Full name of the agent.

get_extension
Retrieves the current extension of the agent.
Public Function get_extension (
[out]ext As String ) As ACB_RETURN_CODE

uAgent OCX

2010-03-31

23

Parameters
ext

Current extension of the agent.

set_extension
Sets the extension of the agent.
Public Function set_extension (
[in]extension As Variant[String] ) As ACB_RETURN_CODE

Parameters
extension

Optional. Extension of the agent. If the parameter is omitted, the function assumes the default extension of
the agent.

get_password
Retrieves the encrypted password of the agent.
Public Function get_password (
[out]password As Sring ) As ACB_RETURN_CODE

Parameters
password

Password of the agent, encrypted.

change_password
Changes the password of the agent.
Public Function change_password (
[in]old_passwd As String,
[in]new_passwd As String ) As ACB_RETURN_CODE

Parameters
old_passwd

Old password.
new_passwd

New password.

get_callcenter_timezone
Retrieves the time zone of the contact center.
Public Function get_callcenter_timezone (
[out]tzName As String ) As ACB_RETURN_CODE

24

2010-03-31

uAgent OCX

Parameters
tzName

Abbreviation of the contact center time zone.

get_not_ready_reasons
Retrieves the not ready reasons for agents.
Public Function get_not_ready_reasons (
[out]reasons() As String ) As ACB_RETURN_CODE

Parameters
reasons

Array of not ready reasons.

get_last_error
Retrieves the last error.
Public Function get_last_error (
[out]err_num
As Variant[Long],
[out]err_desc As Variant[String]) As ACB_RETURN_CODE

Parameters
err_num

Optional. Code number of the last error.


err_desc

Optional. Textual description of the last error.

get_session
Retrieves the session object.
Public Function get_session (
[out]Session As Object,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The session object is the entity that handles the conversation with voice, data, or related voice and data.
Parameters
Session

Session object of the session.


sess_num

Optional. Identifier of the session.

uAgent OCX

2010-03-31

25

set_site
Sets the site on the Assisted Server.
Public Function set_site (
[in]site As String ) As ACB_RETURN_CODE

Parameters
site
Retrieves the available sites.

get_site_info
Retrieves information about the site.
Public Function get_site_info(
[out]sites()
As String,
[out]default_site
As String,
[out]can_change_site As Boolean ) As ACB_RETURN_CODE

Parameters
sites
Retrieves the list of sites.
default_site
Retrieves the default site.
can_change_site
If TRUE, the agent can select the site.

release_session
Frees the session.
Public Function release_session (
[in]sess_num As Variant[Integer] ) As Integer

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

26

2010-03-31

uAgent OCX

Campaign methods
Campaign methods handle the calls in the campaign.

get_campaign_info
Retrieves information about the specified campaign.
Public Function get_campaign_info (
[in]campaign
As String,
[out]n_ag_log
As Long,
[out]n_ag_ready
As Long,
[out]n_ag_idle
As Long,
[out]n_calls
As Long,
[out]n_emails
As Long,
[out]n_webs
As Long,
[out]n_ag_avail
As Long,
[out]n_ag_wrap
As Long,
[out]avg_work
As Long ) As ACB_RETURN_CODE

Parameters
campaign

Name of the campaign.


n_ag_log

Number of logged agents.


n_ag_ready

Number of ready agents.


n_ag_idle

Number of idle agents.


n_calls

Number of calls queued.


n_emails

Number of email interactions queued.


n_webs

Number of Web interactions queued.


n_ag_avail

Number of agents available.


n_ag_wrap

Number of agents in wrap-up.


avg_work

Average duration of the data transaction.

open_campaign
Opens the campaign.
Public Function open_campaign (
[in]cpg_name
As Variant[String],
[out]list_attrs() As String ) As ACB_RETURN_CODE

uAgent OCX

2010-03-31

27

The campaign must be closed and the agent must be signed in. The parameter attrs retrieves the campaign attributes
referred in a call. Otherwise, the campaign attributes will be ignored.
Parameters
cpg_name

Name of the campaign.


list_attrs

Array with the name and value of the campaign attributes.

close_campaign
Closes the campaign.
Public Function close_campaign (
[in]cpg_name As Variant[String]) As ACB_RETURN_CODE

The function closes the campaign indicated in cpg_name. If the campaign is not open, the request will not be made
to the Assisted Server.
Parameters
cpg_name

Name of the campaign to close.

get_campaign_name
Requests for the name of the campaign.
Public Function get_campaign_name (
[out]cpg_name As Variant[String],
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
cpg_name

Name of the campaign.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

get_campaigns
Displays the list of campaigns.
Public Function get_campaigns (
[out]cpg_array() As String,
[out]cpg_active() As Boolean ) As ACB_RETURN_CODE

Parameters
cpg_array

Array with the name of the campaigns.

28

2010-03-31

uAgent OCX

cpg_active

Status of the campaign related to the agent.

get_campaign_agents_list
Retrieves a list of agents related to a campaign.
Sub get_campaign_agents_list(
[in]cpgName
As String,
[out]agent_name() As String,
[out]agent_type() As OCX_AGENT_TYPE,
[out]agent_state() As Boolean) As ACB_RETURN_CODE

Parameters
cpgName

Name of the campaign to query.


agent_name

1-dimensional array with the names of the agents.


agent_type

1-dimensional array with the types of the agents.


agent_state

2-dimensional array with the states of the agents. For example, if agent_state(4,1) is true, the agent
agent_name(4) has telephony.
The possible values of OCX_AGENT_TYPE are the following:
AGTYPE_AGENT
AGTYPE_SUPERVISOR
AGTYPE_IVR
AGTYPE_ADMINISTRATOR
AGTYPE_ROUTING
AGTYPE_WALLBOARD
AGTYPE_THIRDPARTY
AGTYPE_RESERVED

The order of the columns in the array agent_state are as follows:


1
If true, the campaign agent is ready.
2
If true, the campaign agent is in wrap-up.
3
If true, the campaign agent has a data transaction.
4
If true, the campaign agent has telephony.
5
If true, the campaign agent has an email interaction.
6
If true, the campaign agent has a Web collaboration.
7
If true, the campaign agent has a preview interaction.

uAgent OCX

2010-03-31

29

get_from_field
Retrieves the sender address configured for the campaign.
Public Function get_from_field (
[in]email As Variant[String],
[out]from As String,
[in]sess_num as Variant[Integer]) As ACB_RETURN_CODE

Parameters
email

Email of the campaign.


from

Name of the field to register the sent emails.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

is_phone_op_pending
Checks for pending telephony operations in a specific campaign.
Public Function is_phone_op_pending (
[in]campaignName As String,
[out]pending
As Boolean ) As ACB_RETURN_CODE

Parameters
campaignName

Name of the campaign.


pending

If TRUE, the campaign has a pending telephony operation.

get_message_of_the_day
Retrieves the message of the day.
Public Function get_message_of_the_day (
[out]msgDay As String,
[in]cpg_name As Variant[String] ) As ACB_RETURN_CODE

Parameters
msgDay

Message of the day. The message is a concatenated string of instance, agent, and team.
cpg_name

Optional. Name of the campaign related to the message of the day.

30

2010-03-31

uAgent OCX

set_not_ready
Sets the agent not ready in a campaign.
Public Function set_not_ready (
[in]reason
As String,
[in]cpg_name As Variant[String] ) As ACB_RETURN_CODE

If the campaign parameter cpg_name is empty, the Assisted Server sets the agent not ready in all the campaigns
opened by the agent.
Parameters
reason

Not ready reason to send to the server.


cpg_name

Optional. Name of the campaign where the agent is set not ready.

set_ready
Sets the agent ready in all open campaigns.
Public Function set_ready (
[in]cpg_name As Variant ) As ACB_RETURN_CODE

Parameters
cpg_name

Name of the campaign where the agent is set ready.

sign_off
Signs off the agent from the campaign.
Public Function sign_off (
[in]campaignName As String,
[in]now
As Boolean ) As ACB_RETURN_CODE

Parameters
campaignName

Name of the campaign.


now

Optional. If TRUE, the sign off is performed regardless of the agent status.

sign_on
Signs in the agent to the campaign.
Public Function sign_on (
[in]campaignName As String,
[in]now
As Boolean ) As ACB_RETURN_CODE

uAgent OCX

2010-03-31

31

Parameters
campaignName

Name of the campaign.


now

Optional. If TRUE, the sign on is performed regardless of the agent status.

start_session
Starts a new session with associated data.
Public Function start_session (
[in]cpg_name
As Variant[String],
[out]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
cpg_name

Name of the campaign.


sess_num

Index of the session in the global session array.

32

2010-03-31

uAgent OCX

Telephony methods
Telephony methods handle telephony interactions.

answer
Answers an interaction in the session.
Public Function answer (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

blind_transfer
Requests a blind transfer.
Public Function blind_transfer (
[in]agent
As String,
[in]ext
As String,
[in]cpg_name
As Variant[String],
[in]send_DataInteraction As Boolean,
[in]attrs()
As String,
[in]blindData ()
As Variant,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

The method is only available in the same instance of the Assisted Server.
Parameters
agent

Name of the destination agent or an empty string.


ext

Extension of the destination agent or an empty string.


cpg_name

Name of the destination campaign or an empty string.


send_DataInteraction

If TRUE, sends email or Web collaboration data.


attrs

Array with the name and value of the campaign attributes.


blindData

Array of bytes with the blind data of the call.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

33

clear
Clears a call.
Public Function clear (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The method finishes the wrap-up and ends the session if the session does not have data. If the session has data, the
method keeps the data until the transaction ends or is discarded.
Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

conference
Requests a conference call.
Public Function conference (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

extend
Extends a call.
Public Function extend (
[in]agent
[in]ext
[in]cpg_name
[in]sendDataInteraction
[in]attrs()
[in]blinddata()
[in]purpose
[in]sess_num)

As
As
As
As
As
As
As
As

String,
String,
Variant[String],
String,
String,
Byte,
OCX_EXTEND_PURPOSE,
Variant[Integer] ) As ACB_RETURN_CODE

The method is only available in the same instance of the Assisted Server.
Parameters
agent

Name of the destination agent or an empty string.


ext

Extension of the destination agent or an empty string.


cpg_name

Campaign to extend the call or an empty string.

34

2010-03-31

uAgent OCX

sendDataInteraction

If TRUE, sends email or Web collaboration data.


attrs

Array with the name and value of the campaign attributes or an empty array.
blinddata

Array of bytes with the blind data call of the call or an empty array.
purpose

Extend mode for transfer or conference, as shown below.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.
The extend modes are the following:
Public Enum OCX_EXTEND_PURPOSE
PURPOSE_EXTEND_DEFAULT
= 0,
PURPOSE_EXTEND_TO_TRANSFER
= 1,
PURPOSE_EXTEND_TO_CONFERENCE = 2
End Enum

dial
Makes a call.
Public Function dial (
[in]phone
As String,
[in]cpg_name
As Variant[String],
[in]session_num
As Variant[Integer],
[in]send_DataInt As Variant[Boolean],
[in]attrs()
As Variant[String]
[in]blinddata()
As Variant[Byte]) As ACB_RETURN_CODE

Parameters
phone

Phone number to dial.


cpg_name

Optional. Name of the destination campaign.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.
send_DataInt

If TRUE, sends email or Web collaboration data.


attrs

Optional. Array with the name and value of the campaign attributes.
blinddata

Optional. Array of bytes with blind data of the call.

uAgent OCX

2010-03-31

35

get_blind_data
Retrieves the blind data associated with the call.
Public Function get_blind_data (
[out]blindData() As Byte,
[in]sess_num
As Variant[Integer]) As ACB_RETURN_CODE

Parameters
blindData

Array of bytes with blind data.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

get_dnis
Retrieves the DNIS.
Public Function get_dnis (
[out]dnis
As String,
[in]sess_num As Variant[String] ) As ACB_RETURN_CODE

Parameters
dnis

Dialed Number Identification Service.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

get_phone_number
Retrieves the phone number.
Public Function get_phone_number (
[out]phone_number As String,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
phone_number

Phone number associated with the session.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

36

2010-03-31

uAgent OCX

get_phone_state
Retrieves the state of the call.
Public Function get_phone_state (
[out]phstate As OCX_PHONE_STATE,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
phstate

State of the current call. Returns one type of OCX_PHONE_STATE, as shown below.
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.
The phone states are as follows:
Public Enum OCX_PHONE_STATE
PHS_ALERTING
PHS_CONNECTED
PHS_HELD
PHS_EXTENDED
PHS_DIALING
PHS_DISCONNECTED
PHS_CLEARED
PHS_DIAL_REQUEST_PENDING
PHS_ROUTING
PHS_SETUP
End Enum

=
=
=
=
=
=
=
=
=
=

0,
1,
2,
3,
4,
5,
6,
7,
8,
9

hangup
Hangs up the call.
Public Function hangup (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

hold
Puts a call on hold.
Public Function hold (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

37

retrieve
Retrieves an extended call or a call on hold.
Public Function retrieve (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

supervisor_help
Requests help from the supervisor.
Public Function supervisor_help (
[in]cpg_name
As Variant[String],
[in]sendDataInteraction As Boolean,
[in]attrs()
As String,
[in]blindData()
As Byte,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

The call is extended to the supervisor.


Parameters
cpg_name

Name of the campaign to transfer the call or an empty string.


sendDataInteraction

If TRUE, sends email or Web collaboration data.


attrs

Array with the name and value of the campaign attributes or an empty array.
blindData

Array of bytes with the blind data of the call or an empty array.
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

transfer
Transfers a call.
Public Function transfer (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The call associated with the session must be extended and the transfer only carries voice, even if the session has
associated data.

38

2010-03-31

uAgent OCX

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

send_DTMF
Sends a sequence of DTMF tones.
Public Function send_DTMF (
[in]digits
As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
digits
Sequence of telephony tones.
sess_num
Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

enqueue_call
Enqueues a call into the campaign queue.
Public Function enqueue_call (
[in]agent
As String
[in]cpg_name
As Variant[String]
[in]attrs
As String
[in]handicap
As Long
[in]skillNames As String
[in]skillValues As Double
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
agent

Name of the agent to transfer the call.


cpgName

Name of the campaign.


attrs

Array with the name and value of the phone values.


handicap

Handicap of the enqueued call.


skillNames

Array with the name of the skills.


skillValues

Array with the skill values minimum and weight.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

39

dequeue_call
Removes a call from the campaign queue.
Public Function dequeue_call (
[in]reason
As OCX_DEQUEUE_REASON,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The campaign must have a dequeue reason.


Parameters
reason

Dequeue reason, as shown below.


sess_num

Optional. Identifier of the session. If the parameter is omitted, the method uses the session with data interaction
in wrap-up or returns an error if more than one session is in wrap-up.
The dequeued reasons are as follows:
Public enum OCX_DEQUEUE_REASON
DEQ_REASON_NONE,
DEQ_REASON_ABANDON,
DEQ_REASON_OVERFLOW,
DEQ_REASON_REJECT
End enum

query_queue_position
Retrieves the queue position and the expected waiting time.
Public Function query_queue_position(
[in]from_phone
As Boolean
[in]DI_id
As Long
[out]pos
As Long
[out]expected_Waiting_Time As Long
[in]sess_num
As Variant ) As ACB_RETURN_CODE

Parameters
from_phone

If TRUE, queries the position of the call. If FALSE, queries the position of the data interaction.
DI_id

Identifier of the data interaction.


pos

Position of the call in the queue.


expected_Waiting_Time

Waiting time, in tenths of seconds, for the call to be handled by an agent.


sess_num

Optional. Identifier of the session. If the parameter is omitted, the method uses the latest telephony session,
when existing, or the latest session created.

40

2010-03-31

uAgent OCX

start_record
Records a call.
Public Function start_record (
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

stop_record
Stops recording a call.
Public Function stop_record (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

41

Data interaction methods


Data interaction methods handle email and Web collaboration interactions.

answer_data_interaction
Answers a data interaction.
Public Function answer_data_interaction (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

get_data_interaction_state
Retrieves the state of the data interaction.
Public Function get_data_interaction_state (
[out]currentState As OCX_DATA_INTERACTION_STATE,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
currentState

State of the data interaction. Returns one type of OCX_DATA_INTERACTION_STATE, as shown below.
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.
The states of the data interaction are as follows:
Public Enum OCX_DATA_INTERACTION_STATE
DIS_ALERTING
= 0,
DIS_WRAPUP
= 1,
DIS_CLEARED
= 2,
DIS_CLEARED_DELIVERED = 3
End Enum

clear_data_interaction
Clears the data interaction.
Public Function clear_data_interaction (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

42

2010-03-31

uAgent OCX

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

restart_data_transaction
Restarts the data transaction.
Public Function restart_data_transaction (
[in]attrs()
As String
[in]campaignName As String
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
attrs

Array with the name and value of the attributes.


campaignName

Name of the campaign.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

count_outgoing_mails_gui
Retrieves the number of outgoing email windows currently open.
Public Function count_outgoing_mails_GUI (
[out]number_mails As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
number_mails

Number of outgoing emails.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

create_data_interaction
Creates a data interaction.
Public Function create_data_interaction (
[in]agentName
As String,
[in]cpgName
As String,
[in]attributes()
As String,
[in]interactionId As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

uAgent OCX

2010-03-31

43

Parameters
agentName

Name of the destination agent.


cpgName

Name of the destination campaign.


attributes

Attributes passed with the data interaction.


interactionId

Identifier of the data interaction.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

destroy_data_interaction
Destroys the data interaction created by the method create_data_interaction (page 43).
Public Function destroy_data_interaction (
[in]interactionId As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
interactionId

Identifier of the data interaction.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

get_mails_in_queue
Returns the list of emails for all open campaigns.
Public Function get_mails_in_queue (
[out]mail_IDs() As Long,
[out]mail_data() As String ) As ACB_RETURN_CODE

Parameters
mail_IDs
1-dimensional array that contains email identifiers.
mail_data
2-dimensional array that contains the email fields From, Date, and Subject.

forward_gui
Edits a forward email on uAgent Windows.
Public Function forward_GUI (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

44

2010-03-31

uAgent OCX

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

pickup_mail
Picks up the specified email.
Public Function pickup_mail (
[in]emailId As Long,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
emailId

Identifier of the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

query_email
Retrieves email information for the session.
Public Function query_email (
[out]hasMail
As Boolean,
[out]emailId
As Long,
[out]mailFrom
As String,
[out]mailReplyTo As String,
[out]mailSubject As String,
[out]mailArrived As Date,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
hasMail

If TRUE, the session has an email associated.


emailId

Identifier of the email.


mailFrom

Name of the email sender.


mailReplyTo

Name of the email recipient.


mailSubject

Topic of the email.


mailArrived

Date of the email arrival.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

uAgent OCX

2010-03-31

45

query_email_document
Retrieves email information for the specified email.
Public Function query_email_document (
[in]emailId
As Long,
[out]hasMiME
As Boolean,
[out]hasTextBody
As Boolean,
[out]created
As Date,
[out]toAddr
As String,
[out]from
As String,
[out]subject
As String,
[out]isReceived
As Boolean,
[out]acknowledgeGiven As Boolean,
[out]status
As Long,
[out]isRecovering
As Boolean,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
emailId

Identifier of the email.


hasMiME

If TRUE, the email has a MIME body.


hasTextBody

If TRUE, the email has text body.


created

Date of the email creation.


toAddr

Name of the email recipient.


from

Name of the email sender.


subject

String that specifies the subject of the email.


isReceived

If TRUE, the email was received. If FALSE, the email was sent.
acknowledgeGiven

If TRUE, an acknowledgement email was sent.


status

Status of the email.


isRecovering

If TRUE, the email was delivered to another agent.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

query_email_mime
Retrieves an email with the format MIME.
Public Function query_email_mime (
[in]emailId As Long,

46

2010-03-31

uAgent OCX

[out]mime
As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
emailId

Identifier of the email.


mime

Message of the email, in MIME format.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

get_bcc_field
Retrieves the header field Bcc of the email.
Public Function get_bcc_field(
[in]email
As Variant[String],
[out]bcc
As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
email

The integer identifier of an email stored at the Assisted Server, or the string filename of a file with the email.
bcc

Blind carbon copy recipients for the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

get_cc_field
Retrieves the header field Cc of the email.
Public Function get_cc_field(
[in]email
As Variant[String],
[out]cc
As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
email

The integer identifier of an email stored at the Assisted Server, or the string filename of a file with the email.
cc

Carbon copy recipients for the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

uAgent OCX

2010-03-31

47

get_subject_field
Retrieves the header field Subject of the email.
Public Function get_subject_field(
[in]email
As Variant[String],
[in]subject As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE)

Parameters
email

The integer identifier of an email stored at the Assisted Server, or the string filename of a file with the email.
subject

Subject of the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

get_to_field
Retrieves the header field To of the email.
Public Function get_to_field(
[in]email
As Variant[String],
[out]tofield
As String,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
email

The integer identifier of an email stored at the Assisted Server, or the string filename of a file with the email.
tofield

Addresses of the email recipient.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

query_email_text_body
Retrieves the text body of the specified email.
Public Function query_email_text_body (
[in]emailId
As Long,
[out]body
As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
emailId

Identifier of the email.

48

2010-03-31

uAgent OCX

body

Text body of the email, or the textual part of a MIME email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

query_email_attachments_info
Returns the name, size, and MIME content type of the email attachments as three parallel arrays.
Public Function query_email_attachments_info(
[in]email
As Variant,
[out]name
As String(),
[out]size
As String(),
[out]content_type As String(),
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
email

The integer identifier of an email stored at the Assisted Server, or the string filename of a file with the email.
name

Names of the attachments.


size

Sizes of the attachments in bytes.


content_type

MIME types of the attachments. For example, text/plain.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

store_email_mime
Stores an email in MIME format in the document manager and returns the identified of the saved email.
Public Function store_email_mime(
[in]tofield
As String,
[in]from
As String,
[in]mime
As String,
[out]emailId As Long,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE)

Parameters
to

Address of the email recipient.


from

Address of the email sender.


mime

Message of the email, including all the headers.


emailId

Identifier of the email in the document manager.

uAgent OCX

2010-03-31

49

sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

query_web
Retrieves information about the Web collaboration in the session.
Public Function query_web (
[out]hasWeb
As Boolean,
[out]webUrl
As String,
[out]webSecret
As String,
[out]webBrowser
As Integer,
[out]webPhoneNumber As String,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
hasWeb

If TRUE, the session has a Web interaction associated.


webUrl

Specific URL of the Web browser.


webSecret

Secret key for the URL.


webBrowser

Type of the Web browser.


webPhoneNumber

Phone number.
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

reply_gui
Edits a reply email on uAgent Windows.
Public Function reply_GUI (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

reply_all_gui
Returns the email message to the sender and the recipients in the boxes To and Cc.
Public Function reply_all_GUI (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

50

2010-03-31

uAgent OCX

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

send_email_mime
Sends an email in MIME format.
Public Function send_email_mime (
[in]toAddr
As String,
[in]from
As String,
[in]mime
As String,
[out]emailId As Long,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
toAddr

Address of the email recipient.


from

Address of the email sender.


mime

Message of the email, including all the headers.


emailId

Identifier of the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

send_email_text
Sends an email with a textual body.
Public Function send_email_text (
[in]toAddr
As String,
[in] cc
As String,
[in]bcc
As String,
[in]subject
As String,
[in]text
As String,
[in]attach()
As Variant[String]
[out]emailId
As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
toAddr

Address of the email recipient.


cc

Cc of the email recipient.


bcc

Bcc of the email recipient.

uAgent OCX

2010-03-31

51

subject

Subject of the email.


text

Body of the email.


attach

Attach of the email.


emailId

Identifier of the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

show_email_gui
Displays the received email on uAgent Windows.
Public Function show_email_GUI (
[in]hasId
As Boolean,
[in]identifier As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
hasId

If FALSE, ignores the parameter identifier and uses the received email. If TRUE, shows the email of
the specified identifier.
identifier

Identifier of the email.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

edit_email_gui
Edits a new email on uAgent Windows.
Public Function edit_email_GUI (
[in]toAddr
As String,
[in]subject As String,
[in]content As String,
[in]sess_num As Variant[String] ) As ACB_RETURN_CODE

Parameters
toAddr

Recipient of the email.


subject

Topic of the email.


content

Message of the email.

52

2010-03-31

uAgent OCX

sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

open_browser_for_web_interaction_gui
Opens the browser for a Web collaboration.
Public Function open_browser_for_web_interaction_GUI (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

remove_email
Removes an email from the document manager.
Public Function remove_email(
[in]emailId As Long,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

You can remove a stored email unless the email was already sent.
Parameters
emailId

Identifier of the email in the document manager.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

save_attachment
Saves an email attachment into a file.
Public Function save_attachment(
[in]index
As Long,
[in]email
As Variant[String],
[in]to_file As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
index

Number of the attachment to save.


email

The integer identifier of an email stored at the Assisted Server, or the string filename of a file with the email.

uAgent OCX

2010-03-31

53

to_file

Name of the file to save the attachment.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

54

2010-03-31

uAgent OCX

Data transaction methods


Data transaction methods handle information about the contact and data associated to the session.

discard_data_transaction
Discards the data transaction.
Public Function discard_data_transaction (
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The method ends the script without creating a new contact or changing the status of a loaded contact.
Parameters
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

end_data_transaction
Stops the data transaction.
Public Function end_data_transaction (
[in]stops
As Boolean,
[in]attrs() As String,
[in]phones() As String,
[in]user_id As Long,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The method ends the script and updates the uCI Repository. The script only sends the changed attributes to the
server.
Parameters
stops

Registers the attributes on the database. If TRUE, the data transaction aborts and sets the contact state to
stop. If FALSE, the data transaction ends without problems, updates the contact information, and sets the
contact state to done.
attrs

Array with the name and value of the campaign attributes. This array contains information about the contact
table of the campaign.
phones

Array with the name and value of the phone values.


user_id

Identifier of the uBusiness contact.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

55

get_easy_code
Retrieves the code of the contact.
Public Function get_easy_code (
[out]easy_code As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
easy_code

Code of the contact. If POSITIVE, the number identifies the current contact. If NEGATIVE, no contact is
available.
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

get_preview_mode
Returns the preview mode.
Public Function get_preview_mode
[out]preview_mode
[in]sess_num

As Boolean,
As Variant ) As ACB_RETURN_CODE

Parameters
preview_mode

If TRUE, the session has a preview interaction.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

get_timezone
Retrieves the time zone of the contact.
Public Function get_timezone (
[out]tzName As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
tzName

Name of the time zone of the contact.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

56

2010-03-31

uAgent OCX

in_node
Notifies the Assisted Server about a new node.
Public Function in_node (
[in]nodeld
As Long,
[in]sess_num As Variant[Integer]) As ACB_RETURN_CODE

The method ensures the behavior of the predictive dialing algorithm.


Parameters
nodeld

Identifier of the node.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

load_contact
Loads the contact.
Public Function load_contact (
[in]where_text As String,
[in]try
As Boolean,
[out]easycode As Long,
[out]attrs()
As String,
[out]phones() As String,
[out]tzName
As String,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
where_text

Clause where of the SQL select statement.


try

Availability of the error. If FALSE, ignores the error.


easycode

Code of the contact. If NEGATIVE, no contact was found.


attrs

Array with the name and value of the campaign attributes. This array contains information about the contact
table of the campaign.
phones

Array with the name and value of the contact phones.


tzName

Abbreviation of the time zone of the contact.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

57

new_call
Makes a new call.
Public Function new_call (
[in]call_date
As String,
[in]time
As String,
[in]agent
As String,
[in]dial_rule
As String,
[in]priorities
As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
call_date

Date to make a new call.


time

Time to make a new call.


agent

Name of the agent related to the call.


dial_rule

Dial rule of the call.


priorities

Priority of the call.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

new_contact
Creates a new contact.
Public Function new_contact (
[in]contact_date
As String,
[in]time
As String,
[in]agent
As String,
[in]cpgName
As String,
[in]tzName
As String,
[in]dialRule
As String,
[in]active
As Boolean,
[in]priorities
As Long,
[in]attrs()
As String,
[in]phones()
As String,
[in]user_id
As String,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
contact_date

Date to call the contact or an empty string.


time

Time to call the contact or an empty string.


agent

Name of the agent related to the contact or an empty string.

58

2010-03-31

uAgent OCX

cpgName

Campaign related to the contact.


tzName

Abbreviation of the time zone of the contact.


dialRule

Dial rule related to the contact.


active

If TRUE, the reschedule information will be applied to the contact.


priorities

Priority of the call.


attrs

Array with the name and value of the campaign attributes. This array contains information about the contact
table of the campaign.
phones

Array with the name and value of the contact phones.


user_id

Identifier of the uBusiness contact.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

reschedule_contact_with_failed_reason
Requests the automatic reschedule of a preview interaction for the contact.
Public Function reschedule_contact_with_failed_reason
[in]reason
As OCX_PREVIEW_FAILED_REASON
[in]sess_num As Variant[Integer] ) As Integer

Parameters
reason

Reason for the preview failure.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.
The reasons for the failure are the following:
Public Enum OCX_PREVIEW_FAILED_REASON
PREVIEW_FAILED_BUSY
PREVIEW_FAILED_MACHINE
PREVIEW_FAILED_NO_ANSWER
PREVIEW_FAILED_INVALID_NUMBER
PREVIEW_FAILED_MODEM
PREVIEW_FAILED_FAX
End Enum

uAgent OCX

2010-03-31

59

select_contact
Retrieves the contact code from the database.
Public Function select_contact (
[in]where_text As String,
[out]easycode As Long,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
where_text

Clause where of the SQL select statement.


easycode

Code of the contact. If NEGATIVE, no contact was found.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

send_data
Sends data to another agent.
Public Function send_data (
[in]agent
As String,
[in]cpgName As String,
[in]attrs() As String) As ACB_RETURN_CODE

Parameters
agent

Name of the destination agent.


cpgName

Name of the destination campaign.


attrs

Array with the name and value of the attributes.

set_call_type
Associates a call type to the call.
Public Function set_call_type (
[in]call_type As String,
[in]sess_num
As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
call_type

Type of call.
sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

60

2010-03-31

uAgent OCX

set_timezone
Sets the time zone of the contact.
Public Function set_timezone (
[in]tzName
As String,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
tzName

Name of the time zone of the contact.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

start_script
Associates a data transaction to the session.
Public Function start_script (
[in]cpg_name As Variant[String],
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
cpg_name

Name of the campaign associated to the session.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

61

SQL methods
SQL methods are related to the agent and access the uCI Repository.

cursor_close
Closes a cursor opened by the method cursor_open (page 63).
Public Function cursor_close (
[in]cid
As Long,
[out]status As Long ) As ACB_RETURN_CODE

Parameters
cid

Identifier of the cursor created by the method cursor_open (page 63).


status

SQL status.

cursor_fetch
Fetches a cursor.
Public Function
[in]cid
[in]pos
[in]n
[out]rows()

cursor_fetch (
As Long,
As Long,
As Long,
As String) As ACB_RETURN_CODE

If successful, the method returns the contents of the cursor in rows.


Parameters
cid

Identifier of the cursor created by the method cursor_open (page 63).


pos

Number of the first row to fetch.


n

Number of rows to fetch.


rows

Array with the fetched row and col.

cursor_nrows
Requests the number of rows of the cursor.
Public Function cursor_nrows (
[in]cid
As Long,
[out]rRows As Long ) As ACB_RETURN_CODE

62

2010-03-31

uAgent OCX

If successful, the method returns the number of lines of the cursor.


Parameters
cid

Identifier of the cursor created by the method cursor_open (page 63).


nrows

Number of rows in the cursor.

cursor_open
Opens a cursor.
Public Function
[in]lastCid
[in]lastSel
[in]sel
[out]cid
[out]status

cursor_open (
As Long,
As String,
As String,
As Long,
As Long ) As ACB_RETURN_CODE

Parameters
lastCid

Identifier of the cursor. For a new cursor the value is -1.


lastSel

Last statement selected. Ignored if cid = -1.


sel

Statement selected.
cid

Identifier of the cursor to display.


status

SQL status.

sql_execute
Executes the SQL statement.
Public Function
[in]stat
[out]serial
[out]status

sql_execute (
As String,
As Long,
As Long ) As ACB_RETURN_CODE

Parameters
stat

SQL statement to execute.


serial

Last serial inserted.


status

SQL status.

uAgent OCX

2010-03-31

63

sql_select
Selects the SQL statement to execute.
Public Function
[in]stat
[out]status
[out]row()

sql_select (
As String,
As Long,
As String ) As ACB_RETURN_CODE

Parameters
stat

SQL statement to execute.


status

SQL status.
row

Array with the selected row and column.

64

2010-03-31

uAgent OCX

Can methods
The can methods ask the server if the operations can be executed.

can_answer
Checks whether the method answer can be invoked.
Public Function can_answer (
[out]can
As Boolean,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation answer (page 33) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_answer_data_interaction
Checks whether the method answer_data_interaction can be invoked.
Public Function can_answer_data_interaction (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation answer_data_interaction (page 42) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

can_blind_transfer
Checks whether the method blind_transfer can be invoked.
Public Function can_blind_transfer (
[out]can
As Boolean,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation blind_transfer (page 33) can be performed.

uAgent OCX

2010-03-31

65

sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_clear
Checks whether the method clear can be invoked.
Public Function can_clear (
[out]can
As Boolean,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation clear (page 34) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_clear_data_interaction
Checks whether the method clear_data_interaction can be invoked.
Public Function can_clear_data_interaction (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation clear_data_interaction (page 42) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
session with data interaction in wrap-up or returns an error if more than one session is in wrap-up.

can_conference
Checks whether the method conference can be invoked.
Public Function can_conference (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation conference (page 34) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

66

2010-03-31

uAgent OCX

can_dequeue_call
Checks whether the method dequeue_call can be invoked.
Public Function can_dequeue_call (
[out]can
As Boolean,
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

The campaign must have a dequeue reason.


Parameters
can

If TRUE, the operation dequeue_call (page 40) can be invoked.


sess_num

Optional. Identifier of the session. If the parameter is omitted, the method uses the session with data interaction
in wrap-up or returns an error if more than one session is in wrap-up.

can_dial
Checks whether the method dial can be invoked.
Public Function can_dial (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation dial (page 35) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_discard_data_transaction
Checks whether the method discard_data_transaction can be invoked.
Public Function can_discard_data_transaction (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation discard_data_transaction (page 55) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

67

can_end_data_transaction
Checks whether the method end_data_transaction can be invoked.
Public Function can_end_data_transaction (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation end_data_transaction (page 55) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_enqueue_call
Checks whether the method enqueue_call can be invoked.
Public Function can_enqueue_call(
[out]can
As Boolean,
[in)sess_num As Variant[Integer] ) As Integer

Parameters
can

If TRUE, the operation enqueue_call (page 39) can be invoked.


sess_num

Identifier of the session.

can_exit
Checks whether the method exit can be invoked.
Public Function can_exit (
[out]can As Boolean ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation exit can be performed.

can_extend
Checks whether the method extend can be invoked.
Public Function can_extend (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

68

2010-03-31

uAgent OCX

Parameters
can

If TRUE, the operation extend (page 34) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_get_campaigns
Checks whether the method get_campaigns can be invoked.
Public Function can_get_campaigns (
[out]can As Boolean ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation get_campaigns (page 28) can be performed.

can_hangup
Checks whether the method hangup can be invoked.
Public Function can_hangup (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation hangup (page 37) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_hold
Checks whether the method hold can be invoked.
Public Function can_hold (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation hold (page 37) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

69

can_load_contact
Checks whether the method load_contact can be invoked.
Public Function can_load_contact (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation load_contact (page 57) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_login
Checks whether the method login can be invoked.
Public Function can_login (
[out]can As Boolean ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation login (page 20) can be performed.

can_logout
Checks whether the method logout can be invoked.
Public Function can_logout (
[out]can As Boolean ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation logout (page 20) can be performed.

can_new_call
Checks whether the method new_call can be invoked.
Public Function can_new_call (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

70

2010-03-31

uAgent OCX

Parameters
can

If TRUE, the operation new_call (page 58) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_new_contact
Checks whether the method new_contact can be invoked.
Public Function can_new_contact (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation new_contact (page 58) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_retrieve
Checks whether the method retrieve can be invoked.
Public Function can_retrieve (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation retrieve (page 38) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_set_extension
Checks whether the method set_extension can be invoked.
Public Function can_set_extension (
[out]can As Boolean)

Parameters
can

If TRUE, the operation set_extension (page 24) can be performed.

uAgent OCX

2010-03-31

71

can_set_not_ready
Checks whether the method set_not_ready can be invoked.
Public Function can_set_not_ready (
[out]can
As Boolean
[in]cpg_name As Variant[String] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation set_not_ready (page 31) can be performed.


cpg_name

Optional. Name of the campaign. If omitted, the method performs the request at the agent level.

can_set_ready
Checks whether the method set_ready can be invoked.
Public Function can_set_ready (
[out]can
As Boolean
[in]cpg_name As Variant[String] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation set_ready (page 31) can be performed.


cpg_name

Optional. Name of the campaign. If omitted, the method performs the request at the agent level.

can_sign_off
Checks whether the method sign_off can be invoked.
Public Function can_sign_off (
[in]campaignName As String,
[out]can
As Boolean ) As ACB_RETURN_CODE

Parameters
campaignName

Name of the campaign.


can

If TRUE, the operation sign_off (page 31) can be performed.

72

2010-03-31

uAgent OCX

can_sign_on
Checks whether the method sign_on can be invoked.
Public Function can_sign_on (
[in]campaignName As String,
[out]can
As Boolean ) As ACB_RETURN_CODE

Parameters
campaignName

Name of the campaign.


can

If TRUE, the operation sign_on (page 31) can be performed.

can_start_record
Checks whether the method start_record can be invoked.
Public Function can_start_record (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation start_record (page 41) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_start_script
Checks whether the method start_script can be invoked.
Public Function can_start_script (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation start_script (page 61) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

73

can_start_session
Checks whether the method start_session can be invoked.
Public Function can_start_session (
[in]cpg_name As Variant[String],
[out]can
As Boolean ) As ACB_RETURN_CODE

Parameters
cpg_name

Name of the campaign.


can

If TRUE, the operation start_session (page 32) can be performed.

can_stop_record
Checks whether the method stop_record can be invoked.
Public Function can_stop_record (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation stop_record (page 41) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

can_supervisor_help
Checks whether the method supervisor_help can be invoked.
Public Function can_supervisor_help (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation supervisor_help (page 38) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

74

2010-03-31

uAgent OCX

can_transfer
Checks whether the method transfer can be invoked.
Public Function can_transfer (
[out]can
As Boolean
[in]sess_num As Variant[Integer] ) As ACB_RETURN_CODE

Parameters
can

If TRUE, the operation transfer (page 38) can be performed.


sess_num

Optional. Index of the session in the global session array. If the parameter is omitted, the method uses the
latest telephony session, when existing, or the latest session created.

uAgent OCX

2010-03-31

75

Events
An event is an action recognized by an object. You can write event handlers. You can generate events by clicking
the mouse, by pressing a key, or by program code. The system can also generate events. uAgent OCX makes the
Automation server events available allowing the user application to respond to most of the actions executed by the
Assisted Server.

CampaignActivated
Notifies that the campaign on the Assisted Server is activated.
Public Event CampaignActivated (
cpg_name As Variant[String] )

The event is generated at the ICampaign interface level. Campaign operations will be allowed again.
Parameters
cpg_name

Name of the campaign to activate.

CampaignAvailable
Indicates that a campaign is available on the Assisted Server.
Public Event CampaignAvailable(
campaignName As String)

This event is generated at the ICampaign interface level.


Parameters
campaignName

Name of the campaign.

CampaignClosed
Notifies that the campaign on the Assisted Server is closed.
Public Event CampaignClosed (
cpg_name As Variant[String] )

The event is generated at the ICampaign interface level. Any references to the campaign in the global array of the
campaigns will be deleted.
Parameters
cpg_name

Name of the campaign to close.

76

2010-03-31

uAgent OCX

CampaignSuspended
Notifies that the campaign on the Assisted Server is suspended.
Public Event CampaignSuspended (
cpg_name As Variant[String] )

The event is generated at the ICampaign interface level. uAgent OCX keeps campaign references allowing operations
on the campaign after the campaign is activated on the server.
Parameters
cpg_name

Name of the campaign to suspend.

CampaignUnavailable
Indicates that a campaign was closed on the Assisted Server.
Public Event CampaignUnavailable(campaignName As String)

Parameters
campaignName

Name of the campaign.

CampaignUnavailableSuspended
Indicates that a campaign not open by the agent was suspended on the Assisted Server.
Public Event CampaignUnavailableSuspended(campaignName As String)

Parameters
campaignName

Name of the campaign.

DataEvent
Notifies that data is added to the session.
Public Event DataEvent (
session_id As Integer,
i_attrs() As String,
phones()
As String )

The event is generated at the ISession interface level. The event can happen when calling the method start_script
(page 61).

uAgent OCX

2010-03-31

77

Parameters
session_id

Index of the session in the global session array.


i_attrs

Array with the name and value of the campaign attributes.


phones

Array with the name and value of the phone attributes.

DataInteractionEvent
Notifies that a data interaction event has occurred and reports the resulting data interaction status.
Public Event DataInteractionEvent (
session_id As Integer,
diState
As OCX_DATA_INTERACTION_STATE )

This event is generated at the ISession interface level.


Parameters
session_id

Index of the session in the global session array.


diState

Status of the session data interaction. Returns one type of OCX_DATA_INTERACTION_STATE, as shown
below.
The states of the data interaction are as follows:
Public Enum OCX_DATA_INTERACTION_STATE
DIS_ALERTING
= 0,
DIS_WRAPUP
= 1,
DIS_CLEARED
= 2,
DIS_CLEARED_DELIVERED = 3
End Enum

DataInteractionProgressEvent
Notifies that a pending data interaction operation has evolved.
Public Event DataInteractionProgressEvent (
session_id
As Integer,
diRequest
As OCX_DATA_INTERACTION_REQUEST,
diProgress
As OCX_DATA_INTERACTION_PROGRESS,
user
As String,
dataInteractionId As Long,
mailId
As Long )

This event is generated at the ISession interface level.


Parameters
session_id

Index of the session in the global session array.


diRequest

Request originated by the progress event.

78

2010-03-31

uAgent OCX

diProgress

Progress occurred.
user

Name of the destination agent.


dataInteractionId

Identifier of the data interaction.


mailId

Identifier of the email.


The originated requests are the following:
Public Enum OCX_DATA_INTERACTION_REQUEST
DIR_CREATE
= 0,
DIR_PICKUP
= 1
End Enum

The occurred progresses are the following:


Public Enum OCX_DATA_INTERACTION_PROGRESS
DIP_KO_NO_ANSWER
= 0,
DIP_KO_NO_AGENT
= 1,
DIP_KO_DELIVERED
= 2,
DIP_KO_UNABLE_TO_DELIVER = 3
End Enum

DataTransactionEnd
Notifies that uAgent Windows ended the data transaction.
Public Event DataTransactionEnd (
session_id As Integer,
discard
As Boolean,
attrs()
As String,
phones()
As String )

The event is generated at the ISession interface level. If the telephony state of the session is PHS_CLEARED and the
session does not have associated data, the session reference is cleared and no more operations are possible.
Parameters
session_id

Index of the session in the global session array.


discard

Committing state of the session. If TRUE, the data transaction was discarded.
attrs

Array with the name and value of the attributes.


phones

Array with the name and value of the phone attributes.

ConnectionState
Notifies the controller about the state of the connection to the Assisted Server.The event allows your program to
recover from transient failures.
Public Event ConnectionState(state As OCX_CONN_STATE)

uAgent OCX

2010-03-31

79

Parameters
state

New state of the connection to the Assisted Server.


The values of OCX_CONN_STATE as follows:
CONN_STATE_FORCED_LOGOUT

The connection to the server failed because the recovery system is off, the recovery tries were unsuccessful,
the server sent a forced logout event, or one of the controllers asked for a forced logout.
CONN_STATE_SERVER_DOWN

The connection is down, but the recovery has been activated.


CONN_STATE_SERVER_UP

The connection is up.

ExtensionCleared
Notifies that the extension of the agent is cleared.
Public Event ExtensionCleared()

This event is generated at the ICampaign interface level.

FeatureInvoked
Notifies that a phone feature for the campaign has been invoked.
Public Event FeatureInvoked (
cpg_name As Variant[String],
status
As OCX_GROUP_PHONE_STATE )

The event is generated at the ICampaign interface level. If the agent has requested the wrap-up on the uAgent OCX
Timer interface, uAgent OCX terminates the extend request and sets the agent ready to receive calls.
Parameters
cpg_name

Name of the campaign.


status

Phone status of the agent, as defined below.


The phone states of the agent are the following:
Public Enum OCX_GROUP_PHONE_STATE
GPS_SIGNED_OFF_READY
= 0,
GPS_SIGNED_OFF_NOT_READY = 1,
GPS_SIGNED_ON_READY
= 2,
GPS_SIGNED_ON_NOT_READY = 3
End Enum

FeatureProgress
Invokes a phone feature progress.
Public Event FeatureProgress (
cpg_name As Variant[String],

80

2010-03-31

uAgent OCX

feature
prog

As OCX_GROUP_PHONE_REQUEST,
As OCX_GROUP_PHONE_PROGRESS )

The event is generated at the ICampaign interface level.


Parameters
cpg_name

Name of the campaign.


feature

Requested feature.
prog

Progress occurred.
The requested features are the following:
Public Enum OCX_GROUP_PHONE_REQUEST
GRP_SIGN_ON
= 0,
GRP_SIGN_OFF = 1,
GRP_READY
= 2,
GRP_NOT_READY = 3
End Enum

The progresses occurred are the following:


Public Enum OCX_GROUP_PHONE_PROGRESS
GPP_KO_UNKNOWN
= 0,
GPP_KO_SWITCH_ERROR = 1
End Enum

PhoneEvent
Notifies the occurrence of a phone event and reports the resulting phone status.
Public Event PhoneEvent(
session_id
As Integer,
phoneState
As OCX_PHONE_STATE,
isRecording As Boolean,
isEnqueued
As Boolean,
isHandedOff As Boolean )

The event is generated at the ISession interface level. If the event is the first phone event, telephony has been added
to the session and related data can be fetched. If the telephony state of the session is PHS_CLEARED and the session
does not have associated data, the reference to the session is cleared and no more operations are possible.
Parameters
session_id

Index of the session in the global session array.


phoneState

Phone state of the session. Returns one type of OCX_PHONE_STATE, as shown below.
isRecording

If TRUE, the call is being recorded.


isEnqueued

If TRUE, the call is enqueued.


isHandedOff

If TRUE, the call is handed-off.

uAgent OCX

2010-03-31

81

The phone states are as follows:


Public Enum OCX_PHONE_STATE
PHS_ALERTING
PHS_CONNECTED
PHS_HELD
PHS_EXTENDED
PHS_DIALING
PHS_DISCONNECTED
PHS_CLEARED
PHS_DIAL_REQUEST_PENDING
PHS_ROUTING
PHS_SETUP
End Enum

=
=
=
=
=
=
=
=
=
=

0,
1,
2,
3,
4,
5,
6,
7,
8,
9

PhoneProgressEvent
Indicates that a phone progress event occurred in the session.
Public Event PhoneProgressEvent (
session_id As Integer,
phoneReq
As OCX_PHONE_REQUEST,
prog
As OCX_PHONE_PROGRESS )

The event is generated at the ISession interface level.


Parameters
session_id

Identifier of the session.


phoneReq

Originated request.
prog

Occurred progress.
The originated requests are the following:
Public Enum OCX_PHONE_REQUEST
PHR_ANSWER_CALL
PHR_DISCONNECT_CALL
PHR_HOLD_CALL
PHR_EXTEND_CALL
PHR_RETRIEVE_CALL
PHR_DIAL
PHR_TRANSFER_CALL
PHR_TRANSFER_EXTENDED_CALL
PHR_CONFERENCE_CALL
PHR_CLEAR_CALL
PHR_START_RECORD
PHR_STOP_RECORD
PHR_ENQUEUE_CALL
PHR_DEQUEUE_CALL
PHR_DIVERT_CALL
PHR_SUPERVISOR_HELP
PHR_HANDED_OFF
PHR_RETRIEVED_HAND_OFF
PHR_AUTO_START_RECORD
End Enum

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18

The occurred progresses are the following:


Public Enum OCX_PHONE_PROGRESS
PHP_KO_UNKNOWN
PHP_KO_SWITCH_ERROR
PHP_KO_LINE_OVERFLOW
PHP_KO_BUSY
PHP_KO_NO_ANSWER

82

2010-03-31

=
=
=
=
=

0,
1,
2,
3,
4,

uAgent OCX

PHP_KO_MACHINE_ANSWER
PHP_KO_NO_AGENT
PHP_KO_INVALID_NUMBER
PHP_KO_FAILED_RECORDING_START
PHP_KO_CALL_OVERFLOWED
PHP_KO_INBOUND_REJECTED
PHP_KO_FAILED_FAX
PHP_KO_FAILED_MODEM
PHP_KO_MEDIA_OPERATION_STOPPED
PHP_KO_DIGITS_COLLECTED
PHP_KO_GENERIC_DATA_RECEIVED
PHP_KO_HANDED_OFF
PHP_KO_RETURNED_HAND_OFF
PHP_KO_FAILED_HAND_OFF
PHP_KO_FAILED_RETRIEVE_HAND_OFF
PHP_OK_CALL_CONFERENCED
PHP_OK_CALL_ROUTED
PHP_OK_REMOTE_RING
PHP_OK_REMOTE_ANSWER
PHP_OK_REMOTE_DISCONNECTED
PHP_KO_FAILED_AUTO_REC_START
End Enum

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25

SendMailEvent
Notifies that an email was sent.
Public Event sendMailEvent (
session_id As Integer,
mailId
As Long )

This event is generated at the ISession interface level.


Parameters
session_id

Index of the session in the global session array.


mailId

Identifier of the email.

SessionClearedEvent
Indicates that a session cleared event has occurred in the session.
Event SessionClearedEvent (
session_id As Integer )

Parameters
session_id

Index of the session in the global session array.

SessionEvent
Indicates that a new session has started.
Public Event SessionEvent (
cpg_name
As Variant[String],

uAgent OCX

2010-03-31

83

session_id
i_listAttributes()
i_listPhones()
i_phonestate
i_isRec
i_isEnqueue
i_di_state
i_hasMail
i_hasWeb
i_PreviewMode

As
As
As
As
As
As
As
As
As
As

Integer,
String,
String,
OCX_PHONE_STATE,
Boolean,
Boolean,
OCX_DATA_INTERACTION_STATE,
Boolean,
Boolean,
Boolean )

The event is generated at the ICampaign interface level.


Parameters
cpg_name

Name of the campaign.


session_id

Index of the session in the global session array.


i_listAttributes

Array with the attributes name and value.


i_listPhones

Array with the phone attributes name and value.


i_phonestate

Phone state of the session, as defined below. Returns one type of OCX_PHONE_STATE, as shown below.
isEnqueue

State of the queued session.


i_isRec

Recording state of the session.


i_di_state

Data interaction state of the data interaction. Returns one type of OCX_DATA_INTERACTION_STATE, as
shown below.
i_hasMail

If TRUE, the session has email data.


i_hasWeb

If TRUE, the session has Web collaboration data.


i_PreviewMode

If TRUE, the session has preview data.


The phone states are as follows:
Public Enum OCX_PHONE_STATE
PHS_ALERTING
PHS_CONNECTED
PHS_HELD
PHS_EXTENDED
PHS_DIALING
PHS_DISCONNECTED
PHS_CLEARED
PHS_DIAL_REQUEST_PENDING
PHS_ROUTING
PHS_SETUP
End Enum

=
=
=
=
=
=
=
=
=
=

0,
1,
2,
3,
4,
5,
6,
7,
8,
9

The states of the data interaction are as follows:


Public Enum OCX_DATA_INTERACTION_STATE
DIS_ALERTING
= 0,
DIS_WRAPUP
= 1,
DIS_CLEARED
= 2,
DIS_CLEARED_DELIVERED = 3
End Enum

84

2010-03-31

uAgent OCX

SessionPhoneEvent
Indicates that a session with only telephony has started.
Public Event SessionPhoneEvent (
session_id As Integer,
phstate
As OCX_PHONE_STATE,
isRecording As Boolean,
isEnqueued As Boolean )

Parameters
session_id

Index of the session in the global session array.


phstate

Phone state of the session. Returns one type of OCX_PHONE_STATE, as shown below.
isRecording

Recording state of the session.


isEnqueued

State of the queued session.


The phone states are as follows:
Public Enum OCX_PHONE_STATE
PHS_ALERTING
PHS_CONNECTED
PHS_HELD
PHS_EXTENDED
PHS_DIALING
PHS_DISCONNECTED
PHS_CLEARED
PHS_DIAL_REQUEST_PENDING
PHS_ROUTING
PHS_SETUP
End Enum

=
=
=
=
=
=
=
=
=
=

0,
1,
2,
3,
4,
5,
6,
7,
8,
9

UserMessage
Notifies that the supervisor sent a message to the agent.
Public Event UserMessage (
message As String )

Parameters
message
Message sent by the supervisor.

uAgent OCX

2010-03-31

85

uAgent OCX enumerated types


The methods of uAgent OCX can return error messages. Errors are grouped by enumerated types.

OLE_AM_ERROR
The enumerated type OLE_AM_ERROR defines the following errors:
OLE_ERR_INVALID_PASSWORD
OLE_ERR_NOT_FOUND
OLE_ERR_ALREADY_LOGGED
OLE_ERR_NOT_AVAILABLE
OLE_ERR_NOT_READY
OLE_ERR_EXT_OCCUPIED
OLE_ERR_REACHING_CALL
OLE_ERR_READY
OLE_ERR_CALL
OLE_ERR_ALRDY_OPEN
OLE_ERR_NOMORE_PRED
OLE_ERR_WORK_NFOUND
OLE_ERR_EXT_NOT_SET
OLE_ERR_NOPHCALL
OLE_ERR_COMMERROR
OLE_ERR_NO_LICENSE
OLE_ERR_FULL_FIELD
OLE_ERR_FULL_EVENT
OLE_ERR_UNK_ACTION
OLE_ERR_PBX_ERROR
OLE_ERR_UNK_SESSION
OLE_ERR_UNK_CPNAME
OLE_ERR_NIL_SESSION_AGENT
OLE_ERR_END_W_PHCALL
OLE_ERR_DIAL_WITH_PHONE_UP
OLE_ERR_NO_NUMBER
OLE_ERR_AGENT_NODEF_EXT
OLE_ERR_QRY_OVERFLOW
OLE_ERR_NO_CALL
OLE_ERR_DB_ERROR
OLE_ERR_ALREADY_CLOSED
OLE_ERR_OPENED_CALL
OLE_ERR_CAMPAIGN_OPEN
OLE_ERR_FATAL_ERROR
OLE_ERR_UNK_AGENT
OLE_ERR_ALRD_WITH_SCRIPT
OLE_ERR_END_W_DATA
OLE_ERR_WORK_CLOSED
OLE_ERR_INVALID_FEATURE
OLE_ERR_END_UNK_SCRIPT
OLE_ERR_UNK_DIAL_RULE
OLE_ERR_UNK_TIMEZONE
OLE_ERR_INSTANCE_NOT_NULL
OLE_ERR_DATUM_SIZE
OLE_ERR_INVALID_AG_TYPE
OLE_ERR_LICENSE_NOT_BOUND
OLE_ERR_UNK_CALL_TYPE
OLE_ERR_UNK_SUPERVISOR
OLE_ERR_UNK_REASON
OLE_ERR_UNK_SKILL_PROFILE
OLE_ERR_UNK_SKILL
OLE_ERR_UNK_REQUEST_PENDING
OLE_ERR_UNK_ALREADY_IN_STATE
OLE_ERR_ADMIN_MODE
OLE_ERR_UNKNOWNCAMPAIGN
OLE_ERR_NOAGENTAVAILABLE

86

2010-03-31

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

4002,
4003,
4004,
4005,
4006,
4007,
4008,
4009,
4010,
4012,
4013,
4014,
4016,
4018,
4022,
4025,
4026,
4027,
4028,
4029,
4030,
4031,
4033,
4034,
4035,
4036,
4037,
4038,
4039,
4040,
4043,
4044,
4045,
4046,
4047,
4048,
4049,
4050,
4051,
4052,
4053,
4054,
4055,
4056,
4057,
4058,
4059,
4060,
4061,
4062,
4063,
4064,
4065,
4066,
4067,
4068,

uAgent OCX

OLE_ERR_NODI
OLE_ERR_UNKMAIL

= 4069,
= 4070

OLE_COMMS_ERROR
The enumerated type OLE_COMMS_ERROR defines the following errors:
OLE_ERR_ACCTO
OLE_ERR_UNDEF_SOCKET
OLE_ERR_UNKNOWN_HOST
OLE_ERR_WRONG_PROTOCOL
OLE_ERR_STRNULL
OLE_ERR_RPC_CRT
OLE_ERR_RC_UNK
OLE_ERR_SERVER_UNK
OLE_ERR_CONNRESET
OLE_ERR_WIN_MPI

=
=
=
=
=
=
=
=
=
=

5003,
5004,
5005,
6012,
6013,
6014,
6015,
6016,
6017,
6018

OLE_DB_ERROR
The enumerated type OLE_DB_ERROR defines the following errors:
OLE_ERR_NOSPACE
OLE_ERR_SQLERROR
OLE_ERR_NOTFOUND
OLE_ERR_DESCRIBE
OLE_ERR_NOSERVER
OLE_ERR_RPC_ERROR

=
=
=
=
=
=

501,
502,
503,
504,
505,
506

OLE_LC_ERROR
The enumerated type OLE_LC_ERROR defines the following errors:
OLE_ERR_CONTACT
OLE_ERR_CAMPAIGN
OLE_ERR_ERROR_NOTFOUND
OLE_ERR_LOCKED
OLE_ERR_ATTRS
OLE_ERR_EVENTS

=
=
=
=
=
=

1002,
1003,
1004,
1005,
1006,
1007

OLE_PBX_ERROR
The enumerated type OLE_PBX_ERROR defines the following errors:
OLE_ERR_UNKNOWN
OLE_ERR_SWITCHSPECIFICERROR
OLE_ERR_AGENTINUSE
OLE_ERR_CAMPAIGNHASEXTENSIONS
OLE_ERR_CAMPAIGNUNKNOWN
OLE_ERR_EXTENSIONINCAMPAIGN
OLE_ERR_EXTENSIONINUSE
OLE_ERR_EXTENSIONNOTREADY
OLE_ERR_EXTENSIONNOTSIGNEDON
OLE_ERR_INVALIDCALLEDNUMBER
OLE_ERR_INVALIDCALLID
OLE_ERR_INVALIDEXTENSION
OLE_ERR_INVALIDEXTENSIONFEATURE
OLE_ERR_INVALIDGATEWAYFEATURE

=
=
=
=
=
=
=
=
=
=
=
=
=
=

uAgent OCX

2001,
2002,
2003,
2004,
2005,
2006,
2007,
2008,
2009,
2011,
2012,
2013,
2014,
2015,

2010-03-31

87

OLE_ERR_INVALIDPROFILE
OLE_ERR_INVALIDSWITCHDESCRIPTOR
OLE_ERR_NOAGENTINEXTENSION
OLE_ERR_NOTALERTING
OLE_ERR_NOTCONNECTED
OLE_ERR_NOTCONNECTED2PROFILEAGENT
OLE_ERR_NOTDISCONNECTABLE
OLE_ERR_NOTEXTENDED
OLE_ERR_NOTINTRANSACTION
OLE_ERR_NOTONHOLD
OLE_ERR_PILOTUNKNOWN
OLE_ERR_WRONGDATACONSTRUCT
OLE_ERR_TIMEOUTINOPERATION
OLE_ERR_PROFILEINUSE
OLE_ERR_SYSTEM_ERROR
OLE_ERR_EXTENSION_INVALID
OLE_ERR_EXTENSION_NOT_SET
OLE_ERR_EXTENSION_UNKNOWN_ERROR
OLE_ERR_INVALID_GROUP
OLE_ERR_INVALID_SWITCH
OLE_ERR_INVALID_CAMPAIGN_ID
OLE_ERR_INVALID_CALL
OLE_ERR_NUMBER_UNK
OLE_ERR_RESERVE
OLE_ERR_EXTENSION_NOT_EXPORTED
OLE_ERR_INVALID_AGENT
OLE_ERR_NOEXTENSION
OLE_ERR_NOT_CONNECTED
OLE_ERR_CONTEXT_NOT_FOUND
OLE_ERR_SWITCHD_MISMATCH
OLE_ERR_NOT_ROUTING
OLE_ERR_ROUTING
OLE_ERR_ALREADYEXTENDED
OLE_ERR_LINEOVERFLOW
OLE_ERR_RECORDINGINPROGRESS
OLE_ERR_NORECORDINGINPROGRESS
OLE_ERR_NOAVAILABLERECORDINGCHANNEL
OLE_ERR_ERRORINRECORDINGPROCESS
OLE_ERR_ERRORNOTENQUEUED
OLE_ERR_ERRORALREADYENQUEUED
OLE_ERR_INCOMPATIBLE_PROFILE
OLE_ERR_INCOMPATIBLE_DATA
OLE_ERR_CALL_AGENTUNAVAILABLE
OLE_ERR_CALL_CAMPAIGNISSUSPENDED
OLE_ERR_CALL_DELIVERINPROGRESS
OLE_ERR_CALL_EXTENSIONNOTSIGNEDON
OLE_ERR_CALL_INVALIDEXTENSION
OLE_ERR_CALL_INVALIDNATIVEPREDICTIVEDEVICE
OLE_ERR_CALL_INVALIDTHREADID
OLE_ERR_CALL_NOAGENTINEXTENSION
OLE_ERR_CALL_REQUESTISNOTALLOWED
OLE_ERR_CALL_NOAGENTWITHPROFILE
OLE_ERR_CALL_UNEXPORTEDNUMBER
OLE_ERR_CAMPAIGN_DEVICEISINUSE
OLE_ERR_CAMPAIGN_INCOMPATIBLEPROFILE
OLE_ERR_CAMPAIGN_INVALIDDNIS
OLE_ERR_CAMPAIGN_INVALIDLOGINGROUP
OLE_ERR_CAMPAIGN_INVALIDMAPPINGGROUP
OLE_ERR_CAMPAIGN_INVALIDMONITOREDDEVICES
OLE_ERR_CTI_GATEWAYSPECIFICERROR
OLE_ERR_CTI_NOTCONFIGURED
OLE_ERR_CTI_UNEXPORTEDNUMBER
OLE_ERR_EXTENSION_INVALIDCAMPAIGNID
OLE_ERR_EXTENSION_ISLOCKED
OLE_ERR_EXTENSION_UNKNOWNGROUPASSOCIATION
OLE_ERR_SIMULATOR_INVALIDCHECKSUM
OLE_ERR_SIMULATOR_INVALIDDNIS
OLE_ERR_SIMULATOR_INVALIDGENERATORDISTRIBUTION
OLE_ERR_SWITCH_DEBUGFILEERROR
OLE_ERR_SWITCH_DEVICEISINUSE
OLE_ERR_SWITCH_DEVICEKINDISNOTSUPPORTED
OLE_ERR_SWITCH_DUPLICATEDDEVICENUMBER
OLE_ERR_SWITCH_EXTENSIONLISTISEMPTY

88

2010-03-31

uAgent OCX

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

2016,
2017,
2018,
2019,
2020,
2021,
2022,
2023,
2024,
2025,
2026,
2027,
2028,
2029,
2030,
2031,
2032,
2033,
2034,
2035,
2036,
2037,
2038,
2039,
2040,
2041,
2042,
2043,
2044,
2045,
2046,
2047,
2048,
2049,
2050,
2051,
2052,
2053,
2054,
2055,
2056,
2057,
2100,
2101,
2102,
2103,
2104,
2105,
2106,
2107,
2108,
2109,
2110,
2200,
2201,
2202,
2203,
2204,
2205,
2300,
2301,
2302,
2400,
2401,
2402,
2500,
2501,
2502,
2601,
2603,
2604,
2605,
2606,

OLE_ERR_SWITCH_GATTYPENOTSUPPORTED
OLE_ERR_SWITCH_LINEIDINACCESSMAPPINGWASNOTFOUND
OLE_ERR_SWITCH_MONITORONDEVICEFAILED
OLE_ERR_SWITCH_REQUESTISNOTALLOWED
OLE_ERR_SWITCH_UNABLETOMODIFYCHANNELLIST
OLE_ERR_SWITCH_UNABLETOMODIFYCONNECTIONTYPE
OLE_ERR_SWITCH_UNABLETOMODIFYDEBUGCTIAPI
OLE_ERR_SWITCH_UNABLETOMODIFYDEVICEDEFINITION
OLE_ERR_SWITCH_UNABLETOMODIFYDIALERLIST
OLE_ERR_SWITCH_UNABLETOMODIFYEXTENSIONLIST
OLE_ERR_SWITCH_UNABLETOMODIFYMONITORMODE
OLE_ERR_SWITCH_UNABLETOMODIFYSWITCHGATEWAYTYPE
OLE_ERR_SWITCH_UNABLETOMODIFYSWITCHID
OLE_ERR_SWITCH_UNABLETOMODIFYSWITCHSERVERNAME
OLE_ERR_SWITCH_UNABLETOMODIFYUSERLOGIN
OLE_ERR_SWITCH_UNABLETOMODIFYUSERPASSWORD
OLE_ERR_SWITCH_UNABLETOMODIFYCTILINK
OLE_ERR_PBX_NO_LICENSE

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

2607,
2608,
2609,
2610,
2611,
2612,
2613,
2614,
2615,
2616,
2617,
2618,
2619,
2620,
2621,
2622,
2623,
2700

OLE_ETALK_ERROR
The enumerated type OLE_ETALK_ERROR defines the following errors:
OLE_ERR_ERROR_InvalidOperation
OLE_ERR_PhRequest_NoCall
OLE_ERR_ERROR_LoadContactNoCampaign
OLE_ERR_ERROR_CallAlreadyLoaded
OLE_ERR_COLE_ERR_AsynchInitError
OLE_ERR_COMM_FAILURE
OLE_ERR_CPGDLG_Closed
OLE_ERR_ERROR_EndingCall

=
=
=
=
=
=
=
=

1,
2,
3,
4,
5,
6,
7,
8

OLE_RUNNER_ERROR
The enumerated type OLE_RUNNER_ERROR defines the following errors:
OLE_ERR_USER_UNKNOWN_ERROR
OLE_ERR_USER_INVALID_BOOL_NUMBER
OLE_ERR_USER_INVALID_BOOL_TEXT
OLE_ERR_USER_NO_EXTERNAL_DLL
OLE_ERR_USER_INVALID_DATE
OLE_ERR_USER_MALFORMED_DATE
OLE_ERR_USER_INVALID_DATETIME
OLE_ERR_USER_MALFORMED_DATETIME
OLE_ERR_USER_NUMBER_TO_BIG
OLE_ERR_USER_NON_COMPLETE_NUMBER
OLE_ERR_USER_INVALID_NUMBER
OLE_ERR_USER_DIVISION_BY_ZERO
OLE_ERR_USER_INVALID_ACTION_IN_FUNCTION
OLE_ERR_USER_UNKNOWN_NODE
OLE_ERR_USER_NONODE_TO_BACK
OLE_ERR_USER_NONODE_TO_RETURN
OLE_ERR_USER_INV_XCALL_RETURNS
OLE_ERR_USER_INV_XCALL_NAME
OLE_ERR_USER_NO_CURRNODE
OLE_ERR_USER_PROG_CURSOR_DUPL
OLE_ERR_USER_PROG_CURSOR_UNK
OLE_ERR_USER_UNOPENED_PROG_CURSOR
OLE_ERR_USER_NEG_NKEY_LOOKUP
OLE_ERR_USER_NULL_NODE_NAME
OLE_ERR_USER_UNK_NODE_NAME
OLE_ERR_USER_NULL_FETCH_POS
OLE_ERR_USER_NULL_LOADCT_EASYCODE
OLE_ERR_USER_INVALID_TIME
OLE_ERR_USER_MALFORMED_TIME

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

3010,
3011,
3012,
3013,
3014,
3015,
3016,
3017,
3019,
3020,
3021,
3022,
3023,
3024,
3025,
3026,
3028,
3029,
3030,
3031,
3032,
3033,
3035,
3036,
3037,
3038,
3039,
3040,
3041,

uAgent OCX

2010-03-31

89

OLE_ERR_USER_NULL_OPERANDS
OLE_ERR_USER_NO_EXTERNAL_FUNCS
OLE_ERR_USER_EXT_FUNC_ERROR
OLE_ERR_USER_MISTYPED_EXT_FUNC_RETURN
OLE_ERR_USER_NO_EXTERNAL_PROCS
OLE_ERR_USER_EXT_PROC_ERROR
OLE_ERR_USER_FETCHING_UNOPENED_CURSOR
OLE_ERR_USER_INV_NUMBER_RANGE
OLE_ERR_USER_UNRECOGNIZED_EXCEPTION
OLE_ERR_USER_INVALID_CBOX_VALUE
OLE_ERR_USER_UNK_ATTR
OLE_ERR_USER_REQUIRED_ATTR
OLE_ERR_USER_INVALID_ATTR
OLE_ERR_USER_ERROR
OLE_ERR_EREC_cant_create_storage
OLE_ERR_EREC_cant_load_dll
OLE_ERR_EREC_invalid_script_dll
OLE_ERR_EREC_upgrade_runner
OLE_ERR_EREC_regenerate_dll
OLE_ERR_EREC_unimplemented_callback
OLE_ERR_EREC_cant_connect
OLE_ERR_EREC_scripts_pending
OLE_ERR_EREC_cant_load_conn_script
OLE_ERR_EREC_sessions_pending
OLE_ERR_EREC_campaign_already_set
OLE_ERR_EREC_unk_file_extension
OLE_ERR_EREC_cant_create_session
OLE_ERR_EREC_cant_create_window
OLE_ERR_EREC_contact_already_set
OLE_ERR_EREC_cant_post_message
OLE_ERR_EREC_cant_open_text_file
OLE_ERR_EREC_incomplete_parsing
OLE_ERR_EREC_parse_error
OLE_ERR_EREC_analyse_failed
OLE_ERR_EREC_ext_proc_null_arg
OLE_ERR_EREC_cant_call_null_proc
OLE_ERR_EREC_ext_proc_c_exception
OLE_ERR_EREC_cant_global_alloc
OLE_ERR_EREC_recompile_dll
OLE_ERR_USER_NULL_ARRAY_INDEX
OLE_ERR_USER_NULL_ARRAY_DIMENSION
OLE_ERR_USER_ARRAY_INDEX_OUT_OF_BOUNDS
OLE_ERR_USER_INVALID_SAVE_FILE
OLE_ERR_NO_BOARD_ACCESS
OLE_ERR_MALFORMED_AUDIO
OLE_ERR_UNKNOWN_AUDIO
OLE_ERR_UNKNOWN_TIMER
OLE_ERR_INVALID_IVR_FUNCTION

90

2010-03-31

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

uAgent OCX

3042,
3043,
3044,
3045,
3046,
3047,
3048,
3050,
3051,
3052,
3053,
3054,
3055,
3056,
3057,
3058,
3059,
3060,
3061,
3062,
3063,
3064,
3065,
3067,
3068,
3069,
3070,
3071,
3072,
3073,
3074,
3075,
3076,
3077,
3078,
3079,
3080,
3081,
3082,
3083,
3084,
3085,
3086,
3100,
3104,
3107,
3108,
3109

Index
A
ACB_RETURN_CODE 8
agent
ACD state 80
exit 23, 68
extension 23, 24, 71, 80
information 21
list 29
login 20, 70
logout 20, 70
message 85
name 23
password 24
ready 21, 25, 31, 72
sign off 31, 72
sign on 31, 73
answer 33
answer_data_interaction 42
Assisted Server
timezone 24

B
blind_transfer 33

C
call
ACD 21
answer 33, 65
blind data 36
blind transfer 33, 65
clear 34, 66
conference 34, 66
dequeue 40, 67
dial 35, 58, 59, 67, 70
DNIS 36
enqueue 39, 40, 68
event 81, 82
extend 34, 38, 68
hang up 37, 69
hold 37, 38, 69
phone number 36
record 41, 73, 74
retrieve 71
send DTMF 39
state 30, 37
supervisor help 38, 74
transfer 38, 75
campaign
activate 76
agent 29
available 76, 77
close 28, 76
email 30
information 27
list 28, 69

campaign (continued)
message of the day 30
name 28
open 27
start session 74
suspend 77
CampaignActivated (event) 76
CampaignAvailable (event) 76
CampaignClosed (event) 76
CampaignSuspended (event) 77
CampaignUnavailable (event) 77
CampaignUnavailableSuspended (event) 77
can_answer 65
can_answer_data_interaction 65
can_blind_transfer 65
can_clear 66
can_clear_data_interaction 66
can_conference 66
can_dial 67
can_discard_data_transaction 67
can_end_data_transaction 68
can_enqueue_call 68
can_exit 68
can_extend 68
can_get_campaigns 69
can_hangup 69
can_hold 69
can_load_contact 70
can_login 70
can_logout 70
can_new_call 70
can_new_contact 71
can_retrieve 71
can_set_extension 71
can_set_not_ready 72
can_set_ready 72
can_sign_off 72
can_sign_on 73
can_start_record 73
can_start_script 73
can_start_session 74
can_stop_record 74
can_supervisor_help 74
can_transfer 75
change_password 24
clear 34
clear_data_interaction 42
close_campaign 28
conference 34
ConnectionState (event) 79
contact
code 56, 60
insert 58, 71
load 57, 70
time zone 56, 61
user id 22
count_outgoing_mails_gui 43
create_data_interaction 43

uAgent OCX

2010-03-31

91

cursor
close 62
fetch 62
number of rows 62
open 63
cursor_close 62
cursor_fetch 62
cursor_nrows 62
cursor_open 63

ETALK_PRESENTATION_ERROR 8
ETALK_SESSION_ERROR 8
ETALK_SET_EXT_ERROR 8
ETALK_VB_ERROR 8
exit_talk 23
extend 34
ExtensionCleared (event) 80

FeatureInvoked (event) 80
FeatureProgress (event) 80
forward_gui 44

data interaction
answer 42, 65
clear 42, 66
create 43
destroy 44
position 40
progress 78
state 42, 78
data transaction
call type 60
discard 55, 67
end 55, 68, 79
outcome 60
restart 43
send data 60
start script 61, 73
DataEvent (event) 77
DataInteractionEvent (event) 78
DataInteractionProgressEvent (event) 78
DataTransactionEnd (event) 79
dequeue_call 40, 67
destroy_data_interaction 44
dial 35
dial() 20
discard_data_transaction 55

G
get_acd 21
get_agent_info 21
get_bcc_field() 47
get_blind_data 36
get_callcenter_timezone 24
get_campaign_agents_list() 29
get_campaign_info 27
get_campaign_name 28
get_campaigns 28
get_cc_field() 47
get_data_interaction_state 42
get_default_extension 23
get_dnis 36
get_easy_code 56
get_extension 23
get_from_field 30
get_full_name 23
get_last_error 25
get_login_name 23
get_mails_in_queue 44
get_message_of_the_day 30
get_not_ready_reasons 25
get_password 24
get_phone_number 36
get_phone_state 37
get_preview_mode 56
get_session 25
get_site_info 26
get_subject_field() 48
get_timezone 56
get_to_field() 48
get_user_id 22
global_dial() 20

E
edit_email_gui 52
email
attachment 49, 53
body 46, 48
header 45, 46, 47, 48
information 46
pick up 45
queue 44
remove 53
send 51, 83
store 49
email editor
count 43
create 44, 50, 52
end_data_transaction 55
enqueue_call 39
error 25
ETALK_AGENT_ERROR 8
ETALK_CAN_ERROR 8
ETALK_CPG_ALREADY_OPEN_ERROR 8
ETALK_EXIT_ERROR 8
ETALK_INCORRECT_CPG_ERROR 8
ETALK_OK 8
ETALK_OLE_ERROR 8

92

2010-03-31

H
hangup 37
hold 37

I
in_node 57
is_phone_op_pending 30

L
load_contact 57

uAgent OCX

login 20
logout 20

N
new_call 58
new_contact 58
node 57

O
open_browser_for_web_interaction_gui 53
open_campaign 27

P
PhoneEvent (event) 81
PhoneProgressEvent (event) 82
pickup_mail 45

Q
query_email 45
query_email_attachments_info() 49
query_email_document 46
query_email_mime 46
query_email_text_body 48
query_queue_position 40
query_web 50

R
release_session 26
remove_email() 53
reply_all_gui 50
reply_gui 50
reschedule_contact_with_failed_reason 59
restart_data_transaction 43
retrieve 38

send_email_mime 51
send_email_text 51
SendMailData (event) 83
session 25
add data 77
clear 83
data transaction 61
release 26
start 32, 83, 85
SessionCrearedEvent (event) 83
SessionEvent (event) 83
SessionPhoneEvent (event) 85
set_call_type 60
set_extension 24
set_not_ready 31
set_ready 31
set_site 26
set_timezone 61
show_email_gui 52
sign_off 31
sign_on 31
site 26
SQL
execute 63
select 64
sql_execute 63
sql_select 64
start_record 41
start_script 61
start_session 32
stop_record 41
store_email_mime() 49
supervisor_help 38

T
transfer 38

U
UserMessage 85

S
save_attachment() 53
select_contact 60
send_data 60
send_DTMF 39

W
web interaction
information 50
open 53

uAgent OCX

2010-03-31

93

Das könnte Ihnen auch gefallen