title: Can't receive SMS through Twilio trial account in Rails 4
body: <p>I'm trying to implement <strong><em>phone number verification</em></strong> in my app and I've decided to go with <a href="https://github.com/twilio/twilio-ruby" rel="nofollow noreferrer"><strong><em>twilio-ruby</em></strong></a> after dumping <a href="https://github.com/getprove/prove-ruby" rel="nofollow noreferrer"><strong><em>prove-ruby</em></strong></a>.</p>
  
  <p>I created an account on <strong><em>twilio.com</em></strong>, verified my mobile number(<strong><em>India</em></strong>) to receive SMS, a phone number(<strong><em>US</em></strong> number which has given by Twilio) to send SMS and set up twilio in my app properly. Below is my code</p>
  
  <pre><code>#config/initializers/twilio.rb
  path = File.join(Rails.root, "config/twilio.yml")
  TWILIO_CONFIG = YAML.load(File.read(path))[Rails.env] || {'sid' =&gt; '', 'from' =&gt; '', 'token' =&gt; ''}
  
  #users_controller.rb
  class UsersController &lt; ApplicationController
  def new
    @user = User.new
  end
  
  def create
    @user = User.new(user_params)
    if @user.save
      render text: "Thank you! You will receive an SMS shortly with verification instructions."
  
      # Instantiate a Twilio client
      client = Twilio::REST::Client.new(TWILIO_CONFIG['sid'], TWILIO_CONFIG['token'])
  
      # Create and send an SMS message
      client.messages.create(
        from: TWILIO_CONFIG['from'],
        to: @user.phone,
        body: "Thanks for signing up. To verify your account, please reply HELLO to this message."
      )
    else
      render :new
    end
  end
  
  private
  def user_params
    params.require(:user).permit(:name, :email, :phone)
  end
  end
  
  #new.html.erb
  &lt;h1&gt;User Registration&lt;/h1&gt;
  
  &lt;%= form_for @user do |f| %&gt;
    &lt;% if @user.errors.any? %&gt;
      &lt;ul&gt;
      &lt;% @user.errors.full_messages.each do |msg| %&gt;
        &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
      &lt;% end %&gt;
      &lt;/ul&gt;
    &lt;% end %&gt;
  
    &lt;p&gt;&lt;%= f.label :name %&gt;&lt;br&gt;
    &lt;%= f.text_field :name%&gt;&lt;/p&gt;
  
    &lt;p&gt;&lt;%= f.label :email %&gt;&lt;br&gt;
    &lt;%= f.text_field :email%&gt;&lt;/p&gt;
  
    &lt;p&gt;&lt;%= f.label :phone %&gt;&lt;br&gt;
    &lt;%= f.text_field :phone%&gt;&lt;/p&gt;
  
    &lt;%= f.submit %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>The problem is I can't receive SMS on my mobile. Below is the screen-shot of the <strong><em>logs</em></strong> on my <strong><em>twilio account</em></strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/xeWrn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xeWrn.png" alt="enter image description here"></a></p>
  
  <p>According to <a href="https://stackoverflow.com/questions/23845957/will-twilio-trial-account-send-an-actual-message"><strong><em>this</em></strong></a> post(see comments), it seems all Twilio SMS are marked as <strong><em>PROMOTIONAL</em></strong> category in India (at the moment). So if one has registered in <strong><em>Do Not Call</em></strong> registry maintained by Indian Govt, then he/she will not receive any promotional SMSs.</p>
  
  <p>It makes sense as I activated <strong><em>DND(Do Not Disturb)</em></strong> on my mobile number long back which blocks any promotional SMSs coming to my mobile.</p>
  
  <p>If that's the case I also tried another mobile number(<strong><em>which don't have DND activated</em></strong>), verified it but I don't get any message on it too.</p>
  
  <p>What I'm doing wrong?</p>