Jump to: navigation, search
(Undo revision 329500 by Jumunn (talk))
(Update with the copy of version: 8.5.2DRAFT)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=Dial=
 
=Dial=
 
__NOTOC__
 
__NOTOC__
This operation is part of the [[VoiceAPI|Voice API]] section of the [[Welcome|Genesys Web Services REST API]].
+
This operation is part of the [[VoiceAPI|Voice API]] section of the [[Welcome|Web Services API]].
 
==Overview==
 
==Overview==
 
Initiates a new outbound call to the specified destination.
 
Initiates a new outbound call to the specified destination.
 
{|
 
{|
 
! Request URL
 
! Request URL
| /api/v2/me/devices/{id}/calls
+
| /api/v2/me/devices/''{id}''/calls
 
|-
 
|-
! HTTP Method
+
! HTTP method
 
| POST
 
| POST
 
|-
 
|-
! Required Features
+
! Required features
 
| api-voice
 
| api-voice
 
|-
 
|-
Line 17: Line 17:
  
 
==Parameters==
 
==Parameters==
 
 
{|
 
{|
 
! Parameter
 
! Parameter
Line 26: Line 25:
 
|-
 
|-
 
| destination
 
| destination
| A JSON object that includes the number to be dialed:
+
| A JSON object that includes the number to be dialed.
<pre>
 
{
 
  "phoneNumber": "5551212"
 
}
 
</pre>
 
 
|-
 
|-
 
| location
 
| location
| An optional parameter that is used by GWS to set the "location" attribute for the corresponding TServer requests.  
+
| An optional parameter that is used by Web Services to set the <tt>location</tt> attribute for the corresponding T-Server requests.  
 
|-
 
|-
 
| userData
 
| userData
| An optional JSON object that includes key/value data to be included with the call:
+
| An optional JSON object that includes key/value data to be included with the call.
<pre>
 
{
 
  "Product": "Guitars"
 
}
 
</pre>
 
 
|-
 
|-
 +
| 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==
+
==Sample 1==
 
 
 
===Request===
 
===Request===
<pre>
+
<source lang="text">
POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
+
POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1/calls
 
   
 
   
 
{
 
{
 
   "operationName": "Dial",
 
   "operationName": "Dial",
 
   "destination": {
 
   "destination": {
     "phoneNumber": "5001"
+
     "phoneNumber": "15002"
 
   }
 
   }
 
}
 
}
</pre>
+
</source>
  
===Response===
+
===HTTP response===
<pre>
+
<source lang="text">
 
{
 
{
 
   "statusCode": 0
 
   "statusCode": 0
 
}
 
}
</pre>
+
</source>
  
===Notification===
+
===CometD notification===
<pre>
+
<source lang="text">
{
+
{
  "data": {
+
  "data":{
    "messageType": "CallStateChangeMessage",
+
      "notificationType":"StatusChange",
    "notificationType": "StatusChange",
+
       "call":{
    "extensions": {
+
        "id":"012PUFMMS0ASNAK48O7GK2LAES000004",
       "WrapUpTime": 0,
+
        "state":"Dialing",
      "BusinessCall": 0
+
        "callUuid":"012PUFMMS0ASNAK48O7GK2LAES000004",
    },
+
        "connId":"007102719260b004",
    "call": {
+
        "deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
      "id": "013V08JRL498H1OI04000VTAES00000G",
+
        "participants":[
      "connId": "0072026cb98d140f",
+
            { 
      "state": "Dialing",
+
              "e164Number":"",
      "callUuid": "013V08JRL498H1OI04000VTAES00000G",
+
              "formattedPhoneNumber":"15002",
      "deviceUri": "http://127.0.0.1:8080/api/v2/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a",
+
              "phoneNumber":"15002",
      "uri": "http://127.0.0.1:8080/api/v2/me/calls/013V08JRL498H1OI04000VTAES00000G",
+
              "digits":"15002"
      "participants": [
+
            }
        "5001"
+
        ],
      ],
+
        "dnis":"15002",
      "participantsInfo": [
+
        "callType":"Internal",
        {
+
        "capabilities":[
          "digits": "5001",
+
            "SendDtmf",
          "e164Number": "5001",
+
            "DeleteUserData",
          "formattedPhoneNumber": "5001"
+
            "AttachUserData",
        }
+
            "DeleteUserDataPair",
      ],
+
            "Hangup",
      "dnis": "5001",
+
            "UpdateUserData"
      "callType": "Internal",
+
        ],
      "capabilities": [
+
        "duration":"0",
        "DeleteUserDataPair",
+
        "mute":"Off",
        "AttachUserData",
+
        "supervisorListeningIn":false,
        "Hangup",
+
        "monitoredUserMuted":false,
        "DeleteUserData",
+
        "monitoring":false,
        "SendDtmf",
+
        "uri":"http://127.0.0.1:8080/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
        "UpdateUserData"
+
        "path":"/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
      ],
+
      },
      "duration": "0",
+
      "phoneNumber":"15000",
      "mute": "Off",
+
      "extensions":{ 
      "supervisorListeningIn": false,
+
        "BusinessCall":0
      "monitoredUserMuted": false
+
      },
    },
+
      "messageType":"CallStateChangeMessage"
    "phoneNumber": "5005"
+
  },
  },
+
  "channel":"/v2/me/calls"
  "channel": "/v2/me/calls"
 
 
}
 
}
</pre>
+
</source>
  
==Sample #2==
+
==Sample 2==
This sample includes a key/value pair with the <tt>Dial</tt> request:
+
This sample includes a key/value pair with the Dial request:
  
 
===Request===
 
===Request===
<pre>
+
<source lang="text">
POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
+
POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1/calls
 
{
 
{
 
   "operationName": "Dial",
 
   "operationName": "Dial",
 
   "destination": {
 
   "destination": {
     "phoneNumber": "5001"
+
     "phoneNumber": "15002"
 
   },
 
   },
 
   "userData": {
 
   "userData": {
Line 130: Line 119:
 
   }
 
   }
 
}
 
}
</pre>
+
</source>
  
===Response===
+
===HTTP response===
<pre>
+
<source lang="text">
 
{
 
{
 
   "statusCode": 0
 
   "statusCode": 0
 
}
 
}
</pre>
+
</source>
  
 
+
===CometD notification===
===Notification===
+
<source lang="text">
<pre>
+
{
{
+
  "data":{
  "data": {
+
      "notificationType":"StatusChange",
    "messageType": "CallStateChangeMessage",
+
       "call":{
    "notificationType": "StatusChange",
+
        "id":"012PUFMMS0ASNAK48O7GK2LAES000004",
    "extensions": {
+
        "state":"Dialing",
       "WrapUpTime": 0,
+
        "callUuid":"012PUFMMS0ASNAK48O7GK2LAES000004",
      "BusinessCall": 0
+
        "connId":"007102719260b004",
    },
+
        "deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
    "call": {
+
        "participants":
      "id": "01NOSKNPB8AT3D4MUTCJ82LAES000111",
+
            { 
      "connId": "0072026cb98d140e",
+
              "e164Number":"",
      "state": "Dialing",
+
              "formattedPhoneNumber":"15002",
      "callUuid": "01NOSKNPB8AT3D4MUTCJ82LAES000111",
+
              "phoneNumber":"15002",
      "deviceUri": "http://127.0.0.1:8080/api/v2/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a",
+
              "digits":"15002"
      "uri": "http://127.0.0.1:8080/api/v2/me/calls/01NOSKNPB8AT3D4MUTCJ82LAES000111",
+
            }
      "participants": [
+
        ],
        "5001"
+
        "dnis":"15002",
      ],
+
        "callType":"Internal",
      "participantsInfo": [
+
        "capabilities":
        {
+
            "SendDtmf",
          "digits": "5001",
+
            "DeleteUserData",
          "e164Number": "5001",
+
            "AttachUserData",
          "formattedPhoneNumber": "5001"
+
            "DeleteUserDataPair",
        }
+
            "Hangup",
      ],
+
            "UpdateUserData"
      "dnis": "5001",
+
        ],
      "callType": "Internal",
+
        "userData":{ 
      "capabilities": [
+
            "CustomerSegment":"Gold"
        "DeleteUserDataPair",
+
        },
        "AttachUserData",
+
        "duration":"0",
        "Hangup",
+
        "mute":"Off",
        "DeleteUserData",
+
        "supervisorListeningIn":false,
        "SendDtmf",
+
        "monitoredUserMuted":false,
        "UpdateUserData"
+
        "monitoring":false,
       ],
+
        "uri":"http://127.0.0.1:8080/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
       "userData": {
+
        "path":"/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
        "CustomerSegment": "Gold"
+
       },
 +
       "phoneNumber":"15000",
 +
      "extensions":
 +
        "BusinessCall":0
 
       },
 
       },
       "duration": "0",
+
       "messageType":"CallStateChangeMessage"
      "mute": "Off",
+
  },
      "supervisorListeningIn": false,
+
  "channel":"/v2/me/calls"
      "monitoredUserMuted": false
 
    },
 
    "phoneNumber": "5005"
 
  },
 
  "channel": "/v2/me/calls"
 
 
}
 
}
</pre>
+
</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!