I am using that markup
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="twilio.WebForm1" %>
<%--
style="height: 26px" />--%>
Fill in all fields and click Make this call.
To:
Message:
onclick="callpage_Click" />
my code behind is that
protected void callpage_Click(object sender, EventArgs e)
{
// Call porcessing happens here.
// Use your account SID and authentication token instead of
// the placeholders shown here.
string accountSID = "myid";
string authToken = "mytoken";
// Instantiate an instance of the Twilio client.
TwilioRestClient client;
client = new TwilioRestClient(accountSID, authToken);
// Retrieve the account, used later to retrieve the
Twilio.Account account = client.GetAccount();
string APIversuion = client.ApiVersion;
string TwilioBaseURL = client.BaseUrl;
this.varDisplay.Items.Clear();
if (this.toNumber.Text == "" || this.message.Text == "")
{
this.varDisplay.Items.Add(
"You must enter a phone number and a message.");
}
else
{
// Retrieve the values entered by the user.
string to = this.toNumber.Text;
string myMessage = this.message.Text;
// Create a URL using the Twilio message and the user-entered
// text. You must replace spaces in the user's text with '%20'
// to make the text suitable for a URL.
String Url = "https://demo.twilio.com/welcome/voice/?Message%5B0%5D="
+ myMessage.Replace(" ", "%20");
// Display the endpoint, API version, and the URL for the message.
this.varDisplay.Items.Add("Using Twilio endpoint "
+ TwilioBaseURL);
this.varDisplay.Items.Add("Twilioclient API Version is "
+ APIversuion);
this.varDisplay.Items.Add("The URL is " + Url);
// Instantiate the call options that are passed
// to the outbound call.
CallOptions options = new CallOptions();
// Set the call From, To, and URL values.
options.From = "+15016536555";
options.To = to;
options.Url = Url;
// Place the call.
var call = client.InitiateOutboundCall(options);
this.varDisplay.Items.Add("Call status: " + call.Status);
}
Myid and mytoken is replaced by origional values but i am not getting call ?call.status shows null
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Saroj Kumar SahuPosted Jun 9, 2015, 7:02 AM
Blocked AccountPosted Jun 9, 2015, 6:51 AM
Danish HabibPosted Jun 9, 2015, 6:00 AM
Saroj Kumar SahuPosted Jun 9, 2015, 5:51 AM