TwiML App unexpected end of call: Cannot find the declaration of element 'response'

后端 未结 1 1289
南笙
南笙 2021-01-21 22:18

I created TwiML application and set Voice request URL the web deployed ASP.NET-MVC aplication action method: http://voiceapp-001-site1.myasp.net/voice

This action method

1条回答
  •  -上瘾入骨i
    2021-01-21 22:46

    Hi Twilio developer evangelist here.

    Can you try modifying your view to look like this instead?

    
    
        
            @Html.Raw(ViewBag.NumberOfClient)
        
    
    

    Remember XML is case-sensitive, so the casing in your XML tags actually matter. Also, I would suggest using the Twilio.TwiML helper library. With that, you can get your XML generated for you with the right casing, and avoiding typos altogether.

    Here's how you'd do it:

    var twiml = new TwilioResponse();
    var dialAttributes = new {callerId = "48326304351"};
    
    var dial = twiml.Dial("+15555555555", dialAttributes);
    return TwiML(dial);
    

    0 讨论(0)
提交回复
热议问题