Invoke-MgAnswerCommunicationCall
Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios.
Note
To view the beta release of this cmdlet, view Invoke-MgBetaAnswerCommunicationCall
Syntax
Invoke-MgAnswerCommunicationCall
-CallId <String>
[-ResponseHeadersVariable <String>]
[-AcceptedModalities <String[]>]
[-AdditionalProperties <Hashtable>]
[-CallOptions <Hashtable>]
[-CallbackUri <String>]
[-MediaConfig <Hashtable>]
[-ParticipantCapacity <Int32>]
[-Headers <IDictionary>]
[-PassThru]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-MgAnswerCommunicationCall
-CallId <String>
-BodyParameter <IPathsQvpqn4CommunicationsCallsCallIdMicrosoftGraphAnswerPostRequestbodyContentApplicationJsonSchema>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PassThru]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-MgAnswerCommunicationCall
-InputObject <ICloudCommunicationsIdentity>
[-ResponseHeadersVariable <String>]
[-AcceptedModalities <String[]>]
[-AdditionalProperties <Hashtable>]
[-CallOptions <Hashtable>]
[-CallbackUri <String>]
[-MediaConfig <Hashtable>]
[-ParticipantCapacity <Int32>]
[-Headers <IDictionary>]
[-PassThru]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-MgAnswerCommunicationCall
-InputObject <ICloudCommunicationsIdentity>
-BodyParameter <IPathsQvpqn4CommunicationsCallsCallIdMicrosoftGraphAnswerPostRequestbodyContentApplicationJsonSchema>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PassThru]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios.
Examples
Example 1: Answer a Peer-to-Peer VoIP call with service hosted media
Import-Module Microsoft.Graph.CloudCommunications
$params = @{
callbackUri = "callbackUri-value"
mediaConfig = @{
"@odata.type" = "#microsoft.graph.appHostedMediaConfig"
blob = "<Media Session Configuration Blob>"
}
acceptedModalities = @(
"audio"
)
callOptions = @{
"@odata.type" = "#microsoft.graph.incomingCallOptions"
isContentSharingNotificationEnabled = $true
}
participantCapacity = 200
}
Invoke-MgAnswerCommunicationCall -CallId $callId -BodyParameter $params
This example will answer a peer-to-peer voip call with service hosted media
Example 2: Answer VOIP call with application hosted media
Import-Module Microsoft.Graph.CloudCommunications
$params = @{
callbackUri = "https://bot.contoso.com/api/calls"
acceptedModalities = @(
"audio"
)
mediaConfig = @{
"@odata.type" = "#microsoft.graph.serviceHostedMediaConfig"
preFetchMedia = @(
)
}
}
Invoke-MgAnswerCommunicationCall -CallId $callId -BodyParameter $params
This example will answer voip call with application hosted media
Example 3: Answer a policy-based recording call
Import-Module Microsoft.Graph.CloudCommunications
$params = @{
callbackUri = "https://bot.contoso.com/api/calls"
acceptedModalities = @(
"audio"
)
mediaConfig = @{
"@odata.type" = "#microsoft.graph.appHostedMediaConfig"
blob = "<Media Session Configuration Blob>"
}
}
Invoke-MgAnswerCommunicationCall -CallId $callId -BodyParameter $params
This example will answer a policy-based recording call
Parameters
-AcceptedModalities
.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AdditionalProperties
Additional Parameters
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BodyParameter
. To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Type: | IPathsQvpqn4CommunicationsCallsCallIdMicrosoftGraphAnswerPostRequestbodyContentApplicationJsonSchema |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CallbackUri
.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CallId
The unique identifier of call
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CallOptions
incomingCallOptions
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Headers
Optional headers that will be added to the request.
Type: | IDictionary |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | ICloudCommunicationsIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MediaConfig
mediaConfig
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParticipantCapacity
.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Returns true when the command succeeds
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressAction
{{ Fill ProgressAction Description }}
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResponseHeadersVariable
Optional Response Headers Variable.
Type: | String |
Aliases: | RHV |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Graph.PowerShell.Models.ICloudCommunicationsIdentity
Microsoft.Graph.PowerShell.Models.IPathsQvpqn4CommunicationsCallsCallIdMicrosoftGraphAnswerPostRequestbodyContentApplicationJsonSchema
System.Collections.IDictionary
Outputs
System.Boolean
Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
BODYPARAMETER <IPathsQvpqn4CommunicationsCallsCallIdMicrosoftGraphAnswerPostRequestbodyContentApplicationJsonSchema>
: .
[(Any) <Object>]
: This indicates any property can be added to this object.[AcceptedModalities <String-
[]>]
:[CallOptions <IMicrosoftGraphIncomingCallOptions>]
: incomingCallOptions[(Any) <Object>]
: This indicates any property can be added to this object.[HideBotAfterEscalation <Boolean?>]
: Indicates whether to hide the app after the call is escalated.[IsContentSharingNotificationEnabled <Boolean?>]
: Indicates whether content sharing notifications should be enabled for the call.
[CallbackUri <String>]
:[MediaConfig <IMicrosoftGraphMediaConfig>]
: mediaConfig[(Any) <Object>]
: This indicates any property can be added to this object.
[ParticipantCapacity <Int32?>]
:
INPUTOBJECT <ICloudCommunicationsIdentity>
: Identity Parameter
[AttendanceRecordId <String>]
: The unique identifier of attendanceRecord[AudioRoutingGroupId <String>]
: The unique identifier of audioRoutingGroup[CallId <String>]
: The unique identifier of call[CallRecordId <String>]
: The unique identifier of callRecord[CallRecordingId <String>]
: The unique identifier of callRecording[CallTranscriptId <String>]
: The unique identifier of callTranscript[CommsOperationId <String>]
: The unique identifier of commsOperation[ContentSharingSessionId <String>]
: The unique identifier of contentSharingSession[MeetingAttendanceReportId <String>]
: The unique identifier of meetingAttendanceReport[OnlineMeetingId <String>]
: The unique identifier of onlineMeeting[ParticipantId <String>]
: The unique identifier of participant[PresenceId <String>]
: The unique identifier of presence[SessionId <String>]
: The unique identifier of session[UserId <String>]
: The unique identifier of user