Integration

The integration module is a set of tools which will allow your custom software to interact with the InstantVoice IP telephony platform. Currently we offer basic agent functionality and call events.

Pieces Description

STOMP Message Broker

InstantVoice hosts a STOMP message broker which handles incoming messages from third-party applications to our platform. Using this, integrating systems will be able to perform configuration tasks such as: QueueAdd, QueueDelete and QueueModify. Retrieve realtime information like: TODO. And also feed our predictive dialing system.

IVWS

IVWS (InstantVoice Web Service) is a SOAP, WSDL defined, web service which processes requests made by client applications to our plaftorm. Through it, you will be able to perform the same configuration tasks provided by the STOMP interface.

IVClient

IVClient is a COM object which wraps our STOMP methods and handles the reception of the call events plus a tray icon.

Server Configuration

IVWS

There are two parameters to configure on the server side, both optional:

Family: instantvoice.conf
Group: ivws
Name: port
Default value: 7789

This describes the port in which your IVWS will listen on your active ACD brick.

Family: instantvoice.conf
Group: ivws
Name: log
Default value: 0

Set this parameter to 1 in order to activate logging of incoming requests by the IVWS on /var/log/ivws/current of your server.

Note

If you change any of these it is necessary to manually restart the IVWS service on your server.

STOMP

The configuration parameters for the STOMP back-end are:

Family: instantvoice.conf
Group: ivstomp
Name: host
Default value: localhost

This is the address where the STOMP message broker lives. By default, it will be the ACD brick on distributed installations.

Family: instantvoice.conf
Group: ivstomp
Name: port
Default value: 61613

This is the port where our message broker is listening.

Family: instantvoice.conf
Group: ivstomp
Name: username
Default value: instantvoice

This is the username used to authenticate in the message broker.

Family: instantvoice.conf
Group: ivstomp
Name: password
Default value: sT0MpM3

This is the password used to authenticate in the message broker.

Family: instantvoice.conf
Group: ivstomp
Name: log
Default value: 0

Set this parameter to 1 in order to activate logging of incoming requests by the IVWS on /var/log/ivws/current of your server.

Access Keys

The first parameter of every integration method is an access key, and these keys must be given permission to call the desired methods.

Note

A key is an alphanumeric string with a maximum length of 20 characters.

You can manage your keys on our web administration interface in the Configuration menu section, item Web Service.

Installing IVClient

Note

If you plan to use the web service or stomp interface directly, you can skip directly to Integration Methods Description.

Installing

Assuming you already have an InstantVoice PBX up and running, all you need to do is install IVClient on each seat of your call center. In order to do this, simply double-click the setup file and go through it’s steps.

Note

The COM object is registered for you during the installation process, you can unregister/register it in Start Menu/IVClient/ Unregister COM and Register COM.

Instantiating

IVClient’s progid is “Instantvoice.Integration”. The clsid is “{F9DD083D-1A0A-4B67-80FA-5565ECBF51C0}” but you probably don’t need this for anything. After instantiating, make sure to call the method StartTray,which will start a tray icon on your desktop. More about this later.

Some code examples:

# Python
import win32com.client

ivclient = win32com.client.Dispatch("Instantvoice.Integration")
ivclient.StartTray
' Visual Basic 6
Set ivclient = CreateObject("Instantvoice.Integration")
ivclient.StartTray()
// Delphi 7
uses ComObj;

var ivclient : Variant;
begin
    ivclient := CreateOLEObject('Instantvoice.Integration');
    ivclient.StartTray;
end;
# Perl 5
use Win32::OLE;

my $ivclient = Win32::OLE->new('Instantvoice.Integration');
$ivclient->StartTray();
# Ruby
require 'win32ole'

ivclient = WIN32OLE.new('Python.Teste')
ivclient.StartTray()

Client Configuration

If you right click the icon and select config, a window will open with the following fields:

IVStomp Configuration

These are the main parameters for ivclient to connect to the InstantVoice platform.

Field Description
IP Address This must be the ip address of your active ACD.
Port If you modified the web service’s port as described in the Server Configuration, inform the same port here.
Username The username to be used to connect to the STOMP message broker.
Password The password to be used to connect to the STOMP message broker.
Key Here you must insert the desired key created in Access Keys .
Debug This will make IVClient write all error messages on the text file %ProgramFiles%\InstantVoice\IVClient\ivlog.txt .

TotalRecorder Integration Configuration

In case you are using Instant TotalRecorder with InstantVoice, you will also want to configure these integration parameters.

Field Description
Port This should contain the local port where the TotalRecorder client will be listening. It should always be 5800 unless you really know what you’re doing.
Password This is the local client API pass, defined in the Captures tab of the TotalRecorder client configuration.

Password Protection

This is an optional field which allows you to define a password to be asked before the user can access this configuration form.

Note

IVClient automaticaly reloads all configuration changes.

COM Methods Description

These are the methods you will be able to use through our COM interface. All methods return 0 on success. For more information, see Return Codes.

StartTray

This method takes no parameters and starts IVClients’s tray icon. This must be the first thing done after you instantiate the COM object on your application.

AgentLogin

AgentLogin(accountcode,username,interface)

This method will login the given agent on you InstantVoice platform, allowing him to make and receive calls.

Method Argument Description
Accountcode The agent’s accountcode
Username The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Interface The telephony interface where this agent will answer his calls in the format <TECH>/<name>. Ex.: SIP/default_0001, IAX2/default_230, etc.
Example:
AgentLogin("default","default_1001","SIP/default_0001")

AgentLogoff

AgentLogoff(accountcode,username)

This method will logoff the given agent from you InstantVoice platform.

Method Argument Description
Accountcode The agent’s accountcode
Username The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Example:
AgentLogoff("default","default_1001")

AgentPause

AgentPause(accountcode,username,reason)

This method pauses the given agent, preventing him from receiving calls.

Method Argument Description
Accountcode The agent’s accountcode
Username The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Reason The pause number, as defined in Telephony/Agent Pauses.
Example:
AgentPause("default","default_1001","1")

AgentUnpause

AgentUnpause(accountcode,username)

This method unpauses the given agent, allowing him to receive calls again.

Method Argument Description
Accountcode The agent’s accountcode
Username The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Example:
AgentUnpause("default","default_1001")

BlindTransfer

BlindTransfer(accountcode,username,dest_ext)

This method will redirect all calls currently taken by the agent to the desired dest_ext. This destination can be anything, a queue, another agent or even an external number.

Method Argument Description
Accountcode The agent’s accountcode
Username The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Dest_ext The destination extension you want the calls to be redirected.
Example:
BlindTransfer("default","default_1001","6100")

NewCall

NewCall(accountcode,username,dest_ext,External_id)

This method starts a new call to the desired dest_ext and returns it to the agent.

Method Argument Description
Accountcode The agent’s accountcode
Username The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Dest_ext The destination extension you want to call.
External_id Your number to identify this new call
Example:
NewCall("default","default_1001","6100","9999")

Hangup

Hangup(accountcode,uniqueid)

This method terminates a given call.

Method Argument Description
Accountcode The agent’s accountcode
Uniqueid The desired call uniqueid. You have received this on a NEWCALL event through PollEvents.
Example:
Hangup("default","1286208779.1.30")

PollEvents

This method takes no parameters and will return you a string in JSON format with all events that arrived after the last method call. You should call this at least on a 10 second interval.

[{
    "direction": "OUTBOUND",
    "callerid": "1234",
    "type": "NEWCALL",
    "uniqueid": "1282779516.1.6",
    "agent": "default_1001"
},{
    "direction": "INBOUND",
    "callerid": "2198765456",
    "type": "NEWCALL",
    "uniqueid": "1282781304.2.5",
    "agent": "default_1001"
},{
    "direction": "",
    "callerid": "2198765456",
    "type": "HANGUP",
    "uniqueid": "1282781304.2.5",
    "agent": "default_1001"
},{
    ...
}]
Field Description
Direction This can be either INBOUND or OUTBOUND, it indicates the call’s direction. Only for NEWCALL events.
Callerid This is whatever comes as callerid for inbound calls and what was dialed by the agent on outbound calls.
Type Indicates the type of the event. Currently we have NEWCALL, DNEWCALL, CONNECT, DCONNECT, HANGUP, LOGIN, LOGOUT, PAUSE and UNPAUSE. The description of each event can be found in Call Events section.
Uniqueid The system’s uniqueid for that call. It is useful to match the NEWCALL events with the corresponding HANGUP events.
Agent Each event is related to a single agent informed here.

