Jump to: navigation, search
(Auto-creation of topic Documentation:HTCC:API:CallsDial:8.5.2 via TOC Documentation:HTCC:APITOC8.5.2)
 
(Update with the copy of version: 8.5.2DRAFT)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= CallsDial=
+
=Dial=
 +
__NOTOC__
 +
This operation is part of the [[VoiceAPI|Voice API]] section of the [[Welcome|Web Services API]].
 +
==Overview==
 +
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.
 +
|-
 +
| location
 +
| An optional parameter that is used by Web Services to set the <tt>location</tt> attribute for the corresponding T-Server requests.
 +
|-
 +
| userData
 +
| An optional JSON object that includes key/value data to be included with the call.
 +
|-
 +
| outboundCallerId
 +
| An optional parameter that is used by Web Services to set the <tt>outbound caller Id</tt> attribute for the corresponding T-Server requests.
 +
|}
 +
 
 +
==Sample 1==
 +
===Request===
 +
<source lang="text">
 +
POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1/calls
 +
 +
{
 +
  "operationName": "Dial",
 +
  "destination": {
 +
    "phoneNumber": "15002"
 +
  }
 +
}
 +
</source>
 +
 
 +
===HTTP response===
 +
<source lang="text">
 +
{
 +
  "statusCode": 0
 +
}
 +
</source>
 +
 
 +
===CometD notification===
 +
<source lang="text">
 +
 +
  "data":{ 
 +
      "notificationType":"StatusChange",
 +
      "call":{ 
 +
        "id":"012PUFMMS0ASNAK48O7GK2LAES000004",
 +
        "state":"Dialing",
 +
        "callUuid":"012PUFMMS0ASNAK48O7GK2LAES000004",
 +
        "connId":"007102719260b004",
 +
        "deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
 +
        "participants":[ 
 +
            { 
 +
              "e164Number":"",
 +
              "formattedPhoneNumber":"15002",
 +
              "phoneNumber":"15002",
 +
              "digits":"15002"
 +
            }
 +
        ],
 +
        "dnis":"15002",
 +
        "callType":"Internal",
 +
        "capabilities":[ 
 +
            "SendDtmf",
 +
            "DeleteUserData",
 +
            "AttachUserData",
 +
            "DeleteUserDataPair",
 +
            "Hangup",
 +
            "UpdateUserData"
 +
        ],
 +
        "duration":"0",
 +
        "mute":"Off",
 +
        "supervisorListeningIn":false,
 +
        "monitoredUserMuted":false,
 +
        "monitoring":false,
 +
        "uri":"http://127.0.0.1:8080/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
 +
        "path":"/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
 +
      },
 +
      "phoneNumber":"15000",
 +
      "extensions":{ 
 +
        "BusinessCall":0
 +
      },
 +
      "messageType":"CallStateChangeMessage"
 +
  },
 +
  "channel":"/v2/me/calls"
 +
}
 +
</source>
 +
 
 +
==Sample 2==
 +
This sample includes a key/value pair with the Dial request:
 +
 
 +
===Request===
 +
<source lang="text">
 +
POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1/calls
 +
{
 +
  "operationName": "Dial",
 +
  "destination": {
 +
    "phoneNumber": "15002"
 +
  },
 +
  "userData": {
 +
    "CustomerSegment": "Gold"
 +
  }
 +
}
 +
</source>
 +
 
 +
===HTTP response===
 +
<source lang="text">
 +
{
 +
  "statusCode": 0
 +
}
 +
</source>
 +
 
 +
===CometD notification===
 +
<source lang="text">
 +
 +
  "data":{ 
 +
      "notificationType":"StatusChange",
 +
      "call":{ 
 +
        "id":"012PUFMMS0ASNAK48O7GK2LAES000004",
 +
        "state":"Dialing",
 +
        "callUuid":"012PUFMMS0ASNAK48O7GK2LAES000004",
 +
        "connId":"007102719260b004",
 +
        "deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
 +
        "participants":[ 
 +
            { 
 +
              "e164Number":"",
 +
              "formattedPhoneNumber":"15002",
 +
              "phoneNumber":"15002",
 +
              "digits":"15002"
 +
            }
 +
        ],
 +
        "dnis":"15002",
 +
        "callType":"Internal",
 +
        "capabilities":[ 
 +
            "SendDtmf",
 +
            "DeleteUserData",
 +
            "AttachUserData",
 +
            "DeleteUserDataPair",
 +
            "Hangup",
 +
            "UpdateUserData"
 +
        ],
 +
        "userData":{ 
 +
            "CustomerSegment":"Gold"
 +
        },
 +
        "duration":"0",
 +
        "mute":"Off",
 +
        "supervisorListeningIn":false,
 +
        "monitoredUserMuted":false,
 +
        "monitoring":false,
 +
        "uri":"http://127.0.0.1:8080/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
 +
        "path":"/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
 +
      },
 +
      "phoneNumber":"15000",
 +
      "extensions":{ 
 +
        "BusinessCall":0
 +
      },
 +
      "messageType":"CallStateChangeMessage"
 +
  },
 +
  "channel":"/v2/me/calls"
 +
}
 +
