Trying out something very basic in Twilio & C#. I am new to Twilio & I am not very strong with MVC
public class IncomingCallController : TwilioController
{
// GET: IncomingCall
[HttpGet]
public ActionResult Index()
{
var response = new VoiceResponse();
var dial = new Dial();
Response.ContentType = "text/xml";
response.Say("Please wait...transferring your call");
dial.Number("+919812345678");
return TwiML(response);
}
}
I need the above code snippet to return the static Twiml equivalent that I would have put in a Twiml bin.
I have configured the phone number to with a webhook url as http://someaddress.azurewebsites.net/IncomingCall
Why am i getting an
11210-HTTP bad host name
error
I understand that I am doing something wrong here. I have tried using both a POST and GET request.
Can anyone who has knowledge of this point me in the right direction?
Where am I going wrong?
Any help would be appreciated.