Note

You can find JSON libraries to most modern programming languages on http://www.json.org/.

StopTray

This method takes no parameters. It closes IVClients’s tray icon and all connections to InstantVoice server from this instance.

STOMP Interface Specifics

Request

Requests should be sent to the queue: /queue/config. After each request our Telephony API will send a message to /topic/KEY ,where KEY is the key used in the request, with the status of that request in the format: [RETURN_CODE, "Description"].

Identifier

Our STOMP interface accepts an identifier as a final optional parameter. If after the 3 (event, key and arguments) parameters you pass a string, we will send this same string back so you can easily match the responses received with your requests.

Request Example:

[
    "AgentLogin",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "User": "default_1001",
        "Interface": "SIP/default_0001"
    },
    "key1234"
]

Response Example:

[0, "Successful QueueAdd", "key1234"]

Integration Methods Description

Note

If you are using IVClient, jump to Return Codes.

You can bypass IVClient entirely and access directly our integration methods. They use the same Return Codes.

Note

To use the SOAP interface, you might want to see the complete WSDL at http://acd_hostname:7789/?wsdl or whatever port you configured.

AgentAdd

Create a new agent. Availability: STOMP, WSDL.

Field Description Specification
accountcode The agent’s accountcode Any pre-created accountcode is valid
user The user that identifies the agent Must be an interger and unique
pass The password to agent login Optional, must be an integer
name The name or a little description of the agent Optional, only for informational value
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentAdd>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
         <ivws:passwd>456</ivws:passwd>
         <ivws:name>Foo Agent</ivws:name>
      </ivws:AgentAdd>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentAdd",
    "f054bbd2f5ebab9",
    {
            "accountcode":"default",
            "user":"1000",
            "pass":"1234",
            "name":"Foo Agent"
    }
]

AgentDelete

Delete an agent. Availability: STOMP, WSDL.

Method Argument Description
accountcode The agent’s accountcode
user The user that identifies the agent
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentDelete>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
      </ivws:AgentDelete>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentDelete",
    "f054bbd2f5ebab9",
    {
            "accountcode":"default",
            "user":"1000"
    }
]

AgentModify

Modify an existing agent in the plataform. It expects the same arguments as AgentAdd with the addition of the two mandatory arguments described below. Availability: STOMP, WSDL.

Method Argument Description
original_accountcode The original accountcode this queue was before the requested changes were made
original_user The original user this agent was before the requested changes were made
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentModify>
         <ivws:key>1234</ivws:key>
         <ivws:original_accountcode>default</ivws:original_accountcode>
         <ivws:original_user>0001</ivws:original_user>
         <ivws:passwd>9876</ivws:passwd>
      </ivws:AgentModify>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentModify",
    "f054bbd2f5ebab9",
    {
            "original_accountcode":"default",
            "original_user":"1000",
            "pass":"1234"
    }
]

AgentList

Lists all agents from a given accountcode. Availability: STOMP, WSDL.

Method Argument Description
accountcode The desired accountcode
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentList>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
      </ivws:AgentList>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentList",
    "f054bbd2f5ebab9",
    {
            "accountcode":"default"
    }
]

Response Example:

[0,[1234,5678,6666,1111,7777]]

AgentInfo

Returns all information about a given agent. Availability: STOMP, WSDL.

Method Argument Description
accountcode The agent’s accountcode
user The agent’s user
 XML Example:

 <soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
    <soapenv:Body>
       <ivws:AgentInfo>
          <ivws:key>1234</ivws:key>
          <ivws:accountcode>default</ivws:accountcode>
          <ivws:user>0001</ivws:user>
       </ivws:AgentInfo>
    </soapenv:Body>
 </soapenv:Envelope>

 Response Example:

<SOAP-ENV:Envelope
 mlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
 mlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 mlns:xs="http://www.w3.org/2001/XMLSchema"
 mlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
 mlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 mlns="Ivws.Ivws">
   <SOAP-ENV:Body>
      <AgentInfoResponse>
         <AgentInfoResult>
            <passwd xsi:type="xs:string">456</passwd>
            <accountcode xsi:type="xs:string">default</accountcode>
             <agents_id xsi:type="xs:integer">22</agents_id>
             <name xsi:type="xs:string">Foo Agent</name>
             <user xsi:type="xs:string">0001</user>
          </AgentInfoResult>
       </AgentInfoResponse>
    </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
JSON Example:

[
    "AgentInfo",
    "f054bbd2f5ebab9",
    {
            "accountcode":"default",
            "user":"1000"
    }
]

Response Example:

[
    0,
    {
        "accountcode":"default",
        "name":"1234",
        "extension":"n/a",
        "reasons_reason":"test",
        "agentstatusts":0,
        "logints":0,
        "disabled":0,
        "user":"default_1234",
        "pass":"1234",
        "interface":"n/a",
        "agentstatus":"LOGOFF",
        "id":2
    }
]

AgentLineAdd

Create a new line for an agent. Availability: STOMP, WSDL.

Field Description Specification
accountcode The agent’s accountcode Any pre-created accountcode is valid
user The agent’s user A user of a existing agent
lines This field is a list and contains information about the lines. The parameters of each line are described in table below
Field Description Specification
linenumber The number of the line. It’s identifies a line of an agent Possible values are integers. This number must be unique per agent. Default is 1.
inbound Optional. Enable or Disable line to receive calls. Possible values are 1 for enabled or 0 for disabled. Default is 1.
outbound Optional. Enable or Disable line to place calls. Possible values are 1 for enabled or 0 for disabled. Default is 1.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentLineAdd>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
         <ivws:lines>
        <line1>
            <linenumber>1</linenumber>
            <inbound>0</inbound>
            <outbound>1</outbound>
        </line1>
        <line2>
            <linenumber>2</linenumber>
            <inbound>0</inbound>
            <outbound>1</outbound>
        </line2>
         </ivws:lines>
      </ivws:AgentLineAdd>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentLineAdd",
    "1234",
    {
            "accountcode":"default",
        "user":"0001",
        "lines":
        [
            {
                "linenumber":"1",
                "inbound":"0",
                "outbound":"1"
            },
            {
                "linenumber":"2",
                "inbound":"0",
                "outbound":"1"
            }
        ]
    }
]

AgentLineDelete

Delete line from determined agent. Availability: STOMP, WSDL.

An agent must have at least one line configured to make and receive calls. For this reason, it is not possible to remove an agent line if it is the agent’s only one. If you want to modify this particular line, use the AgentLineModify method.

Method Argument Description
accountcode The agent’s accountcode
user The agent’s user
linenumber The number of agent line
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentLineDelete>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
         <ivws:linenumber>2</ivws:linenumber>
      </ivws:AgentLineDelete>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentLineDelete",
    "f054bbd2f5ebab9",
    {
            "accountcode":"default",
            "user":"0001",
        "linenumber":"2"
    }
]

AgentLineModify

Modify line of an agent. There are three mandatory fields, that’s identify the agent and the line. It’s possible enable or disable the line to receive or place calls with the parameters presented below. Availability: STOMP, WSDL.

Method Argument Description
original_accountcode The original accountcode this agent was before the requested changes were made
original_user The original user of the target agent.
original_linenumber The original linenumber that identifies the line of one agent
inbound EnableDisable line to receive calls
outbound EnableDisable line to place calls
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentLineModify>
         <ivws:key>1234</ivws:key>
         <ivws:original_accountcode>default</ivws:original_accountcode>
         <ivws:original_user>0001</ivws:original_user>
         <ivws:original_linenumber>1</ivws:original_linenumber>
         <ivws:inbound>1</ivws:inbound>
         <ivws:outbound>1</ivws:outbound>
      </ivws:AgentLineModify>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentLineModify",
    "1234",
    {
        "original_accountcode":"default",
        "original_user":"0001",
        "original_linenumber":"1",
        "inbound":"1",
        "outbound":"0"
    }
]

