You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Renaming EventProcessor and Removing option
* Updating CallAutomation EventProcessor based on feedbacks:
- Updated name to CallAutomationEventProcessor
- WaitForEvent / WaitForSingleEvent renamed to be WaitForEventProcessor to be clear that it works with EventProcessor
- Async / Sync method added for all WaitForEvent
- Now supports CancellationToken
- Timeout to be applied with CalleationToken (See readme for detail)
- Unnessary abstract base classes removed, as they confuses developer (suggestion from review)
- Some EventResult will have useful infos without looking at the returned event
- CallAutomationOptions's option for event processor removed as its not needed anymore
- Testings updated accordingly
- Readme.md updated to show how to use EventProcessor
* Updated api file
* Updating api
---------
Co-authored-by: Min Woo Lee 🧊 <77083090+minwoolee-ms@users.noreply.github.com>
You need an [Azure subscription][azure_sub] and a [Communication Service Resource][communication_resource_docs] to use this package.
@@ -22,8 +22,6 @@ To create a new Communication Service, you can use the [Azure Portal][communicat
22
22
23
23
### Using statements
24
24
```C#
25
-
usingSystem;
26
-
usingSystem.Collections.Generic;
27
25
usingAzure.Communication.CallAutomation;
28
26
```
29
27
@@ -46,73 +44,131 @@ var client = new CallAutomationClient(endpoint, tokenCredential);
46
44
### Make a call to a phone number recipient
47
45
To make an outbound call, call the `CreateCall` or `CreateCallAsync` function from the `CallAutomationClient`.
48
46
```C#
49
-
CallSourcecallSource=newCallSource(
50
-
newCommunicationUserIdentifier("<source-identifier>"), // Your Azure Communication Resource Guid Id used to make a Call
51
-
);
52
-
callSource.CallerId=newPhoneNumberIdentifier("<caller-id-phonenumber>") // E.164 formatted phone number that's associated to your Azure Communication Resource
Your app will receive mid-connection call back events via the callbackEndpoint you provided. You will need to write event handler controller to receive the events and direct your app flow based on your business logic.
61
+
### Handle Mid-Connection callback events
62
+
Your app will receive mid-connection callback events via the callbackEndpoint you provided. You will need to write event handler controller to receive the events and direct your app flow based on your business logic.
// ...Do more actions, such as Play or AddParticipant, since the call is established...
164
+
}
165
+
catch (OperationCanceledExceptionex)
166
+
{
167
+
// Timeout exception happend!
168
+
// Call likely was never answered.
169
+
}
115
170
```
171
+
If cancellation token was not passed with timeout, the default timeout is 4 minutes.
116
172
117
173
## Troubleshooting
118
174
A `RequestFailedException` is thrown as a service response for any unsuccessful requests. The exception contains information about what response code was returned from the service.
0 commit comments