call_connection
Creates, updates, deletes, gets or lists a call_connection resource.
Overview
| Name | call_connection |
| Type | Resource |
| Id | azure.communication_call_automation.call_connection |
Fields
The following fields are returned by SELECT queries:
- get_participant
- get_call
| Name | Datatype | Description |
|---|---|---|
identifier | object | Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. |
isMuted | boolean | Is participant muted. |
isOnHold | boolean | Is participant on hold. |
| Name | Datatype | Description |
|---|---|---|
answeredBy | object | A user that got created with an Azure Communication Services resource. |
answeredFor | object | A phone number. |
callConnectionId | string | The call connection id. |
callConnectionState | string | The states of a call connection. Known values are: "unknown", "connecting", "connected", "transferring", "transferAccepted", "disconnecting", and "disconnected". |
callbackUri | string | The callback URI. |
correlationId | string | The correlation ID. |
mediaStreamingSubscription | object | Media streaming Subscription Object. |
serverCallId | string | The server call id. |
source | object | Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. |
sourceCallerIdNumber | object | A phone number. |
sourceDisplayName | string | Display name of the call if dialing out to a pstn number. |
targets | array | The targets of the call. |
transcriptionSubscription | object | Transcription Subscription Object. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_participant | select | call_connection_id, participant_raw_id, endpoint | Get participant from a call. Get participant from a call. | |
get_call | select | call_connection_id, endpoint | Get the detail properties of an ongoing call. Get the detail properties of an ongoing call. | |
hangup_call | delete | call_connection_id, endpoint | Hang up call automation service from the call. This will make call automation service leave the call, but does not terminate if there are more than 1 caller in the call. Hang up call automation service from the call. This will make call automation service leave the call, but does not terminate if there are more than 1 caller in the call. | |
get_participants | exec | call_connection_id, endpoint | Get participants from a call. Recording and transcription bots are omitted from this list. Get participants from a call. Recording and transcription bots are omitted from this list. | |
terminate_call | exec | call_connection_id, endpoint | Terminate a call using CallConnectionId. Terminate a call using CallConnectionId. | |
transfer_to_participant | exec | call_connection_id, endpoint, targetParticipant | Transfer the call to a participant. Transfer the call to a participant. | |
add_participant | exec | call_connection_id, endpoint, participantToAdd | Add a participant to the call. Add a participant to the call. | |
remove_participant | exec | call_connection_id, endpoint, participantToRemove | Remove a participant from the call using identifier. Remove a participant from the call using identifier. | |
mute | exec | call_connection_id, endpoint, targetParticipants | Mute participants from the call using identifier. Mute participants from the call using identifier. | |
cancel_add_participant | exec | call_connection_id, endpoint, invitationId | Cancel add participant operation. Cancel add participant operation. | |
move_participants | exec | call_connection_id, endpoint, targetParticipants, fromCall | Move a participant to the call. Move a participant to the call. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
call_connection_id | string | The call connection Id. Required. |
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
participant_raw_id | string | Raw id of the participant to retrieve. Required. |
SELECT examples
- get_participant
- get_call
Get participant from a call. Get participant from a call.
SELECT
identifier,
isMuted,
isOnHold
FROM azure.communication_call_automation.call_connection
WHERE call_connection_id = '{{ call_connection_id }}' -- required
AND participant_raw_id = '{{ participant_raw_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Get the detail properties of an ongoing call. Get the detail properties of an ongoing call.
SELECT
answeredBy,
answeredFor,
callConnectionId,
callConnectionState,
callbackUri,
correlationId,
mediaStreamingSubscription,
serverCallId,
source,
sourceCallerIdNumber,
sourceDisplayName,
targets,
transcriptionSubscription
FROM azure.communication_call_automation.call_connection
WHERE call_connection_id = '{{ call_connection_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
DELETE examples
- hangup_call
Hang up call automation service from the call. This will make call automation service leave the call, but does not terminate if there are more than 1 caller in the call. Hang up call automation service from the call. This will make call automation service leave the call, but does not terminate if there are more than 1 caller in the call.
DELETE FROM azure.communication_call_automation.call_connection
WHERE call_connection_id = '{{ call_connection_id }}' --required
AND endpoint = '{{ endpoint }}' --required
;
Lifecycle Methods
- get_participants
- terminate_call
- transfer_to_participant
- add_participant
- remove_participant
- mute
- cancel_add_participant
- move_participants
Get participants from a call. Recording and transcription bots are omitted from this list. Get participants from a call. Recording and transcription bots are omitted from this list.
EXEC azure.communication_call_automation.call_connection.get_participants
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
;
Terminate a call using CallConnectionId. Terminate a call using CallConnectionId.
EXEC azure.communication_call_automation.call_connection.terminate_call
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
;
Transfer the call to a participant. Transfer the call to a participant.
EXEC azure.communication_call_automation.call_connection.transfer_to_participant
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"targetParticipant": "{{ targetParticipant }}",
"operationContext": "{{ operationContext }}",
"transferee": "{{ transferee }}",
"operationCallbackUri": "{{ operationCallbackUri }}",
"customCallingContext": "{{ customCallingContext }}",
"sourceCallerIdNumber": "{{ sourceCallerIdNumber }}"
}'
;
Add a participant to the call. Add a participant to the call.
EXEC azure.communication_call_automation.call_connection.add_participant
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"sourceCallerIdNumber": "{{ sourceCallerIdNumber }}",
"sourceDisplayName": "{{ sourceDisplayName }}",
"participantToAdd": "{{ participantToAdd }}",
"invitationTimeoutInSeconds": {{ invitationTimeoutInSeconds }},
"operationContext": "{{ operationContext }}",
"operationCallbackUri": "{{ operationCallbackUri }}",
"customCallingContext": "{{ customCallingContext }}"
}'
;
Remove a participant from the call using identifier. Remove a participant from the call using identifier.
EXEC azure.communication_call_automation.call_connection.remove_participant
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"participantToRemove": "{{ participantToRemove }}",
"operationContext": "{{ operationContext }}",
"operationCallbackUri": "{{ operationCallbackUri }}"
}'
;
Mute participants from the call using identifier. Mute participants from the call using identifier.
EXEC azure.communication_call_automation.call_connection.mute
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"targetParticipants": "{{ targetParticipants }}",
"operationContext": "{{ operationContext }}"
}'
;
Cancel add participant operation. Cancel add participant operation.
EXEC azure.communication_call_automation.call_connection.cancel_add_participant
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"invitationId": "{{ invitationId }}",
"operationContext": "{{ operationContext }}",
"operationCallbackUri": "{{ operationCallbackUri }}"
}'
;
Move a participant to the call. Move a participant to the call.
EXEC azure.communication_call_automation.call_connection.move_participants
@call_connection_id='{{ call_connection_id }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"targetParticipants": "{{ targetParticipants }}",
"operationContext": "{{ operationContext }}",
"operationCallbackUri": "{{ operationCallbackUri }}",
"fromCall": "{{ fromCall }}"
}'
;