AgentLineList

Lists all lines from a given agent. Availability: STOMP, WSDL.

Method Argument Description
accountcode The desired accountcode
user The agent’s user
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentLineList>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
      </ivws:AgentLineList>
   </soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
   <SOAP-ENV:Body>
      <AgentLineListResponse>
         <AgentLineListResult type="tns:AgentLinesArray">
            <AgentLines>
               <accountcode xsi:type="xs:string">default</accountcode>
               <outbound xsi:type="xs:integer">1</outbound>
               <inbound xsi:type="xs:integer">1</inbound>
               <linestatus xsi:type="xs:string">IDLE</linestatus>
               <linenumber xsi:type="xs:integer">1</linenumber>
               <linestatusts xs:nil="1"/>
            </AgentLines>
         </AgentLineListResult>
      </AgentLineListResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "AgentLineList",
    "1234",
    {
            "accountcode":"default",
            "user":"0001"
    }
]

Response Example:

[
    0,
    [
        {
            "id":13,
            "queues_id":0,
            "outbound":1,
            "inbound":1,
            "linestatus":"IDLE",
            "uniqueid":"",
            "linenumber":1,
            "linestatusts":0
        },
        {
            "id":8,
            "queues_id":0,
            "outbound":1,
            "inbound":1,
            "linestatus":"IDLE",
            "uniqueid":"",
            "linenumber":2,
            "linestatusts":0
        }
    ]
]

AgentQueueAdd

Includes an agent as member of a queue. Availability: STOMP, WSDL.

Field Description Specification
accountcode The agent/queue accountcode The accountcode where are the agent and queue
user The agent’s user A user number of any existing agent
queues This field is a list and contais information about queues that this agent will be member The parameters of each queue are described below
Field Description Specification
name The queue’s name The name number of any existing queue.
priority The priority of the agent to receive calls in this queue Must be a integer.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentQueueAdd>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
         <ivws:queues>
             <queue1>
                <name>1</name>
                <priority>1</priority>
             </queue1>
             <queue2>
                <name>5</name>
                <priority>0</priority>
             </queue2>
         </ivws:queues>
      </ivws:AgentQueueAdd>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentQueueAdd",
    "1234",
    {
        "accountcode":"default",
        "user":"0001"
        "queues":
        [
            {
                "name":"1",
                "priority":"0"
            }
        ]
    }
]

AgentQueueDelete

Remove an agent from a queue. Availability: STOMP, WSDL.

An agent must be member at least of one queue. For this reason, it is not possible to remove an agent from a queue if it is the only one that the agent is a member of. If you want to modify this particular queue, use the AgentQueueModify method.

Method Argument Description
accountcode The accountcode where are the agent and queue
user The agent’s user
name The queue’s name
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentQueueDelete>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
         <ivws:name>1</ivws:name>
      </ivws:AgentQueueDelete>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentQueueDelete",
    "1234",
    {
        "accountcode":"default",
        "user":"0001",
        "name":"1"
    }
]

AgentQueueModify

Allow modify the priority of the agent in a queue. Availability: STOMP, WSDL.

Method Argument Description
original_accountcode The original accountcode this agent was before the requested changes were made
original_user The original user of the target agent.
original_name The original name of the queue.
priority The new priority of the agent in this queue
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentQueueModify>
         <ivws:key>1234</ivws:key>
         <ivws:original_accountcode>default</ivws:original_accountcode>
         <ivws:original_user>0001</ivws:original_user>
         <ivws:original_name>1</ivws:original_name>
         <ivws:priority>9</ivws:priority>
      </ivws:AgentQueueModify>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentQueueModify",
    "1234",
    {
        "original_accountcode":"default",
        "original_user":"0001",
        "original_name":"1",
        "priority":"10"
    }
]

AgentQueueList

List queues and priority from a given agent. Availability: STOMP, WSDL.

Method Argument Description
accountcode The accountcode where are the agent and queue.
user The agent’s user.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentQueueList>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:user>0001</ivws:user>
      </ivws:AgentQueueList>
   </soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
mlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
mlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
mlns:xs="http://www.w3.org/2001/XMLSchema"
mlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
mlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
mlns="Ivws.Ivws">
<SOAP-ENV:Body>
  <AgentQueueListResponse>
     <AgentQueueListResult type="tns:AgentQueuesArray">
        <AgentQueues>
           <priority xsi:type="xs:integer">0</priority>
           <name xsi:type="xs:string">1</name>
        </AgentQueues>
        <AgentQueues>
           <priority xsi:type="xs:integer">0</priority>
           <name xsi:type="xs:string">2</name>
        </AgentQueues>
     </AgentQueueListResult>
  </AgentQueueListResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "AgentQueueList",
    "1234",
    {
            "accountcode":"default",
            "user":"0001"
    }
]

Response Example:

[
    0,
    [
        {
            "name":1,
            "priority":0
        },
        {
            "name":2,
            "priority":0
        }
    ]
]

AgentQueueMembers

List all members from a given queue. Availability: STOMP, WSDL.

Method Argument Description
accountcode The accountcode where are the agent and queue.
name The queue’s name.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:AgentQueueMembers>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:name>1</ivws:name>
      </ivws:AgentQueueMembers>
   </soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
 <SOAP-ENV:Body>
  <AgentQueueMembersResponse>
     <AgentQueueMembersResult type="tns:QueueMembersArray">
        <QueueMembers>
           <priority xsi:type="xs:integer">0</priority>
           <user xsi:type="xs:string">0001</user>
        </QueueMembers>
     </AgentQueueMembersResult>
  </AgentQueueMembersResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "AgentQueueMembers",
    "1234",
    {
            "accountcode":"default",
            "name":"1"
    }
]

Response Example:

[ 0,
    [
        {
            "priority":"0",
            "user":"0001"
        },
        {
            "priority":"0",
            "user":"0002"
        }
    ]
]

AgentAddPermission

This method will set an agent’s permission group, allowing make calls according by the rules of this permission group. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the agent.
user The user that identifies an agent. The user of an existing agent.
location The permission group used to control outbound calls. A permission group that exists on the system.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
    <ivws:AgentAddPermission>
        <ivws:key>1234</ivws:key>
        <ivws:accountcode>default</ivws:accountcode>
        <ivws:user>0001</ivws:user>
        <ivws:location>123</ivws:location>
    </ivws:AgentAddPermission>
</soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentAddPermission",
    "1234",
    {
        "accountcode": "default",
        "user": "0001",
        "location": "123"
    }
]

AgentDeletePermission

This method will remove an agent from a permission group. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the agent.
user The user that identifies an agent. The user of an existing agent.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
    <ivws:AgentDeletePermission>
        <ivws:key>1234</ivws:key>
        <ivws:accountcode>default</ivws:accountcode>
        <ivws:user>0001</ivws:user>
    </ivws:AgentDeletePermission>
</soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentDeletePermission",
    "1234",
    {
        "accountcode": "default",
        "user": "0001",
    }
]

AgentModifyPermission

This method will modify an agent’s permission group. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the agent.
user The user that identifies an agent. The user of an existing agent.
location The permission group used to control outbound calls. A permission group that exists on the system.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
    <ivws:AgentModifyPermission>
        <ivws:key>1234</ivws:key>
        <ivws:accountcode>default</ivws:accountcode>
        <ivws:user>0001</ivws:user>
        <ivws:location>123</ivws:location>
    </ivws:AgentModifyPermission>
</soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentModifyPermission",
    "1234",
    {
        "accountcode": "default",
        "user": "0001",
        "location": "123"
    }
]

AgentInfoPermission

This method returns the permission group of a given agent. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the agent.
user The user that identifies an agent. The user of an existing agent.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
    <ivws:AgentInfoPermission>
        <ivws:key>1234</ivws:key>
        <ivws:accountcode>default</ivws:accountcode>
        <ivws:user>0001</ivws:user>
    </ivws:AgentInfoPermission>
</soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
<SOAP-ENV:Body>
<AgentInfoPermissionResponse>
    <AgentInfoPermissionResult>
        <code xsi:type="xs:integer">0</code>
        <location xsi:type="xs:string">123</location>
     </AgentInfoPermissionResult>
   </AgentInfoPermissionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "AgentInfoPermission",
    "1234",
    {
        "accountcode": "default",
        "user": "0001",
    }
]

