Call Recording

Download OpenAPI specification:Download

call-recording_0

SIPRec API

This API provides functionality to get events related to SIPRec sessions and fetch and delete recording files.

SIPRec service API - prod-eu-north-1 Endpoints

Base url: https://api.prod-eu-north-1.iotcomms.io/callrecording

/{domain}/cancelrecording

POST

Cancels the ongoing recording not resulting in any saved recording.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
method
string

Describing the method called, in this case "CANCELRECORDING". example: "CANCELRECORDING"

replyId
string

An identifier for the specific call that needs to be copied from /recordingStarted. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

recordingId
string

An identifyer of the recording that needs to be included in all requests. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "method": "string",
  • "replyId": "string",
  • "recordingId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/cancelrecording

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/deleterecording

POST

Deletes the specifiec recording from the temporary storage. Should be performed after storerecording if recording is intended to be saved. Will result in a /recordingDeleted implicit callback.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
replyId
string

Set this to the value of replyId receviced in the getIvrCommand request that started the command to be interrupted. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

recordingId
string

An identifyer of the recording that needs to be included in all requests. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "replyId": "string",
  • "recordingId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/deleterecording

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/startfilerecording

POST

Starts a new SIPRec file recording.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
object
recordingReferenceId
object

Opaque object to correlate file recording events. It is sent in STREAMSTARTED, STREAMFAILED, and STREAMSTOPPED events.

method
string

Describing the method called, in this case "STARTFILERECORDING". example: "STARTFILERECORDING"

replyId
string

An identifier for the specific call that needs to be copied from SESSIONSTARTED callback. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

sessionId
string

An indentifier of the SIPRec session to start the file recording for. The value is copied from the SESSIONSTARED event. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
streamId
string

The recordingId for the started file recording

success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "fileTarget": {
    • "recordingReferenceId": { }
    },
  • "method": "string",
  • "replyId": "string",
  • "sessionId": "string"
}

Response samples

Content type
application/json
{
  • "streamId": "string",
  • "success": true
}

/{domain}/startfilerecording

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/startstream

POST

Start new AI connect stream.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
method
string

Describing the method called, in this case "STARTSTREAM". example: "STARTSTREAM"

replyId
string

An identifier for the specific call that needs to be copied from SESSIONSTARTED callback. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

sessionId
string

An indentifier of the SIPRec session to start the stream for. The value is copied from the SESSIONSTARED event. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

object
headers
object

Optional HTTP headers for the WebSocket handshake. The service will automatically insert a Bearer authorization header which will have the same value as configured for the /newCall callback. example: {"headerA":"valueA"}

trustSelfSigned
boolean

Allow self-signed TLS certificates if true.

channels
Array of arrays

List of audio-channel indices or objects with a label. You may reorder channels by specifying e.g. [1,0], or include a single element for mono (e.g. [0] or [{ label: "1" }]). The stream label is part of the SIPRec meta-data and is also included in the SIP SDP as an a=label attribute, where the channel identifier corresponds to the stream label.

chunkDuration
integer

Duration in milliseconds of each media chunk. Valid range is 20–2000 ms; values are rounded up to the nearest 10 ms interval. Default is 250 ms.

url
string

WS or WSS URL to connect to. example: ws://127.0.0.1:8765/

streamReferenceId
object

Opaque object to correlate streams. It is sent in STREAMSTARTED, STREAMFAILED, and STREAMSTOPPED events.

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
streamId
string

The streamId for the started stream

success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "method": "string",
  • "replyId": "string",
  • "sessionId": "string",
  • "streamTarget": {
    • "headers": { },
    • "trustSelfSigned": true,
    • "channels": [ ],
    • "chunkDuration": 0,
    • "url": "string",
    • "streamReferenceId": { }
    }
}

Response samples

Content type
application/json
{
  • "streamId": "string",
  • "success": true
}

/{domain}/startstream

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/stopfilerecording

POST

Stops SIPRec file recording.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
method
string

Describing the method called, in this case "STOPFILERECORDING". example: "STOPFILERECORDING"

replyId
string

An identifier for the specific call that needs to be copied from /recordingStarted. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

sessionId
string

An indentifier of the SIPRec session to stop the stream. The value is copied from the SESSIONSTARED event. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

recordingId
string

An indentifier of the AI Connect stream to stop. The value is copied from the RECORDINGSTARTED event. example: "83c7a361-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "method": "string",
  • "replyId": "string",
  • "sessionId": "string",
  • "recordingId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/stopfilerecording

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/stoprecording

POST

Stops the ongoing recording and saves the already recorded data.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
method
string

Describing the method called, in this case "STOPRECORDING". example: "STOPRECORDING"

replyId
string

An identifier for the specific call that needs to be copied from /recordingStarted. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

recordingId
string

The recording identifier id of the SIPRec recording to be stopped. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "method": "string",
  • "replyId": "string",
  • "recordingId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/stoprecording

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/stopsession

POST

Stops the ongoing SIPRec session and ongoing file recordings and AI connect streams.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
method
string

Describing the method called, in this case "STOPSESSION". example: "STOPSESSION"

replyId
string

An identifier for the specific call that needs to be copied from /sessionStarted. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

sessionId
string

The session identifier id of the session to be stopped. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "method": "string",
  • "replyId": "string",
  • "sessionId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/stopsession

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/stopstream

POST

Stops AI connect stream.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
method
string

Describing the method called, in this case "STOPSTREAM". example: "STOPSTREAM"

streamId
string

