Hello,
Franko from the Azure team here.
Thank you so much for your question and interest in using our libraries.
As an alternative of using the Azure Functions you described, you may use a webhook endpoint which relies on the Azure Dev Tunnel.
You can see how to use such webhook on this quickstart, and to learn how to set them up you can follow this other one.
Regarding your problem with the Play request: could you please provide your Azure ACS Resource, so we can check our logs to see what's happening?
In the meantime while we investigate, you can check if you are passing a valid callConnectionId
, or if you are correctly creating the URL where your WAV file is located.
As a reference, in this quickstart, they are getting the callConnectionId
from the event itself:
app.MapPost("/api/callbacks", async (CloudEvent[] cloudEvents, ILogger<Program> logger) =>
{
foreach (var cloudEvent in cloudEvents)
{
logger.LogInformation($"Event received: {JsonConvert.SerializeObject(cloudEvent)}");
CallAutomationEventBase parsedEvent = CallAutomationEventParser.Parse(cloudEvent);
logger.LogInformation($"{parsedEvent?.GetType().Name} parsedEvent received for call connection id: {parsedEvent?.CallConnectionId}");
var callConnection = callAutomationClient.GetCallConnection(parsedEvent.CallConnectionId);
var callMedia = callConnection.GetCallMedia();
if (parsedEvent is CallConnected)
{
//Handle Call Connected Event
}
}
});
Please, let me know your ACS resource for us to investigate further.
Thank you.