Contoso Phone Radio is simple service that will accept phonecall, and then play music to the caller.
- Utilizes Azure Communication Service (ACS) Call Automation
- Able to answer incoming PSTN or VoIP calls
- Play media to the caller
- Simply deploy to Azure with provided ARM template
- An Azure account with an active subscription.
- Provisioned Azure Communication Service resource
- (Optional) Acquire a PSTN phone number from the Azure Communication Service resource.
-
Make sure above Prerequisites are met.
-
Click on the Deploy to Azure Button
-
Fill out the values in the Deployment page
- Subscription / Resource Group: Select your provisioned Subscription and Resource group here.
- Azure Communication Services Resource Name: Name of your pre-provisioned ACS resource.
- Provision System Topic: If you do not have EventGrid system topic created under ACS resource above, select YES. If you already have EventGrid system topic, select NO.
- System Topic Name: Provide any unique name if you have selected YES above. If you already have EventGrid system topic under ACS, provide that name.
-
Review + Create.
-
Wait until provision finishes. May take up few minutes.
-
Once it is complete, You can test it by calling the PSTN phone number provisioned in Prerequisites.
Reference: Build a customer interaction workflow using Call Automation
- Install latest Visual Studio if you do not have it.
- Allow your localhost to accept incoming HTTP callbacks. You can use service like ngrok to have your localhost accessible to public network. This is required to accept events.
- Get Envrionment Variable of the followings added in your Visual Studio
- AppServiceEndpoint: your public endpoint from above ngrok.
- AzureCommunicationServiceKey: your ACS resource connection string.
- PlayMediaFileEndpoint: music .wav file to be played.
- Start your service
- On ACS portal, go events, create new webhook event with Incoming Call.
- Webhook end point will be your public endpoint + /incomingcallevents. (i.e. https://contoso.com/incomingcallevents)
- Verify that your incoming call eventgrid is successful on portal.
- You can test it by calling the PSTN phone number provisioned in Prerequisites.
- Call Automation Overview
- Incoming Call Concept
- Build a customer interaction workflow using Call Automation
- Redirect inbound telephony calls with Call Automation
- Quickstart: Play action
- Quickstart: Recognize action
- Read more about Call Recording in Azure Communication Services
- Record and download calls with Event Grid