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}/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. | ||||||
telephoneEventPayloadType | number The payload type used for conveying telephone events. Please read RFC2833. | ||||||
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. | ||||||
Array of objects List of cryptos | |||||||
Array
|
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "telephoneEventPayloadType": 0,
- "replyId": "string",
- "receivePort": 0,
- "receiveIp": "string",
- "crypto": [
- {
- "suite": "string",
- "id": 0,
- "config": "string"
}
]
}
Response samples
- 200
{- "success": true
}
/{domain}/answerremotecall
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/answerremotecalljwt
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. | ||||||
telephoneEventPayloadType | number The payload type used for conveying telephone events. Please read RFC2833. | ||||||
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. | ||||||
Array of objects List of cryptos | |||||||
Array
|
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "telephoneEventPayloadType": 0,
- "replyId": "string",
- "receivePort": 0,
- "receiveIp": "string",
- "crypto": [
- {
- "suite": "string",
- "id": 0,
- "config": "string"
}
]
}
Response samples
- 200
{- "success": true
}
/{domain}/answerremotecalljwt
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/hangupcall
Terminate ongoing call handled by cloud SIP user agent. If the call has not yet been answered a busy will be sent otherwise the call will be hungup.
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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupcall
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/hangupcalljwt
Terminate ongoing call handled by cloud SIP user agent. If the call has not yet been answered a busy will be sent otherwise the call will be hungup.
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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupcalljwt
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "participantId": "string",
- "replyId": "string",
- "sessionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupparticipant
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "participantId": "string",
- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/hangupremoteparticipant
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string",
- "sessionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/interruptivrcommand
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
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}/placeivrcall
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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. | ||||||
telephoneEventPayloadType | number The payload type used for conveying telephone events. Please read RFC2833. | ||||||
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. | ||||||
Array of objects List of cryptos | |||||||
Array
| |||||||
callbackBaseUrl | string Base URL where callback notifications for the call triggered by the API is sent. |
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "destinationUri": "string",
- "telephoneEventPayloadType": 0,
- "sourceUser": "string",
- "receivePort": 0,
- "receiveIp": "string",
- "crypto": [
- {
- "suite": "string",
- "id": 0,
- "config": "string"
}
], - "callbackBaseUrl": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/placeremotecall
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/placeremotecalljwt
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. | ||||||
telephoneEventPayloadType | number The payload type used for conveying telephone events. Please read RFC2833. | ||||||
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. | ||||||
Array of objects List of cryptos | |||||||
Array
| |||||||
callbackBaseUrl | string Base URL where callback notifications for the call triggered by the API is sent. |
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "destinationUri": "string",
- "telephoneEventPayloadType": 0,
- "sourceUser": "string",
- "receivePort": 0,
- "receiveIp": "string",
- "crypto": [
- {
- "suite": "string",
- "id": 0,
- "config": "string"
}
], - "callbackBaseUrl": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/placeremotecalljwt
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/promptfile
List recorded prompt files
Authorizations:
path Parameters
domain required | string |
query Parameters
next | string |
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
next | string If there are additional results to retrieve, this value can be passed with the next request to retrieve them. If it is null there are no additional results. | ||||
success | boolean Indicates if the request was successful or not. | ||||
Array of objects List of files currently stored. | |||||
Array
|
Response samples
- 200
{- "next": "string",
- "success": true,
- "files": [
- {
- "size": 0,
- "name": "string"
}
]
}
/{domain}/promptfile/{filename}
Add or update recorded prompt file to IVR service
Authorizations:
path Parameters
filename required | string |
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Response samples
- 200
{- "success": true
}
/{domain}/promptfile/{filename}
Delete recorded prompt file from IVR service
Authorizations:
path Parameters
filename required | string |
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Response samples
- 200
{- "success": true
}
/{domain}/promptfile/{filename}
path Parameters
filename required | string |
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/promptfile/{filename}/move
Move a prompt file to an external destination. After the file has been moved it will no longer exist in its original location.
Authorizations:
path Parameters
filename required | string |
domain required | string |
Request Body schema: application/jsonrequired
bucketRegion required | string The AWS region of the destination S3 bucket. |
bucketName required | string The name of the destination S3 bucket. |
kmsKey | string Optional KMS key identifier for encrypting the destination object. The key must be configured to allow the following actions from our account: |
objectKey | string Optional destination object key in S3. Defaults to the prompt's current name. |
type required | string Value: "s3" The destination type. The supported options are:
|
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the request was successful or not. |
Request samples
- Payload
{- "bucketRegion": "string",
- "bucketName": "string",
- "kmsKey": "string",
- "objectKey": "string",
- "type": "s3"
}
Response samples
- 200
{- "success": true
}
/{domain}/promptfile/{filename}/move
path Parameters
filename required | string |
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/promptfile/{filename}/url
Get recorded prompt file url from IVR service
Authorizations:
path Parameters
filename required | string |
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Response Schema: application/json
reason | string User readable string explainging why the operation failed. Only present when success is false. |
success | boolean Indicates if the request was successful or not. |
error | string The full error as provided by underlying system. Only present when success if false. |
url | string The pre-signed URL to be used to retrieve the actual file.It is valid for 15 minutes. Only present if success is true. |
Content-Type | string |
Response samples
- 200
{- "reason": "string",
- "success": true,
- "error": "string",
- "url": "string"
}
/{domain}/promptfile/{filename}/url
path Parameters
filename required | string |
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/sendremotecallringback
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{domain}/sendremotecallringbackjwt
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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/sendremotecallringbackjwt
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string",
- "connectionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/splitconnection
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "recordingFileName": "string",
- "replyId": "string",
- "connectionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/startrecording
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/{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
Access-Control-Allow-Origin | string |
Response Schema: application/json
success | boolean Indicates if the API call was successful or not |
Request samples
- Payload
{- "replyId": "string",
- "connectionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/stoprecording
path Parameters
domain required | string |
Responses
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Response Schema: application/json
Response samples
- 200
{ }
/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. |
httpTransactionId | string An unique identifier for the http transaction. |
siteId | string The hybrid site id where the callback request originates from. Only present in hybrid deployments |
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
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",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab",
- "siteId": "siteA",
}
/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 |
sipResponseCode | number The SIP status code that was received. |
errorDescr | string A descriptive text that indicate what has caused the call setup failure. |
sipReason | string The SIP Reason header as received from remote party. |
siteId | string The hybrid site id where the callback request originates from. Only present in hybrid deployments |
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
Responses
Response Schema: application/json
action | string Action defines what IVR should do with the participants in a connection. It can take four values:
| ||||||||||||||
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 call action. | ||||||||||||||
callRecording | boolean Indicates if the call connected should be recorded. Media will be connected through the mediaservice and once the call is completed the recorded file is uploaded to the prompt storage. | ||||||||||||||
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 contact: header. | ||||||||||||||
contactUserParameters | object This property allow custom user parameters to be added to the user part of URL in 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 user part of the URL in contact: header. | ||||||||||||||
string or Array of objects | |||||||||||||||
One of string sip: URI to the destination to be called | |||||||||||||||
displayName | string If this property is set the value is set as display name in the the from: header of the SIP request in the case the action property is set to call | ||||||||||||||
dropCode | string Enum: "busy" "error" "numberNotFound" "numberNotActive" "dropNoMsg" "temporarilyUnavailable" Setting a dropCode for action drop in a callEvent response will trigger a SIP Bye request to the remaining participant in the connection, where the reason header is set based on the dropCode value. In case of a callEvent triggered during call set up where | ||||||||||||||
object Indicates if a greeting phrases should be played to participants before they are connected with each other. | |||||||||||||||
| |||||||||||||||
maxRingTime | number Decimal number of seconds to wait for destination to answer the calls. This value is used in case no per-destination specific value is set | ||||||||||||||
monitorDestAddr | string This property is used in combination with | ||||||||||||||
monitorPHeaders | object By default the P-headers are copied from the call to be monitored. This property allow custom P-headers to be added to the SIP request of the monitor call generated in case monitorDestAddr is set.
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"]}. To remove a X-header, set the value to | ||||||||||||||
monitorXHeaders | object By default the X-headers are copied from the call to be monitored. This property allow custom X-headers to be added to the SIP request of the monitor call generated in case monitorDestAddr is set.
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"]}. To remove a P-header, set the value to | ||||||||||||||
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"]}. | ||||||||||||||
ringbackTone | string It defines which ringback tone should be played for calling party if action is “call”: "default" means that standard ringback tone should be played on inbound leg until outbound leg is answered, "silent" means that silence should be played on inbound leg until outbound leg is answered | ||||||||||||||
recordingFileName | string The call recording filename used when uploading the recording to the prompt storage | ||||||||||||||
participantId | string Used as parameter for the connect action to tell which other participant the participant related to the callEvent sent should be connected with. | ||||||||||||||
sessionReferenceId | object Object that is retained for the session and passed in subsequent requests | ||||||||||||||
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 | ||||||||||||||
sipDiversionParameters | object An object of format {param:paramValue} which sets the header parameters for the diversion header | ||||||||||||||
sipFrom | string It defines which number should be placed in SIP-From header if action is “call”. If this parameter is omitted then number in SIP-From header should be copied from the SIP-From header in the inbound leg | ||||||||||||||
sipPAI | string It defines which number should be placed in SIP-PAI header if action is “call”. If this parameter is omitted then no SIP-PAI header should be included in the SIP-INVITE | ||||||||||||||
sipRPID | string It defines which number should be placed in SIP-RemotePartyId header if action is “call”. If this parameter is omitted then no SIP-RPID header should be included in the SIP-INVITE | ||||||||||||||
sipTo | string It defines which number should be placed in SIP-To header if action is “call”. If this parameter is omitted then cNumber should be placed in To header if action is “call” | ||||||||||||||
codec | string Enum: "PCMU" "PCMA" "GSM" This field is only applicable and mandatory for the httpcall action. The codec to be set in SDP to be received by the device behind CloudUA | ||||||||||||||
receiveIp | string This field is only applicable and mandatory for the httpcall action. The IP address that the device behind CloudUA want to receive media at | ||||||||||||||
receivePort | string This field is only applicable and mandatory for the httpcall action. The IP port that the device behind CloudUA want to receive media at | ||||||||||||||
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"]}. | ||||||||||||||
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 be copied. | ||||||||||||||
monitorSipFrom | string It defines which number should be placed in SIP-From header and PAI header in the call monitoring call if action is “call” and “monitorDestAddr“ is set. If this parameter is omitted then number in SIP-From header of the monitoring call should be copied from the SIP-From header in the inbound leg |
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,
- "sipResponseCode": 486,
- "errorDescr": "Request cancelled",
- "sipReason": "SIP ;cause=200 ;text=Call completed elsewhere",
- "siteId": "siteA",
}
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"
}
/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 The hybrid site id where the callback request originates from. Only present in hybrid deployments |
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
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": "siteA",
}
/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 |
siteId | string The hybrid site id where the callback request originates from. Only present in hybrid deployments |
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
Responses
Response Schema: application/json
sessionId | string The sessionId identifies the current session | ||||
object | |||||
|
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "calledParty": "ivr",
- "siteId": "siteA",
}
Response samples
- 200
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": {
- "foo": 1,
- "bar": 2
}
}
/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 | ||||||||
siteId | string The hybrid site id where the callback request originates from. Only present in hybrid deployments | ||||||||
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
Responses
Response Schema: application/json
sessionId | string The sessionId identifies the session | ||||||||||||||||||||||||||||||||||||||||
object | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
object | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Array of objects List of files to be played or text to be played after translating via TTS | |||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||
object If background prompt should be played after phrases listed above has been played and between commands. Background prompt ends when IVR session is completed wiht hangup:true | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
bargeIn | string If phrase should be interrupted if a DTMF match is detected during playout.
| ||||||||||||||||||||||||||||||||||||||||
recordedCallback | boolean If true, the IVR will send a fileRecorded callback when a file has been recorded | ||||||||||||||||||||||||||||||||||||||||
hangup | boolean If true, the IVR will hang up the current call when the phrases have been played out | ||||||||||||||||||||||||||||||||||||||||
getIVRCommandAfter | number Specifies after how many seconds after last prompt a new getIvrCommand request will be sent. If backgroundPrompt is defined then it will be played during this period. If no backgroundPrompt is defined then it will be silent during this period | ||||||||||||||||||||||||||||||||||||||||
replyId | string String to be copied to subsequent requests related to the command |
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": null,
- "ivrServer": null,
- "dtmfBuffer": null,
- "dtmfParams": {
- "dtmfMatch": "12",
- "reason": "terminationKey",
- "matchedTerminationKey": "#",
- "encryption": { }
}, - "replyId": null,
- "siteId": "siteA",
}
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",
- "region": "eu-west-1",
- "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"
}
/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 |
siteId | string The hybrid site id where the callback request originates from. Only present in hybrid deployments |
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
Responses
Response Schema: application/json
action | string Action defines what IVR should do with the participants in a connection. It can take four values:
| ||||||||||||||
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 call action. | ||||||||||||||
callRecording | boolean Indicates if the call connected should be recorded. Media will be connected through the mediaservice and once the call is completed the recorded file is uploaded to the prompt storage. | ||||||||||||||
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 contact: header. | ||||||||||||||
contactUserParameters | object This property allow custom user parameters to be added to the user part of URL in 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 user part of the URL in contact: header. | ||||||||||||||
string or Array of objects | |||||||||||||||
One of string sip: URI to the destination to be called | |||||||||||||||
displayName | string If this property is set the value is set as display name in the the from: header of the SIP request in the case the action property is set to call | ||||||||||||||
dropCode | string Enum: "busy" "error" "numberNotFound" "numberNotActive" "dropNoMsg" "temporarilyUnavailable" It gives extra info about why call is dropped when action is “drop”: "busy": means that customer that own access number has used all booked lines and call should be dropped with a busy signal, "numberNotFound": means that given bNumber is not defined in this ServiceNode, "numberNotActive": means that given bNumber is defined but not active in ServiceNode, "dropNoMsg": means that call should be dropped without any special message | ||||||||||||||
object Indicates if a greeting phrases should be played to participants before they are connected with each other. | |||||||||||||||
| |||||||||||||||
maxRingTime | number Decimal number of seconds to wait for destination to answer the calls. This value is used in case no per-destination specific value is set | ||||||||||||||
monitorDestAddr | string This property is used in combination with | ||||||||||||||
monitorPHeaders | object By default the P-headers are copied from the call to be monitored. This property allow custom P-headers to be added to the SIP request of the monitor call generated in case monitorDestAddr is set.
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"]}. To remove a X-header, set the value to | ||||||||||||||
monitorXHeaders | object By default the X-headers are copied from the call to be monitored. This property allow custom X-headers to be added to the SIP request of the monitor call generated in case monitorDestAddr is set.
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"]}. To remove a P-header, set the value to | ||||||||||||||
participantId | string Used as parameter for the connect action to tell which other participant the participant related to the callEvent sent should be connected with. | ||||||||||||||
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"]}. | ||||||||||||||
ringbackTone | string Enum: "default" "silent" "remoteGenerated" It defines which ringback tone should be played for calling party if action is “call”: "default" means that standard ringback tone should be played on inbound leg until outbound leg is answered, "silent" means that silence should be played on inbound leg until outbound leg is answered "remoteGenerated" means that the originating party localy will generate the ringback tone | ||||||||||||||
recordingFileName | string The call recording filename used when uploading the recording to the prompt storage | ||||||||||||||
sessionReferenceId | object Object that is retained for the session and passed in subsequent requests | ||||||||||||||
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 | ||||||||||||||
sipDiversionParameters | object An object of format {param:paramValue} which sets the header parameters for the diversion header | ||||||||||||||
sipFrom | string It defines which number should be placed in SIP-From header if action is “call”. If this parameter is omitted then number in SIP-From header should be copied from the SIP-From header in the inbound leg | ||||||||||||||
sipPAI | string It defines which number should be placed in SIP-PAI header if action is “call”. If this parameter is omitted then no SIP-PAI header should be included in the SIP-INVITE | ||||||||||||||
sipRPID | string It defines which number should be placed in SIP-RemotePartyId header if action is “call”. If this parameter is omitted then no SIP-RPID header should be included in the SIP-INVITE | ||||||||||||||
sipTo | string It defines which number should be placed in SIP-To header if action is “call”. If this parameter is omitted then cNumber should be placed in To header if action is “call” | ||||||||||||||
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"]}. | ||||||||||||||
monitorSipFrom | string It defines which number should be placed in SIP-From header and PAI header in the call monitoring call if action is “call” and “monitorDestAddr“ is set. If this parameter is omitted then number in SIP-From header of the monitoring call should be copied from the SIP-From header in the inbound leg |
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",
- "siteId": "siteA",
}
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"
}
/newRemoteCall
Request Body schema: application/json
Event sent when cloud SIP user agent has received a new incoming call. Use answerRemoteCall to answer it.
httpTransactionId | string An unique identifier for the http transaction. | ||||||
sessionId | string The sessionId identifies the session | ||||||
replyId | string The replyId property must be copied into subsequent requests related to this call. | ||||||
traceId | string The traceId is conveyed throughout the service and can be provided in the initial API-call. | ||||||
domain | string The domain configured for the tenant triggering the event | ||||||
ivrServer | string The ivrServer is the IP address of the node that sends the callback | ||||||
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. | ||||||
telephoneEventPayloadType | number The payload type use by the remote end to send telephone events such as DTFM, hook flash and FAX tones. | ||||||
Array of objects List of cryptos | |||||||
Array
|
Responses
Response Schema: application/json
sessionReferenceId | string If this is set the value will be copied into callback requests related to the session assiciated with the response. |
Request samples
- Payload
{- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab",
- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21...",
- "traceId": "9851cf70-1cc8-11ef-b3dd-9b598c1e38cf",
- "domain": "customer.prod-eu-north-1.iotcomms.io",
- "ivrServer": "127.0.0.1",
- "callId": "nfdfsij82893kn",
- "codec": "PCMA",
- "destinationUri": "sip:user@domain.com",
- "sourceUser": 1234567,
- "remoteRtpIp": "10.2.30.12",
- "remoteRtpPort": 20000,
- "telephoneEventPayloadType": 101,
- "crypto": [
- {
- "id": 0,
- "suite": "string",
- "config": "string"
}
]
}
Response samples
- 200
{- "sessionReferenceId": "mySessionReference"
}
/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"
}
/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. |
httpTransactionId | string An unique identifier for the http transaction. |
siteId | string The hybrid site id where the callback request originates from. Only present in hybrid deployments |
siteBaseUrl | string This property is present only in hybrid deployments and it indicates the base URL for API calls for site specific API calls for further actions related to the callback. |
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",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab",
- "siteId": "siteA",
}
/<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"
}