Response Example:

[0, "123"]

AgentLogin

This method will login the given agent on you InstantVoice platform, allowing him to make and receive calls. Availability: STOMP, WSDL.

Method Argument Description
Key Your web service access key.
Accountcode The agent’s accountcode
User The agent’s username, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Interface The telephony interface where this agent will answer his calls in the format <TECH>/<name>. Ex.: SIP/default_0001, IAX2/default_230, etc.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
    <soapenv:Body>
        <ivws:AgentLogin>
            <ivws:key>f054bbd2f5ebab9</ivws:key>
            <ivws:Accountcode>default</ivws:Accountcode>
            <ivws:User>default_1001</ivws:User>
            <ivws:Interface>SIP/default_0001</ivws:Interface>
        </ivws:AgentLogin>
    </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentLogin",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "User": "default_1001",
        "Interface": "SIP/default_0001",
    }
]

AgentLogoff

This method will logoff the given agent from you InstantVoice platform. Availability: STOMP, WSDL.

Method Argument Description
key Your web service access key.
Accountcode The agent’s accountcode
User The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:AgentLogoff>
        <ivws:key>f054bbd2f5ebab9</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:User>default_1001</ivws:User>
     </ivws:AgentLogoff>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentLogoff",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "User": "default_1001",
    }
]

AgentPause

This method pauses the given agent, preventing him from receiving calls. Availability: STOMP, WSDL.

Method Argument Description
key Your web service access key.
Accountcode The agent’s accountcode
User The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Reason The pause number, as defined in Telephony/Agent Pauses.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:AgentPause>
        <ivws:key>f054bbd2f5ebab9</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:User>default_1001</ivws:User>
        <ivws:Reason>1</ivws:Reason>
     </ivws:AgentPause>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentPause",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "User": "default_1001",
        "Reason": "1"
    }
]

AgentUnpause

This method unpauses the given agent, allowing him to receive calls again. Availability: STOMP, WSDL.

Method Argument Description
key Your web service access key.
Accountcode The agent’s accountcode
User The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:AgentUnpause>
        <ivws:key>f054bbd2f5ebab9</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:User>default_1001</ivws:User>
     </ivws:AgentUnpause>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "AgentUnpause",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "User": "default_1001",
    }
]

BlindTransfer

This method will redirect all calls currently taken by the agent to the desired dest_ext. This destination can be anything, a queue, another agent or even an external number. Availability: STOMP, WSDL.

Method Argument Description
key Your web service access key.
Accountcode The agent’s accountcode
User The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Exten The destination extension you want the calls to be redirected.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:BlindTransfer>
        <ivws:key>f054bbd2f5ebab9</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:User>default_1001</ivws:User>
        <ivws:Exten>6100</ivws:Exten>
     </ivws:BlindTransfer>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "BlindTransfer",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "Agent": "default_1001",
        "Exten": "6100"
    }
]

NewCall

This method starts a new call to the desired dest_ext and returns it to the agent. Availability: STOMP, WSDL.

Method Argument Description
Key Your web service access key.
Accountcode The agent’s accountcode
User The agent’s useraname, which is always <accountcode>_<agentNumber>. Ex.: default_1001, instant_304512, etc.
Exten The destination extension you want to call.
External_id Your number to identify this new call
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:NewCall>
        <ivws:key>f054bbd2f5ebab9</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:User>default_1001</ivws:User>
        <ivws:Exten>6100</ivws:Exten>
        <ivws:External_id>9999</ivws:External_id>
     </ivws:NewCall>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "NewCall",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "Agent": "default_1001",
        "Exten": "6100",
        "External_id": "9999"
    }
]

SendSms

This method sends a cellphone sms (text message) to the Number. Availability: STOMP, WSDL.

Method Argument Description
Key Your web service access key.
Accountcode The Accountcode
Number The cellphone number to which the text will be sent
Text The text of the message
SendSms(key, accountcode, number, text)

Example:
SendSms("mykey", "default", "552188283288", "Hi there!")
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:SendSms>
        <ivws:key>mykey</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:Number>552188283288</ivws:Number>
        <ivws:Text>Hi there!</ivws:Text>
     </ivws:SendSms>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SendSms",
    "mykey",
    {
        "Accountcode": "default",
        "Number": "552188283288",
        "Text": "Hi there!"
    }
]

NewCallBack

NewCallBack(key, accountcode, ruleid, mcdu, originator, language)

Example:
NewCallBack("mykey", "default","1","6100","2177277722","pt_BR")

This method appends a new call to the callback list. Availability: STOMP, WSDL.

Method Argument Description
Key Your web service access key.
Accountcode The agent’s accountcode
Mcdu the number of the mcdu that will execute the callback
Originator the telephone number we will actually call back
Language either pt_BR or en_US
Location_id Id From Permission group
Queue_id Id From Queue
Email Destination email to calback failed
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:NewCallBack>
        <ivws:key>mykey</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:Mcdu>6100</ivws:Mcdu>
        <ivws:Originator>2177277722</ivws:Originator>
        <ivws:Language>pt_BR</ivws:Language>
        <ivws:Location_id>1</ivws:Location_id>
        <ivws:Queue_id>1</ivws:Queue_id>
        <ivws:Email>instant@instant.com.br</ivws:Email>
     </ivws:NewCallBack>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "NewCallBack",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "Ruleid": "1",
        "Mcdu": "6100",
        "Originator": "2177277722",
        "Language": "pt_BR",
        "Location_id": "1",
        "Queue_id": "1',
        "Email": "instant@instant.com.br"
    }
]

Hangup

This method terminates a given call. Availability: STOMP, WSDL.

Method Argument Description
Key Your web service access key.
Accountcode The agent’s accountcode
Uniqueid The desired call uniqueid. You have received this on a NEWCALL call events, see Receiving Call Events.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
  <soapenv:Body>
     <ivws:Hangup>
        <ivws:key>f054bbd2f5ebab9</ivws:key>
        <ivws:Accountcode>default</ivws:Accountcode>
        <ivws:Uniqueid>1286208779.1.30</ivws:Uniqueid>
     </ivws:Hangup>
  </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "NewCall",
    "f054bbd2f5ebab9",
    {
        "Accountcode": "default",
        "Uniqueid": "1286208779.1.30"
    }
]

QueueAdd

Creates a new queue in the platform. Availability: STOMP, WSDL.

Field Description Specification
accountcode The queue’s accountcode. Any pre-created accountcode is valid.
name The queue’s extension. Must be an integer and unique.
description The description which is only for informational value. Optional.
sl_answeredbefore_1 The first interval for service level calculations. Optional, must be an integer smaller than 300. Default is 30.
sl_answeredbefore_2 The second interval for service level calculations. Optional, must be an integer smaller than 900. Default is 60.
sl_answeredbefore_3 The third interval for service level calculations. Optional, must be an integer smaller than 900. Default is 60.
joinempty Allows callers to join the queue even when there are no agents logged to it. Optional, should be either “yes” or “no”. Default is “yes”.
requiresendinfo Hangs the call if unable to send cti information to the receiving agent. Optional, should be either “yes” or “no”. Default is “yes”.
timeout Defines how long a caller can wait on queue. Optional, defaults to 0 which means it can wait forever. Must be an integer.
dialtimeout Defines the timeout for each dial attempt to this queue’s agents. Optional, defaults to 10. Must be an integer and 0 it has no timeout.
maxlen Defines the maximum length for this queue. Any caller who tries do enter after won’t be allowed in. Optional, defaults to 0 which means no maximun length. Must be an integer.
wrapuptime Defines in seconds a minimum time between calls for all this queue’s agents. Optional, defaults to 0. Must be an integer.
quarantinetime Defines the amount of seconds a quarantine lasts on this queue. An agent is placed in quarantine if he doesn’t answer a call sent to him. Optional, defaults to 0. Must be an integer.
announce Sets a sound file to be played to the agents before the caller is bridged to them. Must be the name of a sound file in the table messages. messages.name
musiconhold Sets the music on hold to be played to the waiting callers. Must be the name a class configured in musiconhold.conf.
XML Example:

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
    <soapenv:Body>
        <ivws:QueueAdd>
            <ivws:key>f054bbd2f5ebab9</ivws:key>
            <ivws:accountcode>
                default
            </ivws:accountcode>
            <ivws:name>7015</ivws:name>
            <ivws:description></ivws:description>
            <ivws:sl_answeredbefore_1>56</ivws:sl_answeredbefore_1>
            <ivws:sl_answeredbefore_2></ivws:sl_answeredbefore_2>
            <ivws:sl_answeredbefore_3></ivws:sl_answeredbefore_3>
            <ivws:joinempty></ivws:joinempty>
            <ivws:requiresendinfo></ivws:requiresendinfo>
            <ivws:timeout></ivws:timeout>
            <ivws:dialtimeout></ivws:dialtimeout>
            <ivws:maxlen></ivws:maxlen>
            <ivws:wrapuptime></ivws:wrapuptime>
            <ivws:quarantinetime></ivws:quarantinetime>
            <ivws:announce>SynthR - Oceanus.mp3</ivws:announce>
            <ivws:musiconhold>default</ivws:musiconhold>
        </ivws:QueueAdd>
    </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "QueueAdd",
    "f054bbd2f5ebab9",
    {
        "name": 7015,
        "sl_answeredbefore_1": 56,
        "announce": "SynthR - Oceanus.mp3",
        "accountcode": "default",
        "musiconhold": "default"
    }
]

