Jump to: navigation, search
(Sample #1)
Line 49: Line 49:
  
 
===Request===
 
===Request===
<pre>
+
<source lang="text">
 
POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
 
POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls
 
   
 
   
Line 55: Line 55:
 
   "operationName": "Dial",
 
   "operationName": "Dial",
 
   "destination": {
 
   "destination": {
     "phoneNumber": "5001"
+
     "phoneNumber": "15002"
 
   }
 
   }
 
}
 
}
</pre>
+
</source>
  
 
===Response===
 
===Response===
<pre>
+
<source lang="text">
 
{
 
{
 
   "statusCode": 0
 
   "statusCode": 0
 
}
 
}
</pre>
+
</source>
  
 
===Notification===
 
===Notification===
<pre>
+
<source lang="text">
 
{
 
{
  "data": {
+
"notificationType": "StatusChange",
    "messageType": "CallStateChangeMessage",
+
"call": {
    "notificationType": "StatusChange",
+
"id": "012PUFMMS0ASNAK48O7GK2LAES000004",
    "extensions": {
+
"state": "Dialing",
      "WrapUpTime": 0,
+
"callUuid": "012PUFMMS0ASNAK48O7GK2LAES000004",
      "BusinessCall": 0
+
"connId": "007102719260b004",
    },
+
"deviceUri": "http://hpe-voicevm-70.genesyslab.com:8090/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
    "call": {
+
"participants": [
      "id": "013V08JRL498H1OI04000VTAES00000G",
+
{
      "connId": "0072026cb98d140f",
+
"e164Number": "",
      "state": "Dialing",
+
"formattedPhoneNumber": "15002",
      "callUuid": "013V08JRL498H1OI04000VTAES00000G",
+
"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/013V08JRL498H1OI04000VTAES00000G",
+
}
      "participants": [
+
],
        "5001"
+
"dnis": "15002",
      ],
+
"callType": "Internal",
      "participantsInfo": [
+
"capabilities": [
        {
+
"SendDtmf",
          "digits": "5001",
+
"DeleteUserData",
          "e164Number": "5001",
+
"AttachUserData",
          "formattedPhoneNumber": "5001"
+
"DeleteUserDataPair",
        }
+
"Hangup",
      ],
+
"UpdateUserData"
      "dnis": "5001",
+
],
      "callType": "Internal",
+
"duration": "0",
      "capabilities": [
+
"mute": "Off",
        "DeleteUserDataPair",
+
"supervisorListeningIn": false,
        "AttachUserData",
+
"monitoredUserMuted": false,
        "Hangup",
+
"monitoring": false,
        "DeleteUserData",
+
"uri": "http://hpe-voicevm-70.genesyslab.com:8090/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
        "SendDtmf",
+
"path": "/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
        "UpdateUserData"
+
},
      ],
+
"phoneNumber": "15000",
      "duration": "0",
+
"extensions": {
      "mute": "Off",
+
"BusinessCall": 0
      "supervisorListeningIn": false,
+
},
      "monitoredUserMuted": false
+
"messageType": "CallStateChangeMessage",
    },
+
"metrics": {
    "phoneNumber": "5005"
+
"eventProcessing": {
  },
+
"nodeProcessingTimeNanos": 4911602,
  "channel": "/v2/me/calls"
+
"serverGenerationTimestamp": 1444920326391,
 +
"serverProcessingTimeTotalMs": 5
 +
}
 +
},
 +
  "channel": "/v2/me/calls",
 
}
 
}
</pre>
+
</source>
  
 
==Sample #2==
 
==Sample #2==

Revision as of 14:52, October 15, 2015

Dial

This operation is part of the Voice API section of the Genesys Web Services REST 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:
{ 
  "phoneNumber": "5551212" 
}
location An optional parameter that is used by GWS to set the "location" attribute for the corresponding TServer requests.
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": "15002"
  }
}

Response

{
  "statusCode": 0
}

Notification

{
	"notificationType": "StatusChange",
	"call": {
		"id": "012PUFMMS0ASNAK48O7GK2LAES000004",
		"state": "Dialing",
		"callUuid": "012PUFMMS0ASNAK48O7GK2LAES000004",
		"connId": "007102719260b004",
		"deviceUri": "http://hpe-voicevm-70.genesyslab.com:8090/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://hpe-voicevm-70.genesyslab.com:8090/api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES000004",
		"path": "/calls/012PUFMMS0ASNAK48O7GK2LAES000004"
	},
	"phoneNumber": "15000",
	"extensions": {
		"BusinessCall": 0
	},
	"messageType": "CallStateChangeMessage",
	"metrics": {
		"eventProcessing": {
			"nodeProcessingTimeNanos": 4911602,
			"serverGenerationTimestamp": 1444920326391,
			"serverProcessingTimeTotalMs": 5
		}
	},
   "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",
    "extensions": {
      "WrapUpTime": 0,
      "BusinessCall": 0
    },
    "call": {
      "id": "01NOSKNPB8AT3D4MUTCJ82LAES000111",
      "connId": "0072026cb98d140e",
      "state": "Dialing",
      "callUuid": "01NOSKNPB8AT3D4MUTCJ82LAES000111",
      "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/01NOSKNPB8AT3D4MUTCJ82LAES000111",
      "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!