i using twilio appi phone verification snippet generating verification call.
validationrequestresult result = client.addoutgoingcallerid(options.to, generatedverificationoption());
i want check either call successful or not
the addoutgoingcallerid
method accepts outgoingcalleridoptions
object method parameter, can use provide statuscallback
url.
var options = outgoingcalleridoptions() { statuscallback="http://example.com/result" } result = client.addoutgoingcallerid("+15555555555", options); if (result.restexception!=null) { debug.writeline("error making validation phone call"); }
twilio make request url when verification call completes, passing result of verification verificationstatus
parameter. if using asp.net mvc can add action method parameter:
public actionmethod postresult(string verificationstatus) { if (verificationstatus=="success") { } }
hope helps.
Comments
Post a Comment