An indentifier of the AI Connect stream to stop. The value is copied from the STREAMSTARTED event. example: "83c7a361-cf9c-11ed-8779-876722fa3073"

replyId
string

An identifier for the specific call that needs to be copied from /sessionStarted. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

sessionId
string

An indentifier of the SIPRec session to stop the stream. The value is copied from the SESSIONSTARED event. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "method": "string",
  • "streamId": "string",
  • "replyId": "string",
  • "sessionId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/stopstream

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

/{domain}/storerecording

POST

Stores the specified recording at the specified location. Will generate a /recordingStored implicit callback when ready. This command may contain information on croping and masking the recording.

Authorizations:
jwtAuthorizer
path Parameters
domain
required
string
Request Body schema: application/json
required
destinationBucket
string

The bucket where a recording should be permanently stored. example: "recordings.sip.test-eu-west-1.iotcomms.io"

fileName
string

Optional property to set the name for the stored recording. If no value the recording will be stored with the name <date>-<recordingId>.mp3. example: "myRecording.mp3"

method
string

Describing the method called, in this case "STORERECORDING". example: "STORERECORDING"

replyId
string

An identifier for the specific call that needs to be copied from /recordingReady. example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6IjgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3MyIsImNvbW1hbmRRdWV1ZSI6Imh0dHBzOi8vc3FzLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tLzI5MjQzNTMwMDc3OS9hd3Njb2Rlc3Rhci1pb3Rjb21tcy1sYW1iZGEtdGVzdC1zbnNSZXNwb25zZVF1ZXVlLTFNNFJOQlJDUVFYMFUiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJhbGFybVRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJ0ZW1wQnVja2V0IjoicmVjb3JkaW5ncy5zaXAudGVzdC1ldS13ZXN0LTEuaW90Y29tbXMuaW8iLCJ0ZW1wS2V5IjoiMjMwMzMxLTgzYzdhMzYwLWNmOWMtMTFlZC04Nzc5LTg3NjcyMmZhMzA3My5tcDMiLCJpYXQiOjE2ODAyNTA2Nzd9.IcNtVkQ8RvTzKY1ZdpkvoCAcM9TzUA8i5-gsXa4cssk"

encryptionKey
string

Optional property to set an arbitrary encryption key for the stored file.

recordingId
string

An identifyer of the recording that needs to be included in all requests. example: "83c7a360-cf9c-11ed-8779-876722fa3073"

modificationParams
object

Optional object property to modify the recorded file before storage. Valid parameters are {absoluteTimes: bool, trim: {from: timestamp, to: timestamp}, mask: {from: timestamp, to: timestamp}} If absoluteTime is used, the timestamp is expressed in Unix Timestamp, otherwise in ms. example: "{"absoluteTimes":true,"trim":{"from":1680179455424,"to":1680179460221}}"

Responses

Response Headers
Access-Control-Allow-Origin
string
Response Schema: application/json
success
boolean

Indicates if the API call was successful or not

Request samples

Content type
application/json
{
  • "destinationBucket": "string",
  • "fileName": "string",
  • "method": "string",
  • "replyId": "string",
  • "encryptionKey": "string",
  • "recordingId": "string",
  • "modificationParams": { }
}

Response samples

Content type
application/json
{
  • "success": true
}

/{domain}/storerecording

OPTIONS
path Parameters
domain
required
string

Responses

Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Response Schema: application/json
object (Empty Schema)

Response samples

Content type
application/json
{ }

SIPRec service API - prod-eu-north-1 Callbacks

/newCall

POST
Request Body schema: application/json

A request https POST request is sent to the /newCall API resource of the remote system to query if the call should be recorded or not. Call setup is paused until a response have been received or after a timeout of the API call.

recordingId
string

The recordingId generated by the system to uniquely identify the recorded call.

metaData
string

The SIPRec metadata XML document from body of the call generating the SIPRec request.

sipRecCallId
string

The content of the SIP call-id header for the SIPRec request.

Responses

Response Schema: application/json
recordCall
boolean

Desides if the call should be recorded or not

Request samples

Content type
application/json
{
  • "recordingId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
  • "metaData": "<?xml version="1.0" encoding="UTF-8"?>\r\n<recording xmlns="urn:ietf:params:xml:ns:recording:1">\r\n <datamode>complete</datamode>\r\n <session session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <start-time>2015-05-19T09:42:06.911Z</start-time>\r\n </session>\r\n <participant participant_id="JaPQeP1CEeSA76sYHx7YVg==">\r\n <nameID aor="sip:808808@9.0.0.174">\r\n <name xml:lang="en">808808</name>\r\n </nameID>\r\n </participant>\r\n <participantsessionassoc participant_id="JaPQeP1CEeSA76sYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <associate-time>2015-05-19T09:42:06.911Z</associate-time>\r\n </participantsessionassoc>\r\n <stream stream_id="JaPQeP1CEeSA8KsYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <label>1</label>\r\n </stream>\r\n <participant participant_id="JaPQeP1CEeSA8qsYHx7YVg==">\r\n <nameID aor="sip:909909@9.0.0.174">\r\n <name xml:lang="en">909909</name>\r\n </nameID>\r\n </participant>\r\n <participantsessionassoc participant_id="JaPQeP1CEeSA8qsYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <associate-time>2015-05-19T09:42:06.911Z</associate-time>\r\n </participantsessionassoc>\r\n <stream stream_id="JaPQeP1CEeSA86sYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <label>2</label>\r\n </stream>\r\n <participantstreamassoc participant_id="JaPQeP1CEeSA76sYHx7YVg==">\r\n <send>foo1</send>\r\n <recv>foo2</recv>\r\n <send>foo3</send>\r\n <recv>foo4</recv>\r\n </participantstreamassoc>\r\n <participantstreamassoc participant_id="JaPQeP1CEeSA8qsYHx7YVg==">\r\n <send>foo1</send>\r\n <recv>foo2</recv>\r\n <send>foo3</send>\r\n <recv>foo4</recv>\r\n </participantstreamassoc>\r\n </recording>\r\n",
  • "sipRecCallId": 7260041678961334000
}