QueueModify

Modifies an existing queue in the platform. It expects the same arguments as QueueAdd with the addition of the two mandatory arguments described below. Availability: STOMP, WSDL.

Method Argument Description
original_accountcode The original accountcode this queue was before the requested changes were made
original_name The original number this queue was before the requested changes were made
XML Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
    <soapenv:Body>
        <ivws:QueueModify>
            <ivws:key>f054bbd2f5ebab9</ivws:key>
            <ivws:original_accountcode>
                default
            </ivws:original_accountcode>
            <ivws:original_name>7015</ivws:original_name>
            <ivws:accountcode>
                default
            </ivws:accountcode>
            <ivws:name>8015</ivws:name>
            <ivws:description>New Description.</ivws:description>
            <ivws:sl_answeredbefore_1>30</ivws:sl_answeredbefore_1>
            <ivws:sl_answeredbefore_2></ivws:sl_answeredbefore_2>
            <ivws:sl_answeredbefore_3></ivws:sl_answeredbefore_3>
            <ivws:joinempty></ivws:joinempty>
            <ivws:requiresendinfo></ivws:requiresendinfo>
            <ivws:timeout></ivws:timeout>
            <ivws:dialtimeout></ivws:dialtimeout>
            <ivws:maxlen></ivws:maxlen>
            <ivws:wrapuptime></ivws:wrapuptime>
            <ivws:quarantinetime></ivws:quarantinetime>
            <ivws:announce>Welcome.mp3</ivws:announce>
            <ivws:musiconhold></ivws:musiconhold>
        </ivws:QueueModify>
    </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "QueueModify",
    "f054bbd2f5ebab9",
    {
        "original_name": 7015,
        "original_accountcode": "default",
        "name": 8015,
        "sl_answeredbefore_1": 30,
        "announce": "Welcome.mp3",
        "accountcode": "default"
    }
]

QueueDelete

Deletes a queue. Availability: STOMP, WSDL.

Method Argument Description
accountcode The queue’s accountcode.
name The queue’s extension.
XML Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
    <soapenv:Body>
        <ivws:QueueDelete>
            <ivws:key>1234</ivws:key>
            <ivws:accountcode>
                default
            </ivws:accountcode>
            <ivws:name>8787</ivws:name>
        </ivws:QueueDelete>
    </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "QueueDelete",
    "f054bbd2f5ebab9",
    {
        "name": 7015,
        "accountcode": "default"
    }
]

QueueList

Lists all queues from a given accountcode. Availability: STOMP, WSDL.

Method Argument Description
accountcode The desired accountcode.
 XML Example:

 <soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:ivws="Ivws.Ivws">
 <soapenv:Header/>
    <soapenv:Body>
       <ivws:QueueList>
          <ivws:key>1234</ivws:key>
          <ivws:accountcode>default</ivws:accountcode>
       </ivws:QueueList>
    </soapenv:Body>
 </soapenv:Envelope>

 Response Example:

<SOAP-ENV:Envelope
 xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns="Ivws.Ivws">
     <SOAP-ENV:Body>
         <QueueListResponse>
             <QueueListResult type="tns:integerArray">
                 <integer xsi:type="xs:integer">1000</integer>
                <integer xsi:type="xs:integer">1</integer>
                 <integer xsi:type="xs:integer">2000</integer>
                 <integer xsi:type="xs:integer">2341</integer>
                 <integer xsi:type="xs:integer">10666</integer>
             </QueueListResult>
         </QueueListResponse>
    </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
JSON Example:

[
    "QueueList",
    "f054bbd2f5ebab9",
    {
        "accountcode": "default"
    }
]

Response Example:

[0, ['1002', '1004', '0015', '7021'] ]

QueueInfo

Returns all information about a given queue. Availability: STOMP, WSDL.

Method Argument Description
accountcode The queue’s accountcode.
name The queue’s extension.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
        <ivws:QueueInfo>
            <ivws:key>1234</ivws:key>
            <ivws:accountcode>default</ivws:accountcode>
            <ivws:name>1000</ivws:name>
        </ivws:QueueInfo>
    </soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
<SOAP-ENV:Body>
    <QueueInfoResponse>
        <QueueInfoResult>
            <accountcode xsi:type="xs:string">default</accountcode>
            <description xsi:type="xs:string"/>
            <requisendinfo xsi:type="xs:string">no</requisendinfo>
            <sl_answeredbefore_2 xsi:type="xs:integer">60</sl_answeredbefore_2>
            <maxlen xsi:type="xs:integer">0</maxlen>
            <joinempty xsi:type="xs:string">yes</joinempty>
            <sl_answeredbefore_1 xsi:type="xs:integer">30</sl_answeredbefore_1>
            <timeout xsi:type="xs:integer">0</timeout>
            <sl_answeredbefore_3 xsi:type="xs:integer">90</sl_answeredbefore_3>
            <announce xsi:type="xs:string"/>
            <wrapuptime xsi:type="xs:integer">0</wrapuptime>
            <dialtimeout xsi:type="xs:integer">9991</dialtimeout>
            <quarantinetime xsi:type="xs:integer">0</quarantinetime>
            <musiconhold xsi:type="xs:string">default</musiconhold>
            <name xsi:type="xs:string">1000</name>
        </QueueInfoResult>
    </QueueInfoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "QueueList",
    "f054bbd2f5ebab9",
    {
        "accountcode": "default"
    }
]

Response Example:

[
    0,
    {
        "agents_total": 0,
        "maxwait": 0,
        "sl_w2_a3": null,
        "requiresendinfo": "no",
        "joinempty": "yes",
        "max_recordings": 0,
        "sl_w3_a2": null,
        "sl_w3_a3": null,
        "sl_w3_a1": null,
        "id": 1,
        "musiconhold": "default",
        "agents_idle": 0,
        "agents_pending_logoff": 0,
        "sl_answeredbefore_3": 90,
        "agents_loggedoff": 0,
        "agents_unavailable_quarantine": 0,
        "announce": "",
        "wrapuptime": 0,
        "dialtimeout": 10,
        "leavewhenempty": "no",
        "agents_oncall": 0,
        "description": "Technical Support Queue",
        "timestamp": 0,
        "agents_paused": 0,
        "agents_logoff_pause": 0,
        "monitorfilename": "",
        "agents_pending_pause": 0,
        "len": 0,
        "conditionalmon": "yes",
        "quarantinetime": 0,
        "sl_w1_a1": null,
        "sl_w1_a2": null,
        "sl_w1_a3": null,
        "name": "default_7012",
        "agents_unavailable_wrapup": 0,
        "sl_answeredbefore_2": 60,
        "maxlen": 0,
        "monitor_format": "wav49",
        "sl_answeredbefore_1": 30,
        "sl_w2_a1": null,
        "timeout": 0,
        "sl_w2_a2": null,
        "accountcode": "default",
        "agents_loggedin": 0
    }
]

