Automatic call disconnects in Twilio, and I think this is the reason:
controller
var lng="en-US";
var code="123456"
var twiml="<Say voice='alice' language='"+lng+"'>";
twiml+=Messages("callData", "","</Say><Pause length='1'/><Say voice='alice'>"+code.toList.mkString("</Say><Pause length='1'/><Say voice='alice'>"))(Lang(lng))+"</Say>"
Ok(views.xml.twilio(twiml))
twilio.scala.xml
@(twiml:String)
<Response>@twiml</Response>
But this is not working properly.
It shows the content but not as like xml, where Response tag shown in purple color and the string that I entered is in black.
When I check the Body of request in Request Inspector in my Twilio account, it shows me something like this.
<Say voice='alice'>4</Say>
I know its not a proper way to deal with xml.
Can anyone help me?