</source>
 +
 
  
 
[[Category:V:HTCC:8.5.2]]
 
[[Category:V:HTCC:8.5.2]]

Latest revision as of 17:41, July 7, 2021

Dial

This operation is part of the Voice API section of the Web Services API.

Overview

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.
location An optional parameter that is used by Web Services to set the location attribute for the corresponding T-Server requests.
userData An optional JSON object that includes key/value data to be included with the call.
outboundCallerId An optional parameter that is used by Web Services to set the outbound caller Id attribute for the corresponding T-Server requests.

Sample 1

Request

POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1/calls
 
{
  "operationName": "Dial",
  "destination": {
    "phoneNumber": "15002"
  }
}

HTTP response

{
  "statusCode": 0
}

CometD notification

{  
   "data":{  
      "notificationType":"StatusChange",
      "call":{  
         "id":"012PUFMMS0ASNAK48O7GK2LAES000004",
         "state":"Dialing",
         "callUuid":"012PUFMMS0ASNAK48O7GK2LAES000004",
         "connId":"007102719260b004",
         "deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
         "participants":[  
            {  
               "e164Number":"",
               "formattedPhoneNumber":"15002",
               "phoneNumber":"15002",
               "digits":"15002"
            }
         ],
         "dnis":"15002",
         "callType":"Internal",
         "capabilities":[  
            "SendDtmf",
            "DeleteUserData",
            "AttachUserData",
            "DeleteUserDataPair",
            "Hangup",
            "UpdateUserData"
         ],
         "duration":"0",
         "mute":"Off",
         "supervisorListeningIn":false,
         "monitoredUserMuted":false,
         "monitoring":false,
         "uri":"http://127.0.0.1:8080/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
         "path":"/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
      },
      "phoneNumber":"15000",
      "extensions":{  
         "BusinessCall":0
      },
      "messageType":"CallStateChangeMessage"
   },
   "channel":"/v2/me/calls"
}

Sample 2

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

Request

POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1/calls
{
  "operationName": "Dial",
  "destination": {
    "phoneNumber": "15002"
  },
  "userData": {
    "CustomerSegment": "Gold"
  }
}

HTTP response

{
  "statusCode": 0
}

CometD notification

{  
   "data":{  
      "notificationType":"StatusChange",
      "call":{  
         "id":"012PUFMMS0ASNAK48O7GK2LAES000004",
         "state":"Dialing",
         "callUuid":"012PUFMMS0ASNAK48O7GK2LAES000004",
         "connId":"007102719260b004",
         "deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
         "participants":[  
            {  
               "e164Number":"",
               "formattedPhoneNumber":"15002",
               "phoneNumber":"15002",
               "digits":"15002"
            }
         ],
         "dnis":"15002",
         "callType":"Internal",
         "capabilities":[  
            "SendDtmf",
            "DeleteUserData",
            "AttachUserData",
            "DeleteUserDataPair",
            "Hangup",
            "UpdateUserData"
         ],
         "userData":{  
            "CustomerSegment":"Gold"
         },
         "duration":"0",
         "mute":"Off",
         "supervisorListeningIn":false,
         "monitoredUserMuted":false,
         "monitoring":false,
         "uri":"http://127.0.0.1:8080/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
         "path":"/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
      },
      "phoneNumber":"15000",
      "extensions":{  
         "BusinessCall":0
      },
      "messageType":"CallStateChangeMessage"
   },
   "channel":"/v2/me/calls"
}
This page was last edited on July 7, 2021, at 17:41.
Comments or questions about this documentation? Contact us for support!