SipUserAdd

Creates a new sip user in the platform. Availability: STOMP, WSDL.

Field Description Specification
accountcode The desired accountcode for this user. Any pre-created accountcode is valid.
name The extension of the user. Must be numeric and unique.
description A description of the user. Optional.
allow The allowed voice codecs for this user in order of preference. Optional, should be a list of codecs, separated by ;. Possible codecs are: ilbc, gsm, ulaw, alaw, g729. Defaults to ilbc;gsm;ulaw;alaw
amaflags Categorization for CDR records. Choices are default, omit, billing, documentation. Optional, valid options are: default, omit, billing, documentation. Default is default
call-limit Number of simultaneous calls through this user. Optional, must be an integer. Defaults to 0 (no limit).
callerid The desired callerid for this user. Optional.
callgroup Defines call groups for calls to this device. Optional, must be a list of integers separated by comma. Defaults to null.
canreinvite If the client is able to support SIP re-invites. Optional, must be yes or no. Default is yes.
context The context for all calls through this user. Optional, default is instantvoice_agent
defaultip Default ip address for this user. Used if host is dynamic. Optional, must be a valid ip address.
deny Limits SIP traffic to and from this user to a certain IP or network. Optional, must be a valid ip or netmask.
disallow Disallows the informed codecs. Optional, should be a list of codecs, separated by ; or ‘all’. Possible codecs are: ilbc, gsm, ulaw, alaw, g729.
dtmfmode Sets the desired dtmf mode for this user. Optional, possible values are inband, info or rfc2833. Defaults to rfc2833.
fromdomain Sets default From: domain in SIP messages when acting as a SIP ua. Optional.
fromuser Specify user to put in “from” instead of the callerid. Optional.
fullcontact SIP URI contact. Optional.
host How to find the client - IP # or host name. If you want the phone to register itself, use the keyword dynamic instead of Host IP. Optional, defaults to dynamic.
Field Description Specification
ignoregexpire Indicates whether to use Contact information about a peer even if the information is stale because it has reached its expiration time. Optional, must be yes or no. Default is no.
insecure Specifies how to handle connections with peers. Optional, must be invite, port or both (invite,port).
language Default language used by any Playback()/Background(). Optional, must be en_US, pt_BR or es_ES. Defaults to en_US.
mailbox Voicemail extension (for message waiting indications). Optional. Must be an existing mailbox.
md5secret MD5-Hash of “<user>:==SIP_realm==: <secret>” (can be used instead of secret). Optional.
musiconhold One of the classes specified in musiconhold.conf. Optional. If set, must be an existing music on hold class.
nat This variable changes the behaviour of our platform for clients behind a firewall. Optional, must be yes or no. Default is no.
permit Explicitly allows SIP traffic to and from this user to a certain IP or network. Optional, must be a valid ip or netmask.
pickupgroup Group that can pickup fellow workers’ calls using *8 or the Pickup() application. Optional, must be a list of integers separated by comma. Defaults to null.
port Sip port of the client. Optional, must be numeric. Default is 5060.
progressinband If we should generate in-band ringing always. Optional, must be yes, no or never. Default is never.
promiscredir Allows support for 302 Redirects. Optional, must be yes or no. Default is no.
qualify Check if client is reachable. Optional, must be yes , no or a value in miliseconds. Default is no.
regexten Extension to use in registers. Optional, must be numeric.
regseconds Number of seconds between SIP REGISTER. Optional, must be numeric in seconds. Defaults to 0.
rpid Defines the Remote-Party-ID header for this user. Optional.
rtpholdtimeout Max number of seconds of inactivity before terminating a call on hold. Optional, must be numeric in seconds. Defaults to 0.
secret This user’s password. Optional.
Field Description Specification
sendrpid If a Remote-Party-ID SIP header should be sent. Optional, must be yes or no. Default is no.
setvar Channel variable to be set for all calls from this user. Optional. The format is variable=value.
subscribecontext Set a specific context for SIP SUBSCRIBE requests. Optional.
trustrpid If Remote-Party-ID SIP header should be trusted. Optional, must be yes or no. Default
type Relationship to client. Optional, must be user, friend or peer. Defaults to friend.
useclientcode If yes, then the Call Originator as stated in the CDR will be changed to whatever is specified in a X-ClientCode SIP header. Optional, must be yes or no.
username If the server is accepting SIP INVITE requests from a remote SIP client, this field specifies the user name for authentication. Optional, must be numeric.
route Defines if this peer is a user or another brick of the platform. Optional, must be yes or no. Default is no.
macaddr If this user is tied to a hardphone, you can set it’s mac address here. Optional, must be a valid mac address.
location If this user is on a permission group. Optional, must be an existing permission group.
XML Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:SipUserAdd>
         <ivws:key>f054bbd2f5ebab9</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:name>1010</ivws:name>
         <ivws:description></ivws:description>
         <ivws:allow></ivws:allow>
         <ivws:amaflags></ivws:amaflags>
         <ivws:call_limit></ivws:call_limit>
         <ivws:callerid></ivws:callerid>
         <ivws:callgroup></ivws:callgroup>
         <ivws:canreinvite></ivws:canreinvite>
         <ivws:context></ivws:context>
         <ivws:defaultip></ivws:defaultip>
         <ivws:deny></ivws:deny>
         <ivws:disallow></ivws:disallow>
         <ivws:dtmfmode></ivws:dtmfmode>
         <ivws:fromdomain></ivws:fromdomain>
         <ivws:fromuser></ivws:fromuser>
         <ivws:fullcontact></ivws:fullcontact>
         <ivws:host></ivws:host>
         <ivws:ignoreexpire></ivws:ignoreexpire>
         <ivws:insecure></ivws:insecure>
         <ivws:ipaddr></ivws:ipaddr>
         <ivws:language></ivws:language>
         <ivws:mailbox></ivws:mailbox>
         <ivws:md5secret></ivws:md5secret>
         <ivws:musiconhold>default</ivws:musiconhold>
         <ivws:nat></ivws:nat>
         <ivws:permit></ivws:permit>
         <ivws:pickupgroup></ivws:pickupgroup>
         <ivws:port></ivws:port>
         <ivws:progressinband></ivws:progressinband>
         <ivws:promiscredir></ivws:promiscredir>
         <ivws:qualify></ivws:qualify>
         <ivws:regexten></ivws:regexten>
         <ivws:regseconds></ivws:regseconds>
         <ivws:rpid></ivws:rpid>
         <ivws:rtpholdtimeout></ivws:rtpholdtimeout>
         <ivws:secret>creative-password</ivws:secret>
         <ivws:sendrpid></ivws:sendrpid>
         <ivws:setvar></ivws:setvar>
         <ivws:subscribecontext></ivws:subscribecontext>
         <ivws:trustrpid></ivws:trustrpid>
         <ivws:type></ivws:type>
         <ivws:useclientcode></ivws:useclientcode>
         <ivws:username></ivws:username>
         <ivws:route></ivws:route>
         <ivws:macaddr></ivws:macaddr>
         <ivws:location></ivws:location>
      </ivws:SipUserAdd>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SipUserAdd",
    "f054bbd2f5ebab9",
    {
        "name": 1010,
        "accountcode": "default",
        "musiconhold": "default"
        "secret": "creative-password"
        "useclientcode"": "yes"
    }
]

SipUserModify

Modifies an existing sip user in the platform. It expects the same arguments as SipUserAdd with the addition of the two mandatory arguments described below. Availability: STOMP, WSDL.

