SMS not received

0

I'm trying to learn how to tinker with twilio by applying it to a same test project in ASP.NET MVC 5.

In the middle of my Google dig, I found this tutorial here that explains how to use it.

I did everything according to what is in this tutorial, but at the time of testing, I even get the message that the SMS was sent, but I do not receive any messages in my number ....

I do not know if I'm doing something wrong in my code, or if I'm making a mistake in the configuration on the site itself. I know that Brazilian numbers generated by twilio do not send a message yet, so I ended up creating another account and changing the number, since free account can not change numbers.

I also know that we can use test credentials to send messages without the need to pay for it. But they even work, but nothing to get message ...

Finally, I'll put here the controller (although I think the problem is in my account) so that someone can help me.

Controller

    public ActionResult Index()
    {
        ViewBag.SendSmsResultMessage = TempData.ContainsKey("SendSmsResultMessage") ? TempData["SendSmsResultMessage"] : String.Empty;
        return View();
    }

    [HttpPost]
     public ActionResult SendSms(string sid, string token, string fromPhoneNumber, string toPhoneNumber, string message)
     {
         var twilioClient = new TwilioRestClient(sid, token);
         var sendMessageResult = twilioClient.SendMessage(fromPhoneNumber, toPhoneNumber, message, "");

         if (sendMessageResult.RestException == null)
             TempData["SendSmsResultMessage"] = "Mensagem enviada com sucesso!";
         else
             TempData["SendSmsResultMessage"] = "Houve um erro durante a tentativa de enviar a mensagem: " + sendMessageResult.RestException.Message;

         return RedirectToAction("Index");
     }

Has anyone used their service to help me? Is there another tutorial on how to create numbers and make this test submission?

    
asked by anonymous 16.03.2015 / 22:59

1 answer

1

According to Twilio documentation

This feature is not available in Brazil.

Countries that have this feature (free SMS) are:

Australia, Austria, Belgium, Canada, Estonia, Finland, Germany, Hong Kong, Ireland, Lithuania, Mexico, Norway, Poland, Puerto Rico, Spain, Sweden, Switzerland, United Kingdom and
United States.

For connections, Brazil is included in the list of countries that have this function.

Just a reminder:

  

The rest of the world ...   Twilio is in the process of providing phone numbers in more countries as quickly as we can. Each country has different regulations regarding the purchase and sale of telephone numbers, so we are not able to provide timeline when numbers in a specific country will be available.

In other words: "Twilio is in the process of providing telephone numbers in more countries as quickly as possible. Each country has different regulations regarding the purchase and sale of telephone numbers, so we are not able to provide a timeline about when numbers in a specific country will be available. "

    
17.03.2015 / 04:19