The AddOutgoingCallerId
method accepts a OutgoingCallerIdOptions
object as a method parameter, which you can use to provide a 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 will make a request to this URL when the verification call completes, passing you the result of the verification as the VerificationStatus
parameter. If you are using ASP.NET MVC you can just add this as an action method parameter:
public ActionMethod PostResult(string VerificationStatus) {
if (VerificationStatus=="success") {
}
}
Hope that helps.