Method Argument Description
original_accountcode The original accountcode this user was before the requested changes were made
original_name The original number this user was before the requested changes were made
XML Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:SipUserModify>
         <ivws:key>f054bbd2f5ebab9</ivws:key>
         <ivws:original_accountcode>default</ivws:original_accountcode>
         <ivws:original_name>1010</ivws:original_name>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:name>1010</ivws:name>
         <ivws:description></ivws:description>
         <ivws:allow></ivws:allow>
         <ivws:amaflags></ivws:amaflags>
         <ivws:call_limit></ivws:call_limit>
         <ivws:callerid></ivws:callerid>
         <ivws:callgroup></ivws:callgroup>
         <ivws:canreinvite></ivws:canreinvite>
         <ivws:context></ivws:context>
         <ivws:defaultip></ivws:defaultip>
         <ivws:deny></ivws:deny>
         <ivws:disallow></ivws:disallow>
         <ivws:dtmfmode></ivws:dtmfmode>
         <ivws:fromdomain></ivws:fromdomain>
         <ivws:fromuser></ivws:fromuser>
         <ivws:fullcontact></ivws:fullcontact>
         <ivws:host></ivws:host>
         <ivws:ignoreexpire></ivws:ignoreexpire>
         <ivws:insecure></ivws:insecure>
         <ivws:ipaddr></ivws:ipaddr>
         <ivws:language></ivws:language>
         <ivws:mailbox></ivws:mailbox>
         <ivws:md5secret></ivws:md5secret>
         <ivws:musiconhold>default</ivws:musiconhold>
         <ivws:nat></ivws:nat>
         <ivws:permit></ivws:permit>
         <ivws:pickupgroup></ivws:pickupgroup>
         <ivws:port></ivws:port>
         <ivws:progressinband></ivws:progressinband>
         <ivws:promiscredir></ivws:promiscredir>
         <ivws:qualify></ivws:qualify>
         <ivws:regexten></ivws:regexten>
         <ivws:regseconds></ivws:regseconds>
         <ivws:rpid></ivws:rpid>
         <ivws:rtpholdtimeout></ivws:rtpholdtimeout>
         <ivws:secret>creative-password</ivws:secret>
         <ivws:sendrpid></ivws:sendrpid>
         <ivws:setvar></ivws:setvar>
         <ivws:subscribecontext></ivws:subscribecontext>
         <ivws:trustrpid></ivws:trustrpid>
         <ivws:type></ivws:type>
         <ivws:useclientcode></ivws:useclientcode>
         <ivws:username></ivws:username>
         <ivws:route></ivws:route>
         <ivws:macaddr></ivws:macaddr>
         <ivws:location></ivws:location>
      </ivws:SipUserModify>
   </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SipUserModify",
    "f054bbd2f5ebab9",
    {
        "original_name": 1010,
        "original_accountcode": "default",
        "musiconhold": "default"
        "secret": "creative-password"
        "useclientcode"": "yes"
    }
]

SipUserDelete

Deletes a sip user. Availability: STOMP, WSDL.

Method Argument Description
accountcode The user’s accountcode.
name The user’s extension.
XML Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
        <soapenv:Body>
            <ivws:SipUserDelete>
                <ivws:key>f054bbd2f5ebab9</ivws:key>
                <ivws:accountcode>default</ivws:accountcode>
                <ivws:name>1010</ivws:name>
            </ivws:SipUserDelete>
        </soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SipUserDelete",
    "f054bbd2f5ebab9",
    {
        "name": 1010,
        "accountcode": "default"
    }
]

SipUserList

Lists all sip users from a given accountcode. Availability: STOMP, WSDL.

Method Argument Description
accountcode The desired accountcode.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:SipUserList>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
      </ivws:SipUserList>
   </soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
   <SOAP-ENV:Body>
      <SipUserListResponse>
         <SipUserListResult type="tns:integerArray">
            <integer xsi:type="xs:integer">('instantvoice',)</integer>
            <integer xsi:type="xs:integer">('0001',)</integer>
            <integer xsi:type="xs:integer">('0002',)</integer>
            <integer xsi:type="xs:integer">('0003',)</integer>
            <integer xsi:type="xs:integer">('0004',)</integer>
         </SipUserListResult>
      </SipUserListResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "SipUserList",
    "1234",
    {
        "accountcode": "default"
    }
]

Response Example:

[0, ['instantvoice', '0001', '0002', '0003', '0004'] ]

SipUserInfo

Returns all information about a given sip user. Availability: STOMP, WSDL.

Method Argument Description
accountcode The user’s accountcode.
name The user’s extension.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
   <soapenv:Body>
      <ivws:SipUserInfo>
         <ivws:key>1234</ivws:key>
         <ivws:accountcode>default</ivws:accountcode>
         <ivws:name>0001</ivws:name>
      </ivws:SipUserInfo>
   </soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
<SOAP-ENV:Body>
  <SipUserInfoResponse>
     <SipUserInfoResult>
        <fullcontact xs:nil="1"/>
        <call_limit xsi:type="xs:integer">0</call_limit>
        <amaflags xsi:type="xs:string">default</amaflags>
        <sendrpid xsi:type="xs:string">no</sendrpid>
        <useclientcode xs:nil="1"/>
        <callgroup xs:nil="1"/>
        <progressinband xsi:type="xs:string">never</progressinband>
        <port xsi:type="xs:integer">5060</port>
        <musiconhold xs:nil="1"/>
        <regseconds xsi:type="xs:integer">0</regseconds>
        <callerid xsi:type="xs:string">default_0001</callerid>
        <ipaddr xs:nil="1"/>
        <fromdomain xs:nil="1"/>
        <md5secret xs:nil="1"/>
        <secret xsi:type="xs:string">creative-password</secret>
        <nat xsi:type="xs:string">no</nat>
        <type xsi:type="xs:string">friend</type>
        <setvar xs:nil="1"/>
        <username xs:nil="1"/>
        <description xs:nil="1"/>
        <insecure xs:nil="1"/>
        <rtpholdtimeout xsi:type="xs:integer">0</rtpholdtimeout>
        <disallow xs:nil="1"/>
        <host xsi:type="xs:string">dynamic</host>
        <promiscredir xsi:type="xs:string">no</promiscredir>
        <defaultip xs:nil="1"/>
        <subscribecontext xs:nil="1"/>
        <mailbox xs:nil="1"/>
        <accountcode xsi:type="xs:string">default</accountcode>
        <deny xs:nil="1"/>
        <dtmfmode xsi:type="xs:string">rfc2833</dtmfmode>
        <name xsi:type="xs:string">default_0001</name>
        <language xsi:type="xs:string">en_US</language>
        <ignoreexpire xsi:type="xs:string">no</ignoreexpire>
        <qualify xsi:type="xs:string">no</qualify>
        <pickupgroup xs:nil="1"/>
        <rpid xs:nil="1"/>
        <canreinvite xsi:type="xs:string">yes</canreinvite>
        <allow xsi:type="xs:string">ilbc;gsm;ulaw;alaw</allow>
        <permit xs:nil="1"/>
        <fromuser xs:nil="1"/>
        <regexten xs:nil="1"/>
        <trustrpid xsi:type="xs:string">no</trustrpid>
     </SipUserInfoResult>
  </SipUserInfoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "SipUserInfo",
    "f054bbd2f5ebab9",
    {
        "accountcode": "default",
        "name": "1010"
    }
]

Response Example:

[
    0,
    {
        "fullcontact": "",
        "call-limit": 0,
        "rtptimeout": 0,
        "amaflags": "default",
        "sendrpid": "no",
        "useclientcode": "no",
        "callgroup": "",
        "progressinband": "never",
        "id": 2,
        "musiconhold": "",
        "regseconds": 1292523047,
        "ignoreregexpire": "no",
        "callerid": null,
        "ipaddr": "0.0.0.0",
        "fromdomain": "",
        "port": 0,
        "md5secret": "",
        "secret": "",
        "nat": "no",
        "type": "friend",
        "setvar": "",
        "username":
        "default_0001",
        "allow": "ilbc;gsm;ulaw;alaw",
        "insecure": "",
        "rtpholdtimeout": 0,
        "disallow": "",
        "host": "dynamic",
        "promiscredir": "no",
        "defaultip": "",
        "subscribecontext": "",
        "mailbox": "",
        "accountcode": "default",
        "deny": "",
        "dtmfmode": "rfc2833",
        "name": "default_0001",
        "language": "en_US",
        "route": "no",
        "qualify": 0,
        "pickupgroup": "",
        "rpid": "",
        "canreinvite": "yes",
        "context": "instantvoice_agent",
        "permit": "",
        "fromuser": "",
        "regexten": "",
        "trustrpid": "no"
    }
]