Response samples

Content type
application/json
{
  • "recordCall": true
}

/recordingCancelled

POST
Request Body schema: application/json

Notifications sent by the SIPREC server to indicate a recording has been cancelled. This describes the REST-based interface.

event
string

Describes the event type

recordingId
string

The recordingId identifies the recording

domain
string

The domain for witch the recording is being done

metaData
string

The metaData included in the original INVITE

replyId
string

An identifier of the implicit callback that needs to be included in any upcomming request within the recording session

commandQueue
string

An pointer to the queue where messages are being published

commandRegion
string

The region where the queue is situated

Responses

Request samples

Content type
application/json
{
  • "event": "RECORDINGCANCELLED",
  • "recordingId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
  • "domain": "sip.test.iotcomms.io",
  • "metaData": "<?xml version="1.0" encoding="UTF-8"?>\r\n<recording xmlns="urn:ietf:params:xml:ns:recording:1">\r\n <datamode>complete</datamode>\r\n <session session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <start-time>2015-05-19T09:42:06.911Z</start-time>\r\n </session>\r\n <participant participant_id="JaPQeP1CEeSA76sYHx7YVg==">\r\n <nameID aor="sip:808808@9.0.0.174">\r\n <name xml:lang="en">808808</name>\r\n </nameID>\r\n </participant>\r\n <participantsessionassoc participant_id="JaPQeP1CEeSA76sYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <associate-time>2015-05-19T09:42:06.911Z</associate-time>\r\n </participantsessionassoc>\r\n <stream stream_id="JaPQeP1CEeSA8KsYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <label>1</label>\r\n </stream>\r\n <participant participant_id="JaPQeP1CEeSA8qsYHx7YVg==">\r\n <nameID aor="sip:909909@9.0.0.174">\r\n <name xml:lang="en">909909</name>\r\n </nameID>\r\n </participant>\r\n <participantsessionassoc participant_id="JaPQeP1CEeSA8qsYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <associate-time>2015-05-19T09:42:06.911Z</associate-time>\r\n </participantsessionassoc>\r\n <stream stream_id="JaPQeP1CEeSA86sYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <label>2</label>\r\n </stream>\r\n <participantstreamassoc participant_id="JaPQeP1CEeSA76sYHx7YVg==">\r\n <send>foo1</send>\r\n <recv>foo2</recv>\r\n <send>foo3</send>\r\n <recv>foo4</recv>\r\n </participantstreamassoc>\r\n <participantstreamassoc participant_id="JaPQeP1CEeSA8qsYHx7YVg==">\r\n <send>foo1</send>\r\n <recv>foo2</recv>\r\n <send>foo3</send>\r\n <recv>foo4</recv>\r\n </participantstreamassoc>\r\n </recording>\r\n",
  • "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6ImY3MzFkODYwLWMyNzMtMTFlZC1hMzJjLWZkZGY3ZmQ0MjczYyIsImNvbnRyb2xJcCI6IjEwLjg1LjE2Ni41NCIsInJlY29yZGluZ1NlcnZlciI6IjEwLjg1LjE2Ni41NCIsInNlcnZpY2VEaXNjb3ZlcnlUYWJsZSI6ImF3c2NvZGVzdGFyLWlvdGNvbW1zLWxhbWJkYS10ZXN0LXNlcnZpY2VEYXRhLTFWU0xZWkFCOVM3WEkiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJjb21tYW5kUXVldWUiOiJodHRwczovL3Nxcy5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbS8yOTI0MzUzMDA3NzkvYXdzY29kZXN0YXItaW90Y29tbXMtbGFtYmRhLXRlc3Qtc25zUmVzcG9uc2VRdWV1ZS0xTTRSTkJSQ1FRWDBVIiwiaWF0IjoxNjc4ODAzODg0fQ.fgrK1GUJpHbH0qbU_4MOgsBgFH6i-aBX2U7K-muoQUw",
  • "commandRegion": "eu-west-1"
}

/recordingFailed

POST
Request Body schema: application/json

Notifications sent by the SIPREC server to indicate a recording has failed. This describes the REST-based interface.

event
string

Describes the event type

recordingId
string

The recordingId identifies the recording

domain
string

The domain for witch the recording is being done

replyId
string

An identifier of the implicit callback that needs to be included in any upcomming request within the recording session

commandQueue
string

An pointer to the queue where messages are being published

commandRegion
string

The region where the queue is situated

Responses

Request samples

