Skip to content

Commit 0479dc3

Browse files
authored
Merge pull request #217513 from ashwinder/master
Update Call Automation Quickstart
2 parents 349980d + 2e3ac6f commit 0479dc3

File tree

9 files changed

+85
-185
lines changed

9 files changed

+85
-185
lines changed

articles/communication-services/.openpublishing.redirection.communication-services.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
"source_path_from_root": "/articles/communication-services/quickstarts/telephony/manage-inbound-calls.md",
7070
"redirect_url": "/azure/communication-services/how-tos/call-automation-sdk/redirect-inbound-telephony-calls",
7171
"redirect_document_id": false
72+
},
73+
{
74+
"source_path_from_root": "/articles/communication-services/how-tos/call-automation-sdk/subscribe-to-incoming-call.md",
75+
"redirect_url": "/azure/communication-services/concepts/voice-video-calling/incoming-call-notification",
76+
"redirect_document_id": false
7277
}
7378
]
7479
}

articles/communication-services/concepts/voice-video-calling/incoming-call-notification.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Given the above examples, the following scenarios will trigger an `IncomingCall`
3030
| Source | Destination | Scenario(s) |
3131
| ------ | ----------- | -------- |
3232
| Azure Communication Services identity | Azure Communication Services identity | Call, Redirect, Add Participant, Transfer |
33-
| Azure Communication Services identity | PSTN number owned by your Azure Communication Services resource | Call, Redirect, Add Participant
33+
| Azure Communication Services identity | PSTN number owned by your Azure Communication Services resource | Call, Redirect, Add Participant, Transfer
3434
| Public PSTN | PSTN number owned by your Azure Communication Services resource | Call, Redirect, Add Participant, Transfer
3535

3636
> [!NOTE]
@@ -46,7 +46,7 @@ This architecture has the following benefits:
4646
- PSTN number assignment and routing logic can exist in your application versus being statically configured online.
4747
- As identified in the above [calling scenarios](#calling-scenarios) section, your application can be notified even when users make calls between each other. You can then combine this scenario together with the [Call Recording APIs](../voice-video-calling/call-recording.md) to meet compliance needs.
4848

49-
To subscribe to the `IncomingCall` notification from Event Grid, [follow this how-to guide](../../how-tos/call-automation-sdk/subscribe-to-incoming-call.md).
49+
To check out a sample payload for the event and to learn about other calling events published to Event Grid, check out this [guide](../../../event-grid/communication-services-voice-video-events.md#microsoftcommunicationincomingcall).
5050

5151
## Call routing in Call Automation or Event Grid
5252

@@ -55,3 +55,7 @@ You can use [advanced filters](../../../event-grid/event-filtering.md) in your E
5555
## Number assignment
5656

5757
Since the `IncomingCall` notification doesn't have a specific destination other than the Event Grid subscription you've created, you're free to associate any particular number to any endpoint in Azure Communication Services. For example, if you acquired a PSTN phone number of `+14255551212` and want to assign it to a user with an identity of `375f0e2f-e8db-4449-9bf7-2054b02e42b4` in your application, you'll maintain a mapping of that number to the identity. When an `IncomingCall` notification is sent matching the phone number in the **to** field, you'll invoke the `Redirect` API and supply the identity of the user. In other words, you maintain the number assignment within your application and route or answer calls at runtime.
58+
59+
## Next steps
60+
- [Build a Call Automation application](../../quickstarts/voice-video-calling/callflows-for-customer-interactions.md) to simulate a customer interaction.
61+
- [Redirect an inbound PSTN call](../../how-tos/call-automation-sdk/redirect-inbound-telephony-calls.md) to your resource.

articles/communication-services/how-tos/call-automation-sdk/subscribe-to-incoming-call.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

articles/communication-services/quickstarts/voice-video-calling/callflows-for-customer-interactions.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ zone_pivot_groups: acs-csharp-java
2121
In this quickstart, you'll learn how to build an application that uses the Azure Communication Services Call Automation SDK to handle the following scenario:
2222
- handling the `IncomingCall` event from Event Grid
2323
- answering a call
24-
- playing an audio file
24+
- playing an audio file and recognizing input(DTMF) from caller
2525
- adding a communication user to the call such as a customer service agent who uses a web application built using Calling SDKs to connect to Azure Communication Services
2626

2727
::: zone pivot="programming-language-csharp"
@@ -32,13 +32,28 @@ In this quickstart, you'll learn how to build an application that uses the Azure
3232
[!INCLUDE [Call flows for customer interactions with Java](./includes/call-automation/Callflow-for-customer-interactions-java.md)]
3333
::: zone-end
3434

35+
## Subscribe to IncomingCall event
36+
37+
IncomingCall is an Azure Event Grid event for notifying incoming calls to your Communication Services resource. To learn more about it, see [this guide](../../concepts/voice-video-calling/incoming-call-notification.md).
38+
1. Navigate to your resource on Azure portal and select `Events` from the left side menu.
39+
1. Select `+ Event Subscription` to create a new subscription.
40+
1. Filter for Incoming Call event.
41+
1. Choose endpoint type as web hook and provide the public url generated for your application by ngrok. Make sure to provide the exact api route that you programmed to receive the event previously. In this case, it would be <ngrok_url>/api/incomingCall.
42+
![Screenshot of portal page to create a new event subscription.](./media/call-automation/event-susbcription.png)
43+
44+
1. Select create to start the creation of subscription and validation of your endpoint as mentioned previously. The subscription is ready when the provisioning status is marked as succeeded.
45+
46+
This subscription currently has no filters and hence all incoming calls will be sent to your application. To filter for specific phone number or a communication user, use the Filters tab.
47+
3548
## Testing the application
3649

37-
1. Place a call to the number you acquired in the Azure portal (see prerequisites above).
38-
2. Your Event Grid subscription to the `IncomingCall` should execute and call your web server.
39-
3. The call will be answered, and an asynchronous web hook callback will be sent to the NGROK callback URI.
40-
4. When the call is connected, a `CallConnected` event will be sent to your web server, wrapped in a `CloudEvent` schema and can be easily deserialized using the Call Automation SDK parser. At this point, the application will request audio to be played and input from a targeted phone number.
41-
5. When the input has been received and recognized, the web server will make a request to add a participant to the call.
50+
1. Place a call to the number you acquired in the Azure portal.
51+
2. Your Event Grid subscription to the `IncomingCall` should execute and call your application that will request to answer the call.
52+
3. When the call is connected, a `CallConnected` event will be sent to your application's callback url. At this point, the application will request audio to be played and to receive input from the caller.
53+
4. From your phone, press any three number keys, or press one number key and then # key.
54+
5. When the input has been received and recognized, the application will make a request to add a participant to the call.
55+
6. Once the added user answers, you can talk to them.
56+
4257

4358
## Clean up resources
4459

0 commit comments

Comments
 (0)