.NET
Add Voice View
In the Views directory, create a subdirectory called Voice. In the Voice directory, create an index.cshtml file that contains the following:
Replace the Contents of Index.cshtml with:
@using (Html.BeginForm("MakePhoneCall", "voice", FormMethod.Post))
{
<div class="form-vertical">
<h4>Call<h4>
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.Label("To")
<div>
@Html.Editor("toNumber", new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
<div class="form-group">
@Html.Label("From")
<div>
@Html.Editor("fromNumber", new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button type="submit">Send</button>
</div>
</div>
</div>
}
@if(@ViewBag.Uuid != null){
<h2>Call UUID: @ViewBag.Uuid</h2>
}
Play Audio into a Call with .NET
A tutorial showing you how to build an app that will play audio into a PSTN call
手順
1
Introduction to this tutorial2
Prerequisites3
Create .NET Voice Application4
Install Vonage Dotnet5
Add a Voice Controller6
Add Make Call Action7
Add a Receive Call Route8
Add a Voice View9
Set Startup Route10
Configure the ASP.NET App11
Run the .NET App12
What's Next?