Content type
application/json
{
  • "event": "RECORDINGFAILED",
  • "recordingId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
  • "domain": "sip.test.iotcomms.io",
  • "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6ImY3MzFkODYwLWMyNzMtMTFlZC1hMzJjLWZkZGY3ZmQ0MjczYyIsImNvbnRyb2xJcCI6IjEwLjg1LjE2Ni41NCIsInJlY29yZGluZ1NlcnZlciI6IjEwLjg1LjE2Ni41NCIsInNlcnZpY2VEaXNjb3ZlcnlUYWJsZSI6ImF3c2NvZGVzdGFyLWlvdGNvbW1zLWxhbWJkYS10ZXN0LXNlcnZpY2VEYXRhLTFWU0xZWkFCOVM3WEkiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJjb21tYW5kUXVldWUiOiJodHRwczovL3Nxcy5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbS8yOTI0MzUzMDA3NzkvYXdzY29kZXN0YXItaW90Y29tbXMtbGFtYmRhLXRlc3Qtc25zUmVzcG9uc2VRdWV1ZS0xTTRSTkJSQ1FRWDBVIiwiaWF0IjoxNjc4ODAzODg0fQ.fgrK1GUJpHbH0qbU_4MOgsBgFH6i-aBX2U7K-muoQUw",
  • "commandRegion": "eu-west-1"
}

/recordingStarted

POST
Request Body schema: application/json

Notifications sent by the SIPREC server to indicate a recording has started. This describes the REST-based interface.

event
string

Describes the event type

recordingId
string

The recordingId identifies the recording

domain
string

The domain for witch the recording is being done

metaData
string

The metaData included in the original INVITE

replyId
string

An identifier of the implicit callback that needs to be included in any upcomming request within the recording session

commandQueue
string

An pointer to the queue where messages are being published

commandRegion
string

The region where the queue is situated

Responses

Request samples

Content type
application/json
{
  • "event": "RECORDINGSTARTED",
  • "recordingId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
  • "domain": "sip.test.iotcomms.io",
  • "metaData": "<?xml version="1.0" encoding="UTF-8"?>\r\n<recording xmlns="urn:ietf:params:xml:ns:recording:1">\r\n <datamode>complete</datamode>\r\n <session session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <start-time>2015-05-19T09:42:06.911Z</start-time>\r\n </session>\r\n <participant participant_id="JaPQeP1CEeSA76sYHx7YVg==">\r\n <nameID aor="sip:808808@9.0.0.174">\r\n <name xml:lang="en">808808</name>\r\n </nameID>\r\n </participant>\r\n <participantsessionassoc participant_id="JaPQeP1CEeSA76sYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <associate-time>2015-05-19T09:42:06.911Z</associate-time>\r\n </participantsessionassoc>\r\n <stream stream_id="JaPQeP1CEeSA8KsYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <label>1</label>\r\n </stream>\r\n <participant participant_id="JaPQeP1CEeSA8qsYHx7YVg==">\r\n <nameID aor="sip:909909@9.0.0.174">\r\n <name xml:lang="en">909909</name>\r\n </nameID>\r\n </participant>\r\n <participantsessionassoc participant_id="JaPQeP1CEeSA8qsYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <associate-time>2015-05-19T09:42:06.911Z</associate-time>\r\n </participantsessionassoc>\r\n <stream stream_id="JaPQeP1CEeSA86sYHx7YVg==" session_id="JaPQeP1CEeSA66sYHx7YVg==">\r\n <label>2</label>\r\n </stream>\r\n <participantstreamassoc participant_id="JaPQeP1CEeSA76sYHx7YVg==">\r\n <send>foo1</send>\r\n <recv>foo2</recv>\r\n <send>foo3</send>\r\n <recv>foo4</recv>\r\n </participantstreamassoc>\r\n <participantstreamassoc participant_id="JaPQeP1CEeSA8qsYHx7YVg==">\r\n <send>foo1</send>\r\n <recv>foo2</recv>\r\n <send>foo3</send>\r\n <recv>foo4</recv>\r\n </participantstreamassoc>\r\n </recording>\r\n",
  • "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6ImY3MzFkODYwLWMyNzMtMTFlZC1hMzJjLWZkZGY3ZmQ0MjczYyIsImNvbnRyb2xJcCI6IjEwLjg1LjE2Ni41NCIsInJlY29yZGluZ1NlcnZlciI6IjEwLjg1LjE2Ni41NCIsInNlcnZpY2VEaXNjb3ZlcnlUYWJsZSI6ImF3c2NvZGVzdGFyLWlvdGNvbW1zLWxhbWJkYS10ZXN0LXNlcnZpY2VEYXRhLTFWU0xZWkFCOVM3WEkiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJjb21tYW5kUXVldWUiOiJodHRwczovL3Nxcy5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbS8yOTI0MzUzMDA3NzkvYXdzY29kZXN0YXItaW90Y29tbXMtbGFtYmRhLXRlc3Qtc25zUmVzcG9uc2VRdWV1ZS0xTTRSTkJSQ1FRWDBVIiwiaWF0IjoxNjc4ODAzODg0fQ.fgrK1GUJpHbH0qbU_4MOgsBgFH6i-aBX2U7K-muoQUw",
  • "commandRegion": "eu-west-1"
}

SIPRec service API - prod-eu-north-1 Service Alarms

/recordingReady

POST
Request Body schema: application/json

A request https POST request is sent to the /recordingReady API resource of the remote system to inform of the recording being ready and stored in the temporary storage.

recordingId
string

The recordingId generated by the system to uniquely identify the recorded call.

meta
string

The recordings metadata describing the containing streams. Sent in the format {recordingsPartsInfo: {callerStreams:[{start: timestamp, ssrc: ssrcRef}], calleeStreams: [{start: timestamp, ssrc, ssrcRef}]}}

sipRecCallId
string

The content of the SIP call-id header for the SIPRec request.

commandQueue
string

URL pointing to the SQS queue where the subsequent commands to interact with the recording should be sent.

domain
string

The domain for witch the recording is being done

replyId
string

