Cloud SIP UA
Download OpenAPI specification:Download
The Cloud SIP UA (User Agent) API enables thin devices that do not fit a full SIP-stack implementation to connect with SIP-based communication systems through REST APIs and real-time callbacks that mirror SIP signaling.
/mediaservice/{domain}/sendremotecallringback
Send ringback progress response for the call notified in the newRemoteCall callback.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this propery to the replyId received from the newRemoteCall callback to answer the call. |
Responses
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/mediaservice/{domain}/hangupcall
Terminate ongoing call handled by cloud SIP user agent.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
replyId | string Set this propery to the replyId received from the callAnswered callback to hang up the call. |
Responses
Request samples
- Payload
{- "replyId": "string"
}
Response samples
- 200
{- "success": true
}
/mediaservice/{domain}/answerremotecall
Answer an incoming remote call indicated by the newRemoteCall callback.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
codec | string Specifies the voice codec to be requested from the remote side for the call. Allowed values are PCMA or PCMU |
sessionReferenceId | string This is an optional property to be set by the system calling the API. If this is set the value will be copied into callback requests related to the session originating from the API call. |
replyId | string Set this propery to the replyId received from the newRemoteCall callback to answer the call. |
receivePort | number Specifies the RTP port where the remote side shall send media. |
receiveIp | string Specifies the IP address that the remote side shall send media to. |
Responses
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "replyId": "string",
- "receivePort": 0,
- "receiveIp": "string"
}
Response samples
- 200
{- "success": true
}
/mediaservice/{domain}/placeremotecall
Send SIP invite request originating from cloud SIP user agent.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
codec | string Specifies the voice codec to be requested from the remote side for the call. Allowed values are PCMA,PCMU or GSM |
sessionReferenceId | string This is an optional property to be set by the system calling the API. If this is set the value will be copied into callback requests related to the session originating from the API call. |
destinationUri | string SIP URI for the remote side of the call to be set up by the cloud SIP user agent. |
sourceUser | string Specifies the user part of the from: URI for the call triggered. This will be indicated as the calling party number for the remote side. |
receivePort | number Specifies the RTP port where the remote side shall send media. |
receiveIp | string Specifies the IP address that the remote side shall send media to. |
callbackBaseUrl | string Base URL where callback notifications for the call triggered by the API is sent. |
Responses
Request samples
- Payload
{- "codec": "string",
- "sessionReferenceId": "string",
- "destinationUri": "string",
- "sourceUser": "string",
- "receivePort": 0,
- "receiveIp": "string",
- "callbackBaseUrl": "string"
}
Response samples
- 200
{- "success": true
}
/callAnswered
Request Body schema: application/json
Event sent when mediaservice call is connected to a pre configured callback endpoint
callingPartyNumber | string SIP user part of calling party in the call that has been connected |
callerParticipantId | string participantId of calling party in the call that has been connected |
calleeParticipantId | string participantId of called party in the call that has been connected |
remotePartyNumber | string SIP user part of called party in the call that has been connected |
connectionId | string The id for the connection that the participants in the call belongs to |
callingPartyExpires | number If the calling party SIP call leg has a session expiration the value is indicated here |
calledPartyExpires | number If the called party SIP call leg has a session expiration the value is indicated here |
codec | string Enum: "PCMU" "PCMA" "GSM" This field is only present if the httpcall action was used to connect the participants. The codec received in SDP to be used by the device behind CloudUA to send media to |
monitoringParticipant | boolean Indicates if the event belong to a call monitoring leg |
remoteRtpIp | string This field is only applicable and mandatory for the httpcall action. The IP address received in SDP to be used by the device behind CloudUA to send media to |
remoteRtpPort | string This field is only applicable and mandatory for the httpcall action. The IP port received in SDP to be used by the device behind CloudUA to send media to |
replyId | string The replyId property must be copied into subsequent requests related to this call. |
sessionReferenceId | object If this value has been set in invoking API call the value is copied to subsequent callback requests |
traceId | string traceId is a unique identifier for an entire call that may span multiple sessions. Makes it easier to track calls through the platform. |
siteId | string An identifier for the specific site running the service. Only used in the hybrid environment |
httpTransactionId | string An unique identifier for the http transaction. |
Responses
Request samples
- Payload
{- "callingPartyNumber": 46890510,
- "callerParticipantId": "d93f0370-c787-11eb-a47c-c9c4e460ef16",
- "calleeParticipantId": "da9cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "remotePartyNumber": 46890200,
- "connectionId": "da9ce5c0-c787-11eb-a47c-c9c4e460ef16",
- "callingPartyExpires": 600,
- "calledPartyExpires": 600,
- "codec": "GSM",
- "monitoringParticipant": false,
- "remoteRtpIp": "10.0.0.2",
- "remoteRtpPort": 45000,
- "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21...",
- "sessionReferenceId": { },
- "traceId": "d9b15290-fa96-11ef-a9c8-631ff62a0f63",
- "siteId": "hy",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab"
}
/callFailed
Request Body schema: application/json
Event sent when call if the cloud SIP user agent fails to set up the call.
callId | string The SIP Call-Id for the call that failed. |
status | number SIP status code of the response from the remote side. |
reason | string SIP reason phrase of the response from the remote side. |
sessionReferenceId | string If this value has been set in invoking API call the value is copied to subsequent callback requests |
Responses
Request samples
- Payload
{- "callId": "nfdfsij82893kn",
- "status": 403,
- "reason": "Forbidden",
- "sessionReferenceId": 20000
}
/callNotify
Request Body schema: application/json
Notifications sent by the IVR to indicate call events.
string or string or string Enum: "ringing" "reInvite" "update" | |
One of string Enum: "ringing" "reInvite" "update" 'ringing' indicates that ringing response has been received | |
monitoringParticipant | boolean Indicates if the event belong to a call monitoring leg |
participantId | string Unique id for the participant tha the event is associated with |
sessionId | string The sessionId identifies the session |
sessionReferenceId | string If this value has been set in invoking API call the value is copied to subsequent callback requests |
user | string SIP user part of the participant that caused the event to be sent |
remoteUser | string SIP user part for the participant of the remote side of the connection for the participant that caused the event to be sent |
remoteParticipantId | string Unique of for the participant of the remote side of the connection for the participant caused the event to be sent |
sipCallId | string The sipCallId is the corresponding value from SIP-Invite |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
traceId | string traceId is a unique identifier for an entire call that may span multiple sessions. Makes it easier to track calls through the platform. |
siteId | string An identifier for the specific site running the service. Only used in the hybrid environment |
httpTransactionId | string An unique identifier for the http transaction. |
Responses
Request samples
- Payload
{- "event": "ringing",
- "monitoringParticipant": false,
- "participantId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "sessionReferenceId": 20000,
- "user": "+46890510",
- "remoteUser": "+46890200",
- "remoteParticipantId": "da9cbeb0-c787-11eb-a47c-c9c4e460ef16",
- "sipCallId": 5473001594892095000,
- "ivrServer": "127.0.0.1",
- "traceId": "d9b15290-fa96-11ef-a9c8-631ff62a0f63",
- "siteId": "hy",
- "httpTransactionId": "6f486ab0-fa96-11ef-a5b0-5d34730683ab"
}
/callHungup
Request Body schema: application/json
Event sent when the call served by the cloud SIP user agent has been hung up.
callId | string The SIP Call-Id for the call that was disconnected. |
sessionReferenceId | string If this value has been set in invoking API call the value is copied to subsequent callback requests |
Responses
Request samples
- Payload
{- "callId": "nfdfsij82893kn",
- "sessionReferenceId": 20000
}
/newRemoteCall
Request Body schema: application/json
Event sent when cloud SIP user agent has received a new incoming call. Use answerRemoteCall to answer it.
replyId | string The replyId property must be copied into subsequent requests related to this call. |
callId | string The SIP Call-Id for the call that has been answered by the remote side |
codec | string The codec that the remote side want to receive. |
destinationUri | string The SIP request URI of the incoming call. |
sourceUser | string The user part of the SIP from: header of the incoming call |
remoteRtpIp | string The IP address that the remote side want to receive media on |
remoteRtpPort | number The RTP port that the remote side want to receive media on |
Responses
Request samples
- Payload
{- "replyId": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21...",
- "callId": "nfdfsij82893kn",
- "codec": "PCMA",
- "destinationUri": "sip:user@domain.com",
- "sourceUser": 1234567,
- "remoteRtpIp": "10.2.30.12",
- "remoteRtpPort": 20000
}
Response samples
- 200
{- "sessionReferenceId": "mySessionReference"
}