SipUserAddPermission

This method will set a sip user permission group, allowing make calls according by the rules of this permission group. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the sip user.
name The name that identifies a sip user. The name of an existing sip user.
location The permission group used to control outbound calls. A permission group that exists on the system.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
  <ivws:SipUserAddPermission>
     <ivws:key>1234</ivws:key>
     <ivws:accountcode>default</ivws:accountcode>
     <ivws:name>1111</ivws:name>
     <ivws:location>123</ivws:location>
  </ivws:SipUserAddPermission>
</soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SipUserAddPermission",
    "1234",
    {
        "accountcode": "default",
        "name": "1111",
        "location": "123"
    }
]

SipUserDeletePermission

This method will remove a sip user from a permission group. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the sip user.
name The name that identifies a sip user. The name of an existing sip user.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
  <ivws:SipUserDeletePermission>
     <ivws:key>1234</ivws:key>
     <ivws:accountcode>default</ivws:accountcode>
     <ivws:name>1111</ivws:name>
  </ivws:SipUserDeletePermission>
</soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SipUserDeletePermission",
    "1234",
    {
        "accountcode": "default",
        "name": "1111",
    }
]

SipUserModifyPermission

This method will modify a sip user permission group. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the sip user.
name The name that identifies a sip user. The name of an existing sip user.
location The permission group used to control outbound calls. A permission group that exists on the system.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
  <ivws:SipUserModifyPermission>
     <ivws:key>1234</ivws:key>
     <ivws:accountcode>default</ivws:accountcode>
     <ivws:name>1111</ivws:name>
     <ivws:location>otherpermissiongroup</ivws:location>
  </ivws:SipUserModifyPermission>
</soapenv:Body>
</soapenv:Envelope>
JSON Example:

[
    "SipUserModifyPermission",
    "1234",
    {
        "accountcode": "default",
        "name": "1111",
        "location": "otherpermissiongroup"
    }
]

SipUserInfoPermission

This method returns the permission group of a given sip user. Availability: STOMP, WSDL.

Field Description Specification
key Your access key. The key used to access the service.
accountcode The agent accountcode. The accountcode where is the sip user.
name The name that identifies a sip user. The name of an existing sip user.
XML Example:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ivws="Ivws.Ivws">
<soapenv:Header/>
<soapenv:Body>
  <ivws:SipUserInfoPermission>
     <ivws:key>1234</ivws:key>
     <ivws:accountcode>default</ivws:accountcode>
     <ivws:name>1111</ivws:name>
  </ivws:SipUserInfoPermission>
</soapenv:Body>
</soapenv:Envelope>

Response Example:

<SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="Ivws.Ivws">
<SOAP-ENV:Body>
  <SipUserInfoPermissionResponse>
     <SipUserInfoPermissionResult>
        <code xsi:type="xs:integer">0</code>
        <location xsi:type="xs:string">123</location>
     </SipUserInfoPermissionResult>
  </SipUserInfoPermissionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSON Example:

[
    "SipUserInfoPermission",
    "1234",
    {
        "accountcode": "default",
        "name": "1111",
    }
]

Response Example:

[0, "123"]

Receiving Call Events

In order to receive call events for any given agent, one must simply subscribe to its topic on our STOMP message broker. The topics are in the format: iv.agents.accountcode_NUM. For example, to receive events for agent 1001 from accountcode “default”, you must subscribe to “/topic/iv.agents.default_1001”.

To receive call events for ALL agents in the system, simply subscribe to “iv.agents.#”, using a literal ‘#’ instead of a specific agent.

Example:
{
    "direction": "OUTBOUND",
    "callerid": "1234",
    "type": "NEWCALL",
    "uniqueid": "1282779516.1.6",
    "agent": "default_1001"
}
Field Description
Direction This can be either INBOUND or OUTBOUND, it indicates the call’s direction. On Hangups it comes empty. On pauses, it shows the pause description
Callerid This is whatever comes as callerid for inbound calls and what was dialed by the agent on outbound calls.
Type Indicates the type of the event. Currently we have NEWCALL,DNEWCALL, HANGUP, CONNECT, DCONNECT, LOGIN, LOGOUT, PAUSE and UNPAUSE.
Uniqueid The system’s uniqueid for that call. It is useful to match the NEWCALL events with the corresponding HANGUP events.
Agent Each event is related to a single agent informed here.

The table below describes all types of events.

Field Description
NEWCALL This event indicates a new call for an agent.
DNEWCALL When a NEWCALL method is requested, this event indicates that the remote party was called.
HANGUP This event indicates the end of a call. Every hangup has a reason, that indicates what occurred with the call. These reasons are described in table below.
CONNECT This event indicates that the call was answered by the destination.
DCONNECT When a NEWCALL method is requested, this event indicates that the call was answered by the remote party.
LOGIN This event indicates that an agent was logged in the system.
LOGOUT This event indicates that an agent was logged out the system.
PAUSE This event indicates that an agent was paused in the system.
UNPAUSE This event indicates that an agent was unpaused in the system.

The table below describes all reasons for hangup.

Field Description
BYCALLER The call was answered and the calling party hung.
BYCALLEE The call was answered and the called party hung.
NOANSWER The call was not answered by the destination.
FAILED An error occurred while calling and the dial failed.
BUSY The destination was busy.
UNKNOWN An unknown error occurred.
ATRANSFER The agent transferred this call to another destination through attendant transfer key.
BTRANSFER The agent transferred this call to another destination through blind transfer key.
QUEUEGIVEUP The caller hangup the call while was waiting in the queue.
QUEUEMISSED The call from queue was forwarded to an agent but the agent did not answer the call.
PICKUP The call was ringing for an agent but another agent picked up the call through the pickup key.
MSSTOP If an error occurred and the media server stop, all calls from this media server are hung up with the MSSTOP reason.
MSSTART When media server recover from failure, all remaining calls from this media server are hung up with the MSSTART reason on server startup.
MSGONE When ACD server cannot communicate with media server, all calls from this media server are hung up with the MSGONE reason.

Example 1:

For example, all the events involved in a agent to agent call are presented in the figure below. Each agent receives only your own events, the events of the caller agent are represented in red and the events of the callee agent are represented in blue.

_images/call_events_1.png

Agent to agent call events.

Example 2:

The figure below show the events involved in a call using NewCall method of API. This scenario is a bit different because this method call the agent and then call the destination. The NEWCALL and CONNECT events are generated for the first part, between agent phone and InstantVoice. The DNEWCALL and DCONNECT events are generated for the remote party, between InstantVoice and the destination.

_images/call_events_2.png

NewCall method events.

Return Codes

We always return 0 on success. These are the possible return codes when something goes wrong with a request.

Code String Description
1 RESPONSE_MISSING_ARGS There are mandatory arguments which were not filled.
2 RESPONSE_NO_MEMORY The server has run out of memory.
3 RESPONSE_NOT_FOUND The target of the request was not found. It could mean that the accountcode or the agent doesn’t exist, for example.
4 RESPONSE_DUPLICATE The server interprets this request as a duplicate from a previous request and will not act on it.
5 RESPONSE_INVALID The request doesn’t make sense to the server.
6 RESPONSE_NOTEMPTY This request requires the target to be empty, but currently it is not.
7 RESPONSE_ITEM_FULL The target cannot accept any more requests of this kind at this moment.
8 RESPONSE_ITEM_EMPTY The target is currently empty, this request cannot be performed on an empty target.
9 RESPONSE_UNAUTHORIZED The request doesn’t contain the correct password for the desired target.
10 RESPONSE_NOT_ALLOWED The server is not allowed to perform the requested operation.
11 RESPONSE_DISABLED The target is disabled, the server cannot perform this request.
12 RESPONSE_NO_LICENSE The server cannot perform this request because the number of licensed agents was exceeded.
1000 RESPONSE_UNDEFINED The server cannot perform any request because the IVACD is currently disabled.
9999 RESPONSE_INTERNAL_ERROR An unexpected behaviour caused the request not to be completed.
-1 DAC_OFFLINE IVWS could not communicate with IVACD.
-2 PERMISSION_DENIED The provided key doesn’t have permission to perform this request.