An identifier of the implicit callback that needs to be included in any upcomming request within the recording session

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "recordingId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
  • "meta": "{\nrecordingsPartsInfo: {\ncallerStreams: [\n{\nstart: 1680093356094,\nssrc: 2773030717\n}\n],\ncalleeStreams: [\n{\nstart: 1680093356094,\nssrc: 3758356851\n}\n]\n}\n}",
  • "sipRecCallId": 7260041678961334000,
  • "domain": "sip.test.iotcomms.io",
  • "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJzeXN0ZW10ZXN0LnRlc3QuaW90Y29tbXMuaW8iLCJyZWNvcmRpbmdJZCI6ImY3MzFkODYwLWMyNzMtMTFlZC1hMzJjLWZkZGY3ZmQ0MjczYyIsImNvbnRyb2xJcCI6IjEwLjg1LjE2Ni41NCIsInJlY29yZGluZ1NlcnZlciI6IjEwLjg1LjE2Ni41NCIsInNlcnZpY2VEaXNjb3ZlcnlUYWJsZSI6ImF3c2NvZGVzdGFyLWlvdGNvbW1zLWxhbWJkYS10ZXN0LXNlcnZpY2VEYXRhLTFWU0xZWkFCOVM3WEkiLCJldmVudFRvcGljIjoiYXJuOmF3czpzbnM6ZXUtd2VzdC0xOjI5MjQzNTMwMDc3OTpmdW5jdGlvbnRlc3QtdGVzdC1mdW5jdGlvbnRlc3R0ZXN0dG9waWM4NzkzNjUxOS1QVHRhdWVhV0hRMGIiLCJjb21tYW5kUXVldWUiOiJodHRwczovL3Nxcy5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbS8yOTI0MzUzMDA3NzkvYXdzY29kZXN0YXItaW90Y29tbXMtbGFtYmRhLXRlc3Qtc25zUmVzcG9uc2VRdWV1ZS0xTTRSTkJSQ1FRWDBVIiwiaWF0IjoxNjc4ODAzODg0fQ.fgrK1GUJpHbH0qbU_4MOgsBgFH6i-aBX2U7K-muoQUw"
}

Response samples

Content type
application/json
{ }

call-recording_2

SIP Events Topic

Response Command Queue

Queue ARN: SQS URL provided in notification event parameter commandQueue

This is a queue that listens for response commands related to SNS events. The URL for the queue is passed in the commandQueue parameter of the event.

STOPRECORDING

This command is sent to the SQS response queue indicated in the RECORDINGSTARTED event to stop the ongoing recording. A recording file with the recorded content up until the command has been received will be generated and once this is complete a RECORDINGREADY event will be sent.

NOTE: This is a deprecated command to only be used with SIPRec session started with legacy method recordCall:true, instead use the STOPSESSION command for sessions with file recordings and AI Connect streams.

Parameters

Name Description
recordingId: string The recordingId of the recording to be stopped.
replyId: string This parameter must be set to the value received in the SNS RECORDINGSTARTED event to allow the service to associate the response command with initial event.

Example

{
    "method": "STOPRECORDING",
    "recordingId": "0de2bc60-14da-11e9-a3d8-2f24dd9af78e",
    "replyId": "fdkmlksfm38f8nfQekefmffmf..."
}

STOPSESSION

This command is sent to the SQS response queue indicated in the SESSIONSTARTED event to stop the ongoing SIPRec session and associated file recordings and AI Connect streams. Ongoing recordings and streams will be terminated and trigger RECORDINGREADY and SESSIONSTOPPED events before the session is completed with a SESSIONCOMPLETED event and the SIPRec session is terminated.

Parameters

Name Description
sessionId: string The sessionId of the SIPRec session to be stopped.
replyId: string This parameter must be set to the value received in the SNS SESSIONSTARTED event to allow the service to associate the response command with initial event.

Example

{
    "method": "STOPSESSION",
    "sessionId": "0de2bc60-14da-11e9-a3d8-2f24dd9af78e",
    "replyId": "fdkmlksfm38f8nfQekefmffmf..."
}

CANCELRECORDING

This command is sent to the SQS response queue indicated in the RECORDINGSTARTED event to cancel the ongoing recording. Any produced temporary recording files will be permanently deleted. When the files have been deleted a RECORDINGCANCELLED event will be sent.

Parameters

Name Description
recordingId: string The recordingId of the recording to be cancelled.
replyId: string This parameter must be set to the value received in the SNS RECORDINGSTARTED event to allow the service to associate the response command with initial event.

Example

{
    "method": "CANCELRECORDING",
    "recordingId": "0de2bc60-14da-11e9-a3d8-2f24dd9af78e",
    "replyId": "fdkmlksfm38f8nfQekefmffmf..."
}

MERGERECORDINGS

This command is sent to the SQS response queue indicated in the RECORDINGREADY event to merge multiple recordings into a single audio file and store it in permanent storage.

Parameters

Name Description
destinationBucket: string The name of the S3 bucket where the merged recording should be stored.
destinationRegion: string Optional region identifier if destinationBucket is in a different AWS region than where the recording service is running.
encryptionKey: string Optional ARN pointing to a key to be used for server-side encryption of the stored recording.
fileName: string Optional filename for the merged recording. If this parameter is missing, a default name will be used.
replyId: string This parameter must be set to the value received in the SNS RECORDINGREADY event to allow the service to associate the response command with the initial event.
toMerge: array An array of objects, each containing a recordingId and startTime of the recordings to be merged. This array is constructed from the recordingId and startTime from the RECORDINGREADY event and the values in the relatedRecordings property in the event. The array does not need to be sorted; the command will merge based on startTime, which is used to set the correct offset when merging the audio files into a single file. If duplicate conference audio should be removed, the conferenceSegments values should also be copied from the main recording and the related recording objects. If these are provided, only the audio from the audio file that started first will be used in the merged file during periods when a conference is active.

