-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Adding support for the microsoftteamsapp identifier #47770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d3181cc
c3d0e44
d4761f0
7e62794
5276dfc
e591c5a
d062acb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,10 @@ | |
| import com.azure.communication.callautomation.models.CreateCallResult; | ||
| import com.azure.communication.callautomation.models.RedirectCallOptions; | ||
| import com.azure.communication.callautomation.models.RejectCallOptions; | ||
| import com.azure.communication.common.CommunicationCloudEnvironment; | ||
| import com.azure.communication.common.CommunicationIdentifier; | ||
| import com.azure.communication.common.CommunicationUserIdentifier; | ||
| import com.azure.communication.common.MicrosoftTeamsAppIdentifier; | ||
| import com.azure.core.http.rest.Response; | ||
| import com.azure.core.util.Context; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
@@ -119,6 +121,32 @@ public void redirectCallWithResponse() { | |
| assertEquals(204, redirectCallResponse.getStatusCode()); | ||
| } | ||
|
|
||
| @Test | ||
| public void redirectCallWithMicrosoftTeamsAppIdentifier() { | ||
| CallAutomationClient callAutomationClient | ||
| = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204)))); | ||
| MicrosoftTeamsAppIdentifier teamsAppIdentifier | ||
| = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC); | ||
| CallInvite target = new CallInvite(teamsAppIdentifier); | ||
|
|
||
| callAutomationClient.redirectCall(CALL_INCOMING_CALL_CONTEXT, target); | ||
| } | ||
|
|
||
| @Test | ||
| public void redirectCallWithResponseMicrosoftTeamsAppIdentifier() { | ||
| CallAutomationClient callAutomationClient | ||
| = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204)))); | ||
| MicrosoftTeamsAppIdentifier teamsAppIdentifier | ||
| = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC); | ||
| CallInvite target = new CallInvite(teamsAppIdentifier); | ||
| RedirectCallOptions redirectCallOptions = new RedirectCallOptions(CALL_INCOMING_CALL_CONTEXT, target); | ||
|
|
||
| Response<Void> redirectCallResponse | ||
| = callAutomationClient.redirectCallWithResponse(redirectCallOptions, Context.NONE); | ||
|
|
||
| assertEquals(204, redirectCallResponse.getStatusCode()); | ||
| } | ||
|
Comment on lines
+124
to
+148
|
||
|
|
||
| @Test | ||
| public void rejectCall() { | ||
| CallAutomationClient callAutomationClient | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.