Mediaservice
Download OpenAPI specification:Download
The mediaservice API provides functionality to build the advanced interactive call flows where REST callbacks are triggered upon new incoming calls or changes in call state during ongoing calls. The REST endpoint allows interaction with the ongoing calls. It also provides functionality to play text to speech prompts, listen for DTMF tones and, record calls. It can also trigger outbound calls and connect the communication participants with each other.
/{domain}/stoprecording
Stop call recording for an already established call connection that is being recorded. This will trigger the recording file to be uploaded to prompt storage.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this to the value of replyId received in the callAnswered callback for the connection. |
connectionId | string The connectionId for connection to stop recording for. connectionId is provided in the callAnswered event that is sent when a connection is established. |
Responses
Request samples
- Payload
{- "replyId": "string",
- "connectionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupparticipant
Hang up call for a specified participant.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
participantId | string The id for the participant to be hung up. |
replyId | string Set this to the value of replyId receviced in the callNotify or callAnswered originating from the particpant or connection related to partcipant to be hung up. |
sessionId | string The id for the IVR session that executes the command. |
Responses
Request samples
- Payload
{- "participantId": "string",
- "replyId": "string",
- "sessionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/splitconnection
Split an IVR connection into individual disconnected participants. A callEvent is triggered per perticipant to get information on how to proceed.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this to the value of replyId received in the callAnswered callback for the connection |
connectionId | string The connectionId for connection to be split. This is provided in the callAnswered event that is sent when a connection is established. |
Responses
Request samples
- Payload
{- "replyId": "string",
- "connectionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/sendremotecallringback
Send ringback progress response for the call notified in the newRemoteCall callback.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this propery to the replyId received from the newRemoteCall callback to answer the call. |
Responses
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/startrecording
Start call recording for an already established call connection.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
recordingFileName | string The file name that will be used when the call recording is uploaded to the prompt storage. |
replyId | string Set this to the value of replyId received in the callAnswered callback for the connection. |
connectionId | string The connectionId for connection to be recorded. connectionId is provided in the callAnswered event that is sent when a connection is established. |
Responses
Request samples
- Payload
{- "recordingFileName": "string",
- "replyId": "string",
- "connectionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupcall
Terminate ongoing call handled by cloud SIP user agent.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this propery to the replyId received from the callAnswered callback to hang up the call. |
Responses
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/answerremotecall
Answer an incoming remote call indicated by the newRemoteCall callback.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
codec | string Specifies the voice codec to be requested from the remote side for the call. Allowed values are PCMA or PCMU |
sessionReferenceId | string This is an optional property to be set by the system calling the API. If this is set the value will be copied into callback requests related to the session originating from the API call. |
replyId | string Set this propery to the replyId received from the newRemoteCall callback to answer the call. |
receivePort | number Specifies the RTP port where the remote side shall send media. |
receiveIp | string Specifies the IP address that the remote side shall send media to. |
Responses
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "replyId": "string",
- "receivePort": 0,
- "receiveIp": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/placeremotecall
Send SIP invite request originating from cloud SIP user agent.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
codec | string Specifies the voice codec to be requested from the remote side for the call. Allowed values are PCMA,PCMU or GSM |
sessionReferenceId | string This is an optional property to be set by the system calling the API. If this is set the value will be copied into callback requests related to the session originating from the API call. |
destinationUri | string SIP URI for the remote side of the call to be set up by the cloud SIP user agent. |
sourceUser | string Specifies the user part of the from: URI for the call triggered. This will be indicated as the calling party number for the remote side. |
receivePort | number Specifies the RTP port where the remote side shall send media. |
receiveIp | string Specifies the IP address that the remote side shall send media to. |
callbackBaseUrl | string Base URL where callback notifications for the call triggered by the API is sent. |
Responses
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "destinationUri": "string",
- "sourceUser": "string",
- "receivePort": 0,
- "receiveIp": "string",
- "callbackBaseUrl": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/placeivrcall
Trigger an outbound call from IVR service to destination provided in destAddr. When called party answers a callAnswered and getIvrCommand event is sent for further processing.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
sipFrom | string User part of from: header in the. Set this to the phone number or user id to be displayed for the remote party. |
xHeaders | object This property allow custom X- headers to be added to the SIP request of the call generated in case the action is set to call. It take an object of format {x-header1:val1, x-header2:val2} as value resulting in the SIP headers and values X-Header1: val1 and X-Header2: val2. To set multiple header values for same header pass an array : {x-header3: [val1,val2]}. |
sessionReferenceId | object Optional sessionReferenceId object that is copied into the sessionReferenceId property in subsequent callback requests for the session created. |
sipDiversion | string It defines which number should be placed in SIP-Diversion header if action is “call”. If this parameter is omitted then no SIP-Diversion header should be included in the SIP-INVITE. |
displayName | string If this property is set the value is set as display name in the the from: header of the SIP request for the outgoing IVR call |
callerPrivacy | boolean Indicates if the calling party number should be hidden in the call that is set up from the IVR as result of the placeivrcall API request. |
contactParameters | object This property allow custom URL parameters to be added to the contact: header of the call generated in case the action is set to call. It take an object of format {prop1:val1, prop2:val2} as value resulting in the URL parameters prop1=val1;prop2=val2 to be appended to the URL in contact: header. |
sipDiversionParameters | object An object of format {param:paramValue} which sets the header parameters for the diversion header |
pHeaders | object This property allow custom P- headers to be added to the SIP request of the call generated in case the action is set to call. It take an object of format {p-header1:val1, p-header2:val2} as value resulting in the SIP headers and values P-Header1: val1 and P-Header2: val2. To set multiple header values for same header pass an array : {p-header3: [val1,val2]}. |
contactUserParameters | object This property allow custom user parameters to be added to the contact: header of the call generated in case the action is set to call. It take an object of format {prop1:val1, prop2:val2} as value resulting in the user parameters prop1=val1;prop2=val2 to be appended to the user part of URL in contact: header. |
destAddr | string SIP URI pointing to the destination to be connected with the IVR service. |
mediaserviceId | string If this property is set the value is matched against the |
maxRingTime | number Decimal number of seconds to wait for destination to answer the calls. |
Responses
Request samples
- Payload
{- "sipFrom": "string",
- "xHeaders": { },
- "sessionReferenceId": { },
- "sipDiversion": "string",
- "displayName": "string",
- "callerPrivacy": true,
- "contactParameters": { },
- "sipDiversionParameters": { },
- "pHeaders": { },
- "contactUserParameters": { },
- "destAddr": "string",
- "mediaserviceId": "string",
- "maxRingTime": 0
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupremoteparticipant
Hang up call for remote party of a specified participant.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
participantId | string The id for the participant for which it's remote party is to be hung up. |
replyId | string Set this to the value of replyId receviced in the callNotify or callEvent originating from the particpant or connection related to partcipant to be hung up. |
Responses
Request samples
- Payload
{- "participantId": "string",
- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/interruptivrcommand
Interrupt an ongoing IVR command and triggers a new /getIvrCommand request.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this to the value of replyId receviced in the getIvrCommand request that started the command to be interrupted. |
sessionId | string The id for the IVR session that executes the command. |
Responses
Request samples
- Payload
{- "replyId": "string",
- "sessionId": "string"
}
Response samples
- 200
{- "success": true
}
/callNotify
Request Body schema: application/json
Notifications sent by the IVR to indicate call events.
string or string or string Enum: "ringing" "reInvite" "update" | |
One of string Enum: "ringing" "reInvite" "update" 'ringing' indicates that ringing response has been received | |
monitoringParticipant | boolean Indicates if the event belong to a call monitoring leg |
participantId | string Unique id for the participant tha the event is associated with |
sessionId | string The sessionId identifies the session |
sessionReferenceId | string If this value has been set in invoking API call the value is copied to subsequent callback requests |
user | string SIP user part of the participant that caused the event to be sent |
remoteUser | string SIP user part for the participant of the remote side of the connection for the participant that caused the event to be sent |
remoteParticipantId | string Unique of for the participant of the remote side of the connection for the participant caused the event to be sent |
sipCallId | string The sipCallId is the corresponding value from SIP-Invite |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
traceId | string traceId is a unique identifier for an entire call that may span multiple sessions. Makes it easier to track calls through the platform. |
siteId | string An identifier for the specific site running the service. Only used in the hybrid environment |
httpTransactionId | string An unique identifier for the http transaction. |
Responses
Request samples
- Payload
{- "event": "ringing",
- "monitoringParticipant": false,
- "participantId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": 20000,
- "user": "+46890510",
- "remoteUser": "+46890200",
- "remoteParticipantId": "da9cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "sipCallId": 5473001594892095000,
- "ivrServer": "127.0.0.1",
- "traceId": "d9b15290-fa96-11ef-a9c8-631ff62a0f63",
- "siteId": "hy",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab"
}
/callAnswered
Request Body schema: application/json
Event sent when mediaservice call is connected to a pre configured callback endpoint
callingPartyNumber | string SIP user part of calling party in the call that has been connected |
callerParticipantId | string participantId of calling party in the call that has been connected |
calleeParticipantId | string participantId of called party in the call that has been connected |
remotePartyNumber | string SIP user part of called party in the call that has been connected |
connectionId | string The id for the connection that the participants in the call belongs to |
callingPartyExpires | number If the calling party SIP call leg has a session expiration the value is indicated here |
calledPartyExpires | number If the called party SIP call leg has a session expiration the value is indicated here |
codec | string Enum: "PCMU" "PCMA" "GSM" This field is only present if the httpcall action was used to connect the participants. The codec received in SDP to be used by the device behind CloudUA to send media to |
monitoringParticipant | boolean Indicates if the event belong to a call monitoring leg |
remoteRtpIp | string This field is only applicable and mandatory for the httpcall action. The IP address received in SDP to be used by the device behind CloudUA to send media to |
remoteRtpPort | string This field is only applicable and mandatory for the httpcall action. The IP port received in SDP to be used by the device behind CloudUA to send media to |
replyId | string The replyId property must be copied into subsequent requests related to this call. |
sessionReferenceId | object If this value has been set in invoking API call the value is copied to subsequent callback requests |
traceId | string traceId is a unique identifier for an entire call that may span multiple sessions. Makes it easier to track calls through the platform. |
siteId | string An identifier for the specific site running the service. Only used in the hybrid environment |
httpTransactionId | string An unique identifier for the http transaction. |
Responses
Request samples
- Payload
{- "callingPartyNumber": 46890510,
- "callerParticipantId": "d93f0370-c787-11eb-a47c-c9c4e460ef16",
- "calleeParticipantId": "da9cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "remotePartyNumber": 46890200,
- "connectionId": "da9ce5c0-c787-11eb-a47c-c9c4e460ef16",
- "callingPartyExpires": 600,
- "calledPartyExpires": 600,
- "codec": "GSM",
- "monitoringParticipant": false,
- "remoteRtpIp": "10.0.0.2",
- "remoteRtpPort": 45000,
- "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21...",
- "sessionReferenceId": { },
- "traceId": "d9b15290-fa96-11ef-a9c8-631ff62a0f63",
- "siteId": "hy",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab"
}
/newCall
Request Body schema: application/json
Indicates that a new call has been received by IVR in case IN is not used. Response indicate if call should be connected to IVR, transferred elsewhere or terminated.
sessionId | string The sessionId identifies the current session |
sipCallId | string The sipCallId is the corresponding value from SIP-Invite |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
callingPartyPrivacy | string The callingPartyPrivacy tells if aNumber is “public” or “secret” |
callingParty | string The value of the callingParty property is the user part of SIP URI in P-Asserted identity header of incoming SIP request or if this header is not present it is retrieved from the from: header. |
displayName | string The displayName property is set if there is a display-name present in either P-Asserted-Identity: header or from: header of the incoming request triggering the /newCall request. If it is present in both headers with different values the P-Asserted-Identity display-name value is used. |
fromUser | string The value of the fromUser property is the user part of SIP URI in from: header of incoming SIP request. NOTE: It is recommended to use value of the callingParty property since this is more thrustworthy since it consider the PAI header if present. The from: header is set by the user's device and may contain any number. |
xHeaders | object This property is set to an object that contains SIP headers starting with prefix X- in the inbound SIP request that triggered the /newCall callback and their values. The object is of format {"x-header1":"value1","x-header2":"value2"}. In case of multiple header values for same header it returns an array : {"x-header3": ["val1","val2"]}. |
pHeaders | object This property is set to an object that contains SIP headers starting with prefix P- in the inbound SIP request that triggered the /newCall callback and their values. The object is of format {"p-header1":"value1","p-header2":"value2"}. In case of multiple header values for same header it returns an array : {"p-header3": ["val1","val2"]}. |
copyHeaders | Array of strings This property is set to an array that contains the names of SIP headers starting with either the prefix P- or X- to copy from the incoming call. |
calledParty | string The calledParty is the access number that is used to access the IVR. |
diversionHeaders | string This value is present if the SIP request triggering the /newCall request had any diversion headers. The value holds the content of these headers. |
referredBy | string This value is present if the SIP request triggering the /newCall request had any referred-by header. The value holds the content of this header. |
paiNumber | string The paiNumber is the E.164-number presented in the SIP PAI header |
subject | string The subject is the value in the SIP subject header |
srcAddr | string The scrAddr is the IP address of the calling SBC |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sipCallId": 5473001594892095000,
- "ivrServer": "127.0.0.1",
- "callingPartyPrivacy": "public",
- "callingParty": "caller",
- "displayName": "Carl Carlsson",
- "fromUser": "fromUser",
- "xHeaders": { },
- "pHeaders": { },
- "copyHeaders": [
- "string"
], - "calledParty": "ivr",
- "diversionHeaders": "<sip:user@domain.com>;reason=time-of-day",
- "referredBy": "<sip:referrer@referrer.example>;cid=\"20398823.2UWQFN309shb3@referrer.example\"",
- "paiNumber": "string",
- "subject": "string",
- "srcAddr": "string"
}
Response samples
- 200
{- "action": "drop",
- "callerPrivacy": true,
- "callRecording": true,
- "contactParameters": { },
- "contactUserParameters": { },
- "destAddr": "string",
- "displayName": "Donald Duck",
- "dropCode": "busy",
- "greeting": {
- "playMode": "calleeFirst",
- "caller": {
- "phrases": [
- { }
]
}, - "callee": {
- "phrases": [
- { }
]
}
}, - "maxRingTime": 2,
- "monitorDestAddr": "sip:monitor@domain",
- "monitorPHeaders": { },
- "monitorXHeaders": { },
- "participantId": "c2af21a1-e90f-11ea-9564-1f1d01c9e7c9",
- "pHeaders": { },
- "ringbackTone": "default",
- "recordingFileName": "filename.mp3",
- "sessionReferenceId": { },
- "sipDiversion": 123456,
- "sipDiversionParameters": { },
- "sipFrom": "caller",
- "sipPAI": "caller",
- "sipRPID": 123456,
- "sipTo": "callee",
- "xHeaders": { },
- "monitorSipFrom": "monitor"
}
/getCallIdentifier
Request Body schema: application/json
Get call identifier from SN.
sessionId | string The sessionId identifies the current session |
calledParty | string The calledParty is the complete user part (typically phonenumber) from the SIP-URI |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "calledParty": "ivr"
}
Response samples
- 200
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": {
- "foo": 1,
- "bar": 2
}
}
/sessionCompleted
Request Body schema: application/json
Event sent when a mediaservice session is ended.
sessionId | string The sessionId identifies the current session |
domain | string The domain configured for the tenant triggering the event |
sessionDuration | string SIP user part of calling party in the call that has been connected |
reason | string participantId of calling party in the call that has been connected |
sessionReferenceId | object Object that is retained for the session and passed in subsequent requests |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
traceId | string traceId is a unique identifier for an entire call that may span multiple sessions. Makes it easier to track calls through the platform. |
siteId | string An identifier for the specific site running the service. Only used in the hybrid environment |
httpTransactionId | string An unique identifier for the http transaction. |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "domain": "customer.prod-eu-north-1.iotcomms.io",
- "sessionDuration": 46890510,
- "reason": "d93f0370-c787-11eb-a47c-c9c4e460ef16",
- "sessionReferenceId": { },
- "ivrServer": "127.0.0.1",
- "traceId": "d9b15290-fa96-11ef-a9c8-631ff62a0f63",
- "siteId": "hy",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab"
}
/callEvent
Request Body schema: application/json
Indicates that call related event on a connection occurred. It is either sent in case one party hang up the call or the /splitconnection API endpoint is called. If a party is hanging up the action provided in the response is applied on the remaining party in the connection. For /splitconnection one event is sent per connection participant and action applies for the participant.
connectionId | string Unique id of the connection that the participant that caused the event to be sent belonged to |
domain | string The domain configured for the tenant triggering the event |
event | string Enum: "callingPartyDrop" "calledPartyDrop" "callingPartyFailure" "calledPartyFailure" "callerConnectionSplit" "calleeConnectionSplit" The type of event that triggered the /callEvent to be sent |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
participantId | string Unique id for the participant that caused the event to be sent |
remoteParticipantId | string Unique of for the participant of the remote side of the connection for the participant caused the event to be sent |
remoteUser | string SIP user part for the participant of the remote side of the connection for the participant that caused the event to be sent |
sessionId | string The sessionId identifies the current session |
user | string SIP user part of the participant that caused the event to be sent |
sessionReferenceId | string If this value has been set in invoking API call the value is copied to subsequent callback requests |
Responses
Request samples
- Payload
{- "connectionId": "da5cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "domain": "customer.prod-eu-north-1.iotcomms.io",
- "event": "calledPartyDrop",
- "ivrServer": "127.0.0.1",
- "participantId": "da9cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "remoteParticipantId": "da9cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "remoteUser": "+46890200",
- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "user": "+46890510",
- "sessionReferenceId": 20000
}
Response samples
- 200
{- "action": "drop",
- "callerPrivacy": true,
- "callRecording": true,
- "contactParameters": { },
- "contactUserParameters": { },
- "destAddr": "string",
- "displayName": "Donald Duck",
- "dropCode": "busy",
- "greeting": {
- "playMode": "calleeFirst",
- "caller": {
- "phrases": [
- { }
]
}, - "callee": {
- "phrases": [
- { }
]
}
}, - "maxRingTime": 2,
- "monitorDestAddr": "sip:monitor@domain",
- "monitorPHeaders": { },
- "monitorXHeaders": { },
- "pHeaders": { },
- "ringbackTone": "default",
- "recordingFileName": "filename.mp3",
- "participantId": "c2af21a1-e90f-11ea-9564-1f1d01c9e7c9",
- "sessionReferenceId": { },
- "sipDiversion": 123456,
- "sipDiversionParameters": { },
- "sipFrom": "caller",
- "sipPAI": "caller",
- "sipRPID": 123456,
- "sipTo": "callee",
- "codec": "GSM",
- "receiveIp": "10.0.0.1",
- "receivePort": 30000,
- "xHeaders": { },
- "copyHeaders": [
- "string"
], - "monitorSipFrom": "monitor"
}
/newRemoteCall
Request Body schema: application/json
Event sent when cloud SIP user agent has received a new incoming call. Use answerRemoteCall to answer it.
replyId | string The replyId property must be copied into subsequent requests related to this call. |
callId | string The SIP Call-Id for the call that has been answered by the remote side |
codec | string The codec that the remote side want to receive. |
destinationUri | string The SIP request URI of the incoming call. |
sourceUser | string The user part of the SIP from: header of the incoming call |
remoteRtpIp | string The IP address that the remote side want to receive media on |
remoteRtpPort | number The RTP port that the remote side want to receive media on |
Responses
Request samples
- Payload
{- "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21...",
- "callId": "nfdfsij82893kn",
- "codec": "PCMA",
- "destinationUri": "sip:user@domain.com",
- "sourceUser": 1234567,
- "remoteRtpIp": "10.2.30.12",
- "remoteRtpPort": 20000
}
Response samples
- 200
{- "sessionReferenceId": "mySessionReference"
}
/getIvrCommand
Request Body schema: application/json
Requests a new IVR command from SN
sessionId | string The sessionId identifies the session | ||||||||
sessionReferenceId | string Uniquely identifies the call in the remote system | ||||||||
ivrServer | string The IP address of the IVR node originating the request | ||||||||
dtmfBuffer | string Holds the received DTMF digits in the buffer since last flushed. dtmfBuffer may be encrypted according to instructions in last response to getIvrCommand. If there are no DTMF in buffer then this parameter could be omitted | ||||||||
object | |||||||||
| |||||||||
replyId | string String to be copied in subsequent requests to the service. Also included in the 200 response |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": null,
- "ivrServer": null,
- "dtmfBuffer": null,
- "dtmfParams": {
- "dtmfMatch": "12",
- "reason": "terminationKey",
- "matchedTerminationKey": "#",
- "encryption": { }
}, - "replyId": null
}
Response samples
- 200
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": {
- "foo": 1,
- "bar": 2
}, - "dtmf": {
- "flush": true,
- "encryption": {
- "type": "md5",
- "salt": "string"
}, - "maxDigits": 10,
- "firstTimeout": 30,
- "betweenTimeout": 3,
- "terminationKey": "string"
}, - "phrases": [
- {
- "format": "awstts",
- "awsTTSParameters": null,
- "googleTTSParameters": null,
- "cacheTimeToLive": "WEEK",
- "refreshCache": true,
- "fileName": null
}
], - "backgroundPrompt": {
- "fileName": "string",
- "url": "string",
- "repeatPause": 0,
- "stop": true
}, - "bargeIn": "current",
- "recordedCallback": true,
- "hangup": true,
- "getIVRCommandAfter": 0,
- "replyId": "string"
}
/recordingReady
Request Body schema: application/json
Callback indicating that a started call recording have been complete and file is uploaded to prompt storage.
sessionId | string The sessionId identifies the session |
connectionId | string The connectionId for the call connection that was recorded |
recordingFileName | string The file name representing the recording in the prompt storage |
fileSize | integer The size of the recorded file in bytes |
ivrServer | string The ivrServer is the IP address of the node that sends the callback |
domain | string The domain for the tenant that use the service |
event | string Enum: "recordingSuccessful" "recordingFailed" The type of event that triggered the /recordingReady to be sent |
reason | string Indicates cause in case of failure. Present only if event equals recordingFailed. |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "connectionId": "9bb0eee0-c747-11ea-afa0-bd07728b88b7",
- "recordingFileName": "recording.mp3",
- "fileSize": 4711,
- "ivrServer": "127.0.0.1",
- "domain": "customer.prod-eu-north-1.iotcomms.io",
- "event": "recordingSuccessful",
- "reason": "No callee media received"
}
/<domain_configured>
Request Body schema: application/json
Notifications sent by the IVR to indicate unexpected events.
type | string Enum: "sessionError" "callEventError" "newCallEventError" "emergencyFallback" "ivrCommandError" "callError" The type of alarm event. The following types may be sent with the specified error types
|
domain | string The domain that triggered the alarm event |
sessionId | string The sessionId of the call that triggered the alarm event |
error | string Enum: "maxDuration" "No response to callEvent request" "Invalid sip address: <address>" "callEvent response with unknown action" "No action provided in callEvent response" "newCall response empty" "newCall response without action" "newCall response with unknown action" "newCall request failed" "triggeredByAlways" "triggeredByError" "phraseError" "mediaServerError" "Empty body in getIvrCommand response" "getIvrCommand request error" "IVR command failed" "RTP media timeout" "invalidSdp" "sessionExpired" "cancelFailed" "phraseRemoteCacheTimeout" The type of error that triggered the alarm event |
errorDetails | object Optional object that provide more details of the cause of the alarm event to be used for debug purpose. |
status | string Applicable for callError:unexpectedReinviteResponse - contains the status code received from the remote end. |
participantId | string Applicable for callError:unexpectedReinviteResponse - contains the participant ID. |
user | string Applicable for callError:unexpectedReinviteResponse - user that caused the response. |
callId | string Applicable for callError:unexpectedReinviteResponse - callId for that received the response. |
Responses
Request samples
- Payload
{- "type": "sessionError",
- "domain": "customer.prod-eu-north-1.iotcomms.io",
- "sessionId": "8eaf1600-c20b-11eb-9fdb-f32f171bb218",
- "error": "maxDuration",
- "errorDetails": { },
- "status": "string",
- "participantId": "string",
- "user": "string",
- "callId": "string"
}