Example 1: MERGERECORDINGS

{
    "method": "MERGERECORDINGS",
    "destinationBucket": "recordingstorage.company.com",
    "destinationRegion": "us-west-2",
    "toMerge": [
        {
            "recordingId": "5e32bf50-89fd-11ef-966f-03e88116d7e5",
            "startTime": 1728890677283,
            "conferenceSegments": [
                {
                    "startTime": 1728890680444,
                    "endTime": 1728890687255
                }
            ]
        },
        {
            "recordingId": "601fe950-89fd-11ef-966f-03e88116d7e5",
            "startTime": 1728890680444,
            "conferenceSegments": [
                {
                    "startTime": 1728890680444,
                    "endTime": 1728890687255
                }
            ]

        },
        {
            "recordingId": "642ebad0-89fd-11ef-966f-03e88116d7e5",
            "startTime": 1728890687255,
            "conferenceSegments": [
                {
                    "startTime": 1728890680444,
                    "endTime": 1728890687255
                }
            ]
        }
    ],
    "fileName": "mergedrecording.mp3",
    "encryptionKey": "arn:aws:kms:region:account-id:key/key-id",
    "replyId": "fdkmlksfm38f8nfQekefmffmf..."
}

STARTFILERECORDING

This command is sent to the SQS response queue indicated in the SESSIONSTARTED event to start a file-based recording for a specific SIPRec session. When the file recording is established, a RECORDINGSTARTED event will be emitted. If the recording fails, a RECORDINGFAILED event will be sent.

Parameters

Name Description
method: string Must be set to STARTFILERECORDING.
replyId: string Identifier to correlate with the SESSIONSTARTED callback. Copy the value from the SNS SESSIONSTARTED event.
sessionId: string Identifier of the SIPRec session for which the file recording should be started.
fileTarget: object Target and options for file recording (see fields below).

fileTarget fields

Name Description
fileTarget.recordingReferenceId: object Opaque object to correlate file recording events. It will be echoed in RECORDINGSTARTED, RECORDINGFAILED, and RECORDINGSTOPPED events.

Example

{
    "method": "STARTFILERECORDING",
    "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...IcNtVkQ8RvTzKY1Z...",
    "sessionId": "83c7a360-cf9c-11ed-8779-876722fa3073",
    "fileTarget": {
        "recordingReferenceId": {
            "customerId": "acme-42",
            "case": "pilot-A"
        }
    }
}

STARTSTREAM

This command is sent to the SQS response queue indicated in the SESSIONSTARTED event to start a WebSocket audio stream for a specific SIPRec session. When the stream is established a STREAMSTARTED event will be emitted; failures produce a STREAMFAILED event; when stopped a STREAMSTOPPED event will be sent.

Parameters

Name Description
method: string Must be set to STARTSTREAM.
replyId: string Identifier to correlate with the SESSIONSTARTED callback. Copy the value from the SNS SESSIONSTARTED event.
sessionId: string Identifier of the SIPRec session to start streaming for.
streamTarget: object Target and options for the outgoing WebSocket stream (see fields below).

streamTarget fields

