Jump to: navigation, search
(Created Fix blank page For Version: HTCC:8.5.2DRAFT)
 
(Update with the copy of version: 8.5.2)
Line 1: Line 1:
<!-- Creation of the fix page -->
+
=Dial=
 +
__NOTOC__
 +
 
 +
==Overview==
 +
 
 +
This request initiates a new outbound call to the specified destination.
 +
 
 +
{|
 +
! Request URL
 +
| /api/v2/me/devices/{id}/calls
 +
|-
 +
! HTTP Method
 +
| POST
 +
|-
 +
! Required Features
 +
| api-voice
 +
|-
 +
|}
 +
 
 +
==Parameters==
 +
 
 +
{|
 +
! Parameter
 +
! Value
 +
|-
 +
| operationName
 +
| Dial
 +
|-
 +
| destination
 +
| A JSON object that includes the number to be dialed:
 +
<pre>
 +
{
 +
  "phoneNumber": "5551212"
 +
}
 +
</pre>
 +
|-
 +
| userData
 +
| An optional JSON object that includes key/value data to be included with the call:
 +
<pre>
 +
{
 +
  "Product": "Guitars"
 +
}
 +
</pre>
 +
|-
 +
|}
 +
 
 +
==Sample #1==
 +
 
 +
===Request===
 +
<pre>
 +
POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
 +
 +
{
 +
  "operationName": "Dial",
 +
  "destination": {
 +
    "phoneNumber": "5001"
 +
  }
 +
}
 +
</pre>
 +
 
 +
===Response===
 +
<pre>
 +
{
 +
  "statusCode": 0
 +
}
 +
</pre>
 +
 
 +
===Notification===
 +
<pre>
 +
{
 +
  "data": {
 +
    "messageType": "CallStateChangeMessage",
 +
    "notificationType": "StatusChange",
 +
    "call": {
 +
      "id": "0071023821aec010",
 +
      "state": "Dialing",
 +
      "callUuid": "013V08JRL498H1OI04000VTAES00000G",
 +
      "deviceUri": "http://127.0.0.1:8080/api/v2/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a",
 +
      "uri": "http://127.0.0.1:8080/api/v2/me/calls/0071023821aec010",
 +
      "participants": [
 +
        "5001"
 +
      ],
 +
      "participantsInfo": [
 +
        {
 +
          "digits": "5001",
 +
          "e164Number": "5001",
 +
          "formattedPhoneNumber": "5001"
 +
        }
 +
      ],
 +
      "dnis": "5001",
 +
      "callType": "Internal",
 +
      "capabilities": [
 +
        "DeleteUserDataPair",
 +
        "AttachUserData",
 +
        "Hangup",
 +
        "DeleteUserData",
 +
        "SendDtmf",
 +
        "UpdateUserData"
 +
      ],
 +
      "duration": "0",
 +
      "mute": "Off",
 +
      "supervisorListeningIn": false,
 +
      "monitoredUserMuted": false
 +
    },
 +
    "phoneNumber": "5005"
 +
  },
 +
  "channel": "/v2/me/calls"
 +
}
 +
</pre>
 +
 
 +
==Sample #2==
 +
This sample includes a key/value pair with the <tt>Dial</tt> request:
 +
 
 +
===Request===
 +
<pre>
 +
POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
 +
{
 +
  "operationName": "Dial",
 +
  "destination": {
 +
    "phoneNumber": "5001"
 +
  },
 +
  "userData": {
 +
    "CustomerSegment": "Gold"
 +
  }
 +
}
 +
</pre>
 +
 
 +
===Response===
 +
<pre>
 +
{
 +
  "statusCode": 0
 +
}
 +
</pre>
 +
 
 +
 
 +
===Notification===
 +
