(Update with the copy of version: 8.5.2DRAFT) |
|||
Line 49: | Line 49: | ||
===Request=== | ===Request=== | ||
− | < | + | <pre> |
− | POST api/v2/me/devices/ | + | POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls |
{ | { | ||
"operationName": "Dial", | "operationName": "Dial", | ||
"destination": { | "destination": { | ||
− | "phoneNumber": " | + | "phoneNumber": "5001" |
} | } | ||
} | } | ||
− | </ | + | </pre> |
===Response=== | ===Response=== | ||
− | < | + | <pre> |
{ | { | ||
"statusCode": 0 | "statusCode": 0 | ||
} | } | ||
− | </ | + | </pre> |
===Notification=== | ===Notification=== | ||
− | < | + | <pre> |
− | { | + | { |
− | + | "data": { | |
− | + | "messageType": "CallStateChangeMessage", | |
− | "call":{ | + | "notificationType": "StatusChange", |
− | + | "extensions": { | |
− | + | "WrapUpTime": 0, | |
− | + | "BusinessCall": 0 | |
− | + | }, | |
− | + | "call": { | |
− | + | "id": "013V08JRL498H1OI04000VTAES00000G", | |
− | + | "connId": "0072026cb98d140f", | |
− | + | "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/013V08JRL498H1OI04000VTAES00000G", | |
− | + | "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== | ==Sample #2== | ||
Line 118: | Line 119: | ||
===Request=== | ===Request=== | ||
− | < | + | <pre> |
− | POST api/v2/me/devices/ | + | POST api/v2/me/devices/efe1ab32-53f9-43ce-b65e-5768c61f7d4a/calls |
{ | { | ||
"operationName": "Dial", | "operationName": "Dial", | ||
"destination": { | "destination": { | ||
− | "phoneNumber": " | + | "phoneNumber": "5001" |
}, | }, | ||
"userData": { | "userData": { | ||
Line 129: | Line 130: | ||
} | } | ||
} | } | ||
− | </ | + | </pre> |
===Response=== | ===Response=== | ||
− | < | + | <pre> |
{ | { | ||
"statusCode": 0 | "statusCode": 0 | ||
} | } | ||
− | </ | + | </pre> |
===Notification=== | ===Notification=== | ||
− | < | + | <pre> |
− | { | + | { |
− | + | "data": { | |
− | + | "messageType": "CallStateChangeMessage", | |
− | "call":{ | + | "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" | ||
} | } | ||
− | </ | + | </pre> |
[[Category:V:HTCC:8.5.2]] | [[Category:V:HTCC:8.5.2]] |
Revision as of 20:13, October 23, 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": "5001" } }
Response
{ "statusCode": 0 }
Notification
{ "data": { "messageType": "CallStateChangeMessage", "notificationType": "StatusChange", "extensions": { "WrapUpTime": 0, "BusinessCall": 0 }, "call": { "id": "013V08JRL498H1OI04000VTAES00000G", "connId": "0072026cb98d140f", "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/013V08JRL498H1OI04000VTAES00000G", "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", "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!