Name Description
streamTarget.url: string WS or WSS URL to connect to (for example: wss://stream.example.net/audio).
streamTarget.channels: array List of audio-channel indices or objects with a label. You may reorder channels, e.g., [1, 0], or stream mono by sending a single element (e.g., [0] or [{ "label": "1" }]). The label corresponds to SIPRec stream labels and SDP a=label.
streamTarget.chunkDuration: integer Size of each media chunk in milliseconds. Range 20–2000; rounded up to the nearest 10 ms. Default is 250 ms.
streamTarget.headers: object Optional HTTP headers for the WebSocket handshake. A Bearer Authorization header matching the /newCall callback configuration is added automatically.
streamTarget.trustSelfSigned: boolean If true, allow self-signed TLS certificates.
streamTarget.streamReferenceId: object Opaque correlation object echoed in STREAMSTARTED, STREAMFAILED, and STREAMSTOPPED events.

Example

{
    "method": "STARTSTREAM",
    "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...IcNtVkQ8RvTzKY1Z...",
    "sessionId": "83c7a360-cf9c-11ed-8779-876722fa3073",
    "streamTarget": {
        "url": "wss://stream.example.net/audio",
        "channels": [0, 1],
        "chunkDuration": 250,
        "headers": {
            "X-Correlation-Id": "call-83c7a360"
        },
        "trustSelfSigned": false,
        "streamReferenceId": {
            "customerId": "acme-42",
            "case": "pilot-A"
        }
    }
}

STOPFILERECORDING

This command is sent to the SQS response queue indicated in the SESSIONSTARTED event to stop an active file recording for a specific SIPRec session. When the recording has been stopped, a RECORDINGREADY event will be emitted.

Parameters

Name Description
method: string Must be set to STOPFILERECORDING.
replyId: string Identifier to correlate with the original RECORDINGSTARTED callback. Copy the value from the SNS RECORDINGSTARTED event.
sessionId: string Identifier of the SIPRec session for which the stream should be stopped.
recordingId: string Identifier of the AI Connect stream to stop. Copy the value from the RECORDINGSTARTED event.

Example

{
    "method": "STOPFILERECORDING",
    "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...IcNtVkQ8RvTzKY1Z...",
    "sessionId": "83c7a360-cf9c-11ed-8779-876722fa3073",
    "recordingId": "83c7a361-cf9c-11ed-8779-876722fa3073"
}

STOPSTREAM

This command is sent to the SQS response queue indicated in the SESSIONSTARTED event to stop an active WebSocket audio stream for a specific SIPRec session. When the stream has been stopped, a STREAMSTOPPED event will be emitted.

Parameters

Name Description
method: string Must be set to STOPSTREAM.
replyId: string Identifier to correlate with the original STREAMSTARTED callback. Copy the value from the SNS STRAMSTARTED event.
sessionId: string Identifier of the SIPRec session for which the stream should be stopped.
streamId: string Identifier of the AI Connect stream to stop. Copy the value from the STREAMSTARTED event.

Example

{
    "method": "STOPSTREAM",
    "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...IcNtVkQ8RvTzKY1Z...",
    "sessionId": "83c7a360-cf9c-11ed-8779-876722fa3073",
    "streamId": "83c7a361-cf9c-11ed-8779-876722fa3073"
}

STORERECORDING

This command is sent to the SQS response queue indicated in the RECORDINGREADY event to copy the recording from temporary to permanent storage.

Parameters

Name Description
destinationBucket: string The name of the S3 bucket that the file should be copied to.
destinationRegion: string Optional region identifier if destinationBucket is in a different AWS region than where the recording service is running.
encryptionKey: string Optional ARN pointing to a key to be used for server-side encryption of the stored recording.
fileName: string Optional filename for the permanently stored file. If this parameter is missing, .mp3 will be used as the file name.
modificationParams: object Optional object providing information on how to modify the recording before it is stored. The structure of modificationParams can be seen in Example 1 below.
recordingId: string The recordingId of the recording to be copied.
replyId: string This parameter must be set to the value received in the SNS RECORDINGREADY event to allow the service to associate the response command with the initial event.

Example 1: modificationParams

{
    "absoluteTimes": boolean,
    "mask": {
        "caller": [{"from": number, "to": number}],
        "callee": [{"from": number, "to": number}]
    },
    "trim": {"from": number, "to": number}
}

Where:

  • absoluteTimes indicates if the times are relative to the recording start in seconds or absolute timestamps in milliseconds since Jan 1st, 1970.

  • mask object is optional to specify if sections of the audio channel related to the caller or callee should be masked. An array with timestamps defining intervals to be masked is provided. The audio for these intervals will be replaced by a beep tone.

  • trim object is optional to specify a subset of the original recording as an interval to be saved.

Example 2: Full Command

{
    "method": "STORERECORDING",
    "destinationBucket": "recordingstorage.company.com",
    "destinationRegion": "us-west-2",
    "encryptionKey": "arnstring",
    "fileName": "myrecording.mp3",
    "modificationParams": {
        "absoluteTimes": true,
        "mask": {
            "caller": [
                {
                    "from": 1561988732565,
                    "to": 1561988733565
                },
                {
                    "from": 1561988735565,
                    "to": 1561988735965
                },
                {
                    "from": 1561988737565,
                    "to": 1561988738565
                }
            ],
            "callee": [
                {
                    "from": 1561988733565,
                    "to": 1561988734565
                }
            ]
        },
        "trim": {
            "from": 1561988732565,
            "to": 1561988738565
        }
    },
    "recordingId": "0de2bc60-14da-11e9-a3d8-2f24dd9af78e",
    "replyId": "fdkmlksfm38f8nfQekefmffmf..."
}

DELETERECORDING

This command is sent to the SQS response queue indicated in the RECORDINGREADY or RECORDINGSTORED event to copy the recording from temporary to permanent storage.

Parameters

Name Description
recordingId: string The recordingId of the recording to be copied.
replyId: string This parameter must be set to the value received in the SNS RECORDINGREADY or RECORDINGSTORED event to allow the service to associate the response command with the initial event.

Example

{
    "method": "DELETERECORDING",
    "recordingId": "0de2bc60-14da-11e9-a3d8-2f24dd9af78e",
    "replyId": "fdkmlksfm38f8nfQekefmffmf..."
}

Alarm Topic

This SNS topic is used to listen for alarms generated by the SIPRec service.

storeRecordingError

This alarm is generated if the STORERECORDING command fails.

Parameters

Name Description
type: string The type of alarm.
event: string The original SQS event that triggered the failed command.
error: string Error description

Example

{
    "type": "storeRecordingError",
    "error": "recordingId does not match eventId"
}

deleteRecordingError

This alarm is generated if the DELETERECORDING command fails.

Parameters

Name Description
type: string The type of alarm.
event: string The original SQS event that triggered the failed command.
error: string Error description

Example

{
    "type": "deleteRecordingError",
    "error": "recordingId does not match eventId"
}

recordingFailed

This alarm is generated if a recording failed with an error.

Parameters

Name Description
type: string The recording failed due to reason described in error.
recordingId: string The recordingId of the failed recording.
domain: string The domain of the tenant.
error: string Error description

Example

{
    "event": "recordingFailed",
    "type": "recordingFailed",
    "recordingId": "aa2763a0-f00d-11e9-b265-41d830bfc3ea",
    "domain": "sip.example.com",
    "error": "Recording completed with error\": { \"reason\":\"Error No RTP media received\", \"type\":\"stoppedWithoutMedia\"}"
}

stopFileRecordingFailed

This event is generated if a STOPFILERECORDING command failed with an error.

Parameters

Name Description
event: string Always set to STOPFILERECORDINGFAILED.
sessionId: string The SIPRec session identifier where the command failed.
recordingId: string The file recording identifier of the recording that could not be stopped.
domain: string The domain for which the command was issued.
replyId: string Identifier that must be included in subsequent requests within the session.
commandQueue: string The SQS queue where commands are published.
commandRegion: string The AWS region of the command queue.
error: string Description of the reason for the error.

Example

{
    "event": "STOPFILERECORDINGFAILED",
    "sessionId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
    "recordingId": "015b5b81-c275-11ed-a32c-fddf7fd4273c",
    "domain": "sip.test.iotcomms.io",
    "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.fgrK1GUJpHbH0qbU_4MOgsBgFH6i-aBX2U7K-muoQUw",
    "commandQueue": "https://sqs.eu-west-1.amazonaws.com/292435300779/awscodestar-iotcomms-lambda-test-snsResponseQueue-1M4RNBRCQQX0U",
    "commandRegion": "eu-west-1",
    "error": "recordingId not found"
}

stopStreamFailed

This event is generated if a STOPSTREAM command failed with an error.

Parameters

Name Description
event: string Always set to STOPSTREAMFAILED.
sessionId: string The SIPRec session identifier where the command failed.
streamId: string The AI Connect stream identifier that could not be stopped.
domain: string The domain for which the command was issued.
replyId: string Identifier from the SESSIONSTARTED event that must be included in subsequent requests within the session.
commandQueue: string The SQS queue where commands are published.
commandRegion: string The AWS region of the command queue.
error: string Description of the reason for the error.

Example

{
    "event": "STOPSTREAMFAILED",
    "sessionId": "015b5b80-c275-11ed-a32c-fddf7fd4273c",
    "streamId": "015b5b81-c275-11ed-a32c-fddf7fd4273c",
    "domain": "sip.test.iotcomms.io",
    "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.fgrK1GUJpHbH0qbU_4MOgsBgFH6i-aBX2U7K-muoQUw",
    "commandQueue": "https://sqs.eu-west-1.amazonaws.com/292435300779/awscodestar-iotcomms-lambda-test-snsResponseQueue-1M4RNBRCQQX0U",
    "commandRegion": "eu-west-1",
    "error": "streamId not found"
}

tempStorageError

Failure to store the recording in the temporary storage

Parameters

Name Description
type: string The type of alarm.
recordingId: string The recordingId of the failed recording.
domain: string The domain of the tenant.
error: string Error description
errorDetails: string Details for the error

Example

{
    "event": "tempStorageError",
    "type": "tempStorageError",
    "recordingId": "aa2763a0-f00d-11e9-b265-41d830bfc3ea",
    "domain": "sip.example.com"
}

stopRecordingError

This alarm is generated if the STOPRECORDING command fails.

Parameters

Name Description
type: string The type of alarm.
event: string The original SQS event that triggered the failed command.
error: string Error description

Example

{
    "type": "stopRecordingError",
    "error": "recordingId does not match eventId"
}

stopSessionError

This alarm is generated if the STOPSESSION command fails.

Parameters

Name Description
type: string The type of alarm.
event: string The original SQS event that triggered the failed command.
sessionId: string The sessionId for the session that failed to stop
error: string Error description

Example

{
    "type": "stopSessionError",
    "error": "recordingId does not match eventId",
    "sessionId": "9b1ace70-d0a4-11e9-841f-d3ec0b98f0e9"
}

cancelRecordingError

This alarm is generated if the CANCELRECORDING command fails.

Parameters

Name Description
type: string The type of alarm.
event: string The original SQS event that triggered the failed command.
error: string Error description

Example

{
    "type": "cancelRecordingError",
    "error": "recordingId does not match eventId"
}

eventNotificationError

This alarm is generated if a publishing a notification fails.

Parameters

Name Description
type: string The type of alarm.
event: string The original SQS event that triggered the failure.
error string

Example

{
    "type": "eventNotificationError",
    "error": "recordingId does not match eventId"
}

tempRecordingDeleted

This alarm is generated when a recording file is deleted from the temporary storage due to expiration. This means that it is automatically deleted and the DELETERECORDING command has not been sent in time.

Parameters

Name Description
type: string The type of alarm.
recordingId: string The recordingId of the recording being deleted.
domain: string The domain of the tenant.
service: string The affected service.
modifiedDate: string The timestamp of when the recording was last modified or created.
error: string Error description.

Example

{
    "event": "tempRecordingDeleted",
    "type": "tempRecordingDeleted",
    "recordingId": "aa2763a0-f00d-11e9-b265-41d830bfc3ea",
    "domain": "sip.example.com",
    "service": "siprec",
    "error": "Recording id 9b1ace70-d0a4-11e9-841f-d3ec0b98f0e9 expired."
}

apiRequestError

This alarm is generated if the system fails to call the newCall API endpoint.

Parameters

Name Description
type: string The type of alarm.
domain: string The domain of the tenant.
recordingId: string recordingId of the call that triggered the request.
error: string Error description
method: string HTTP request method of the failed request
requestUri: string HTTP request URI of the failed request
statusCode: number HTTP status code for the response to the failed request
statusMessage: string HTTP status message for the response to the failed request

Example

{
    "event": "apiRequestError",
    "type": "apiRequestError",
    "domain": "company.com",
    "recordingId": "0de2bc60-14da-11e9-a3d8-2f24dd9af78e",
    "error": "Error calling newCall API",
    "method": "POST",
    "requestUri": "https://example.com/newCall",
    "statusCode": 500,
    "statusMessage": "Internal Server Error"
}