VOX_CTI Custom Server functions

This section describes the VOX_CTI custom server functions that can be used from within a state table to access the VOX Server:

Each function is described using the following headings:
Input
The parameters or variables to be passed in the VOX command.
Output
The return values from the VOX response.
Note: VOX_CTI functions always send back a return code and any potential VOX error messages.
VOX command
The actual VOX command sent to the VOX Server. All variables in the VOX command are derived from the input variables except for reqid and channelnum, which are automatically generated by the VOX_CTI custom server.
VOX response
The positive response sent back from the VOX Server. All variables in the VOX response are mapped across to the corresponding output variables.
Valid
An indicator of whether or not the function called is valid. For example, the Getvdu function is only valid after a Newcall function and before a Gone.
Note: String variables passed to the VOX Server do not all need to be enclosed in quotes unless specifically stated. For example, to send a low priority VOX alarm command to the VOX Server, set the priority variable to Low from within the state table rather than to "Low".

For more information about each VOX command see the Avaya Interaction Center VOX Server Programmer's Guide.

Alarm

Input

char alarmname[64]
char priority[16]
char description[128]

Output

long rc
char error_msg[256]

VOX command

[VOX.alarm("alarmname","priority","description")][reqid]

VOX response

[VOX.alarm.response(,"alarmname","priority","description")][reqid]

Valid
Any time after a Newcall

Getvdu

Input

char name[512]

Output

long rc
char error_msg[256]
char value[1024]

VOX command

[VOX.getvdu(#channelnum,"name1",,"name2",,"name3",)][reqid]

VOX response

[VOX.getvdu.response(,#channelnum,"name1","value1","name2",
     ""value2",name3","value3")][reqid]

Valid
After a Newcall and before a Gone

The name input variable is split into one or more sub strings using the comma as a delimiter to generate the name1, name2, name3 variables. The output variable called value is set to the returned set of "name","value" pairs without the quotes.

For example, to request both a balance and a pin number (on channel 10) the following variables would be set and VOX commands and requests issued:
Input variable (name)

balance,pin

VOX command sent

[VOX.getvdu(#10,"balance",,"pin",)][0]

VOX response received

[VOX.getvdu.response(,#10,"balance","3000","pin","1234")][0]

Output variable (value)

balance,3000,pin,1234

Note: The maximum size of a VOX response is 1024 bytes so all VOX.getvdu commands must return less than 1024 bytes. Using the previous example, if both the balance and pin had returned a character string great than 512, then the entire response would have exceeded 1024 characters and thus failed. The solution to this is to call the Getvdu function twice, once with the balance and the other with the pin.

Getvox

Input

char name[512]

Output

long rc
char error_msg[256]
char value[1024]

VOX command

[VOX.getvox(#channelnum,"name",)][reqid]

VOX response

[VOX.getvox.response(,#channelnum,"name","value")][reqid]

Valid
After a Newcall and before a Gone
Note: The maximum size of a VOX response is 1024 bytes so all VOX.getvox commands must return less than 1024 bytes.

Gone

Input
No input parameters or variables
Output

long rc
char error_msg[256]

VOX command

[VOX.gone(#channelnum)][reqid]

VOX response

[VOX.gone.response(,#channelnum)][reqid]

Valid
After a Newcall and only once per CHP/state table

The Gone function must be called immediately after the state table detects that the call has hung up. The Gone function disassociates the link between the CHP/state table and the channel from the VOX Server's point of view. After the Gone function all subsequent VOX_CTI functions will fail (besides Alarm and Ping).

If a new call arrives on the channel whilst an existing CHP/state table is using that channel a VOX.gone command is automatically sent to the VOX Server for that channel. Preferably, application writers should always call the Gone function.

Newcall

Input
No input parameters or variables
Output

long rc
char error_msg[256]

VOX command

[VOX.newcall(#channelnum,)][reqid]

VOX response

[VOX.newcall.response(,#channelnum,vdu.id)][reqid]

Valid
Only at the start of a call and only once per CHP/state table

The Newcall function should be called once at the beginning of the call. The Newcall function associates the CHP/state table with the channel from the VOX Server's point of view.

Ping

Input
No input parameters or variables
Output

long rc
char error_msg[256]

VOX command

[VOX.ping()][reqid]

VOX response

[VOX.ping.response(,)][reqid]

Valid
Always

Pseudo_Ani

Input
No input or variables
Output

long rc
char error_msg[256]
char ps_ani[32]

VOX command

[VOX.pseudo_ani(#channelnum)][reqid]

VOX response

[VOX.pseudo_ani.response(,#channenum,"ps_ani")][reqid]

Valid
After a Newcall and before a Gone

Setvdu

Input

char name[1024]

Output

long rc
char error_msg[256]

VOX command

[VOX.setvdu(#channelnum,"name1","value1","name2","value2",
     "name3","value3")][reqid]

VOX response

[VOX.setvdu.response(,#channelnum,"name1","value1","name2",
     "value2","name3","value3")][reqid]

Valid
After a Newcall and before a Gone
The name input variable is split into one or more sub strings using the comma as a delimiter to generate the name1, value1, name2, value2, name3, value3 variables. For example, to set the balance to 3000 and pin number to 1234 (on channel 10) the following variable would be set and VOX commands and requests issued:
Input variable (name)

balance,3000,pin,1234

VOX command sent

[VOX.setvdu(#10,"balance","3000","pin","1234")][0]

VOX response received

[VOX.setvdu.response(,#10,"balance","3000","pin","1234")][0]

Tr

Input

char op[9]
short output
char arg1[32]
char arg2[32]
char arg3[32]
char arg4[32]

Output

long rc
char error_msg[256]
char output[64]

When the output variable is set to 1 the following VOX command is sent and VOX response received:
VOX command

[VOX.tr1<op>(#channelnum,"arg1","arg2","arg3","arg4")][reqid]

VOX response

[VOX.tr1<op>.response(,#channelnum,"arg1","arg2","arg3",
      "arg4")][reqid]

When the output variable is set to 2 the following VOX command is sent and VOX response received:
VOX command

[VOX.tr2<op>(#channelnum,"arg1","arg2","arg3","arg4")][reqid]

VOX response

[VOX.tr2<op>.response(,#channelnum,"arg1","arg2","arg3","arg4",
     "output")][reqid]

Valid
After a Newcall and before a Gone

Transfer

Input

char destination[32]

Output

long rc
char error_msg[256]

VOX command

[VOX.transfer(#channelnum,"destination")][reqid]

VOX response

[VOX.transfer.response(,#channelnum,"destination")][reqid]

Valid
After a Newcall and before a Gone