<pre>
 +
{
 +
  "data": {
 +
    "messageType": "CallStateChangeMessage",
 +
    "notificationType": "StatusChange",
 +
    "call": {
 +
      "id": "0071023821aec015",
 +
      "state": "Dialing",
 +
      "callUuid": "013V08JRL498H1OI04000VTAES00000L",
 +
      "deviceUri": "http://127.0.0.1:8080/api/v2/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a",
 +
      "uri": "http://127.0.0.1:8080/api/v2/me/calls/0071023821aec015",
 +
      "participants": [
 +
        "5001"
 +
      ],
 +
      "participantsInfo": [
 +
        {
 +
          "digits": "5001",
 +
          "e164Number": "5001",
 +
          "formattedPhoneNumber": "5001"
 +
        }
 +
      ],
 +
      "dnis": "5001",
 +
      "callType": "Internal",
 +
      "capabilities": [
 +
        "DeleteUserDataPair",
 +
        "AttachUserData",
 +
        "Hangup",
 +
        "DeleteUserData",
 +
        "SendDtmf",
 +
        "UpdateUserData"
 +
      ],
 +
      "userData": {
 +
        "CustomerSegment": "Gold"
 +
      },
 +
      "duration": "0",
 +
      "mute": "Off",
 +
      "supervisorListeningIn": false,
 +
      "monitoredUserMuted": false
 +
    },
 +
    "phoneNumber": "5005"
 +
  },
 +
  "channel": "/v2/me/calls"
 +
}
 +
</pre>
 +
 
 +
 
 +
[[Category:V:HTCC:8.5.2DRAFT]]

Revision as of 18:42, April 22, 2014

Dial

Overview

This request initiates a new outbound call to the specified destination.

Request URL /api/v2/me/devices/{id}/calls
HTTP Method POST
Required Features api-voice

Parameters

Parameter Value
operationName Dial
destination A JSON object that includes the number to be dialed:
{ 
  "phoneNumber": "5551212" 
}
userData An optional JSON object that includes key/value data to be included with the call:
{
  "Product": "Guitars"
}

Sample #1

Request

POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
 
{
  "operationName": "Dial",
  "destination": {
    "phoneNumber": "5001"
  }
}

Response

{
  "statusCode": 0
}

Notification

{
  "data": {
    "messageType": "CallStateChangeMessage",
    "notificationType": "StatusChange",
    "call": {
      "id": "0071023821aec010",
      "state": "Dialing",
      "callUuid": "013V08JRL498H1OI04000VTAES00000G",
      "deviceUri": "http://127.0.0.1:8080/api/v2/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a",
      "uri": "http://127.0.0.1:8080/api/v2/me/calls/0071023821aec010",
      "participants": [
        "5001"
      ],
      "participantsInfo": [
        {
          "digits": "5001",
          "e164Number": "5001",
          "formattedPhoneNumber": "5001"
        }
      ],
      "dnis": "5001",
      "callType": "Internal",
      "capabilities": [
        "DeleteUserDataPair",
        "AttachUserData",
        "Hangup",
        "DeleteUserData",
        "SendDtmf",
        "UpdateUserData"
      ],
      "duration": "0",
      "mute": "Off",
      "supervisorListeningIn": false,
      "monitoredUserMuted": false
    },
    "phoneNumber": "5005"
  },
  "channel": "/v2/me/calls"
}

Sample #2

This sample includes a key/value pair with the Dial request:

Request

POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
{
  "operationName": "Dial",
  "destination": {
    "phoneNumber": "5001"
  },
  "userData": {
    "CustomerSegment": "Gold"
  }
}

Response

{
  "statusCode": 0
}


Notification

{
  "data": {
    "messageType": "CallStateChangeMessage",
    "notificationType": "StatusChange",
    "call": {
      "id": "0071023821aec015",
      "state": "Dialing",
      "callUuid": "013V08JRL498H1OI04000VTAES00000L",
      "deviceUri": "http://127.0.0.1:8080/api/v2/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a",
      "uri": "http://127.0.0.1:8080/api/v2/me/calls/0071023821aec015",
      "participants": [
        "5001"
      ],
      "participantsInfo": [
        {
          "digits": "5001",
          "e164Number": "5001",
          "formattedPhoneNumber": "5001"
        }
      ],
      "dnis": "5001",
      "callType": "Internal",
      "capabilities": [
        "DeleteUserDataPair",
        "AttachUserData",
        "Hangup",
        "DeleteUserData",
        "SendDtmf",
        "UpdateUserData"
      ],
      "userData": {
        "CustomerSegment": "Gold"
      },
      "duration": "0",
      "mute": "Off",
      "supervisorListeningIn": false,
      "monitoredUserMuted": false
    },
    "phoneNumber": "5005"
  },
  "channel": "/v2/me/calls"
}
Comments or questions about this documentation? Contact us for support!