title: Unable to send Messages by Twilio Api using Zend Framework
body: <p>The Send SMS from Twilio <a href="https://www.twilio.com/docs/api/rest/subaccounts" rel="nofollow">Subaccounts</a> (and yes they are globally enabled message number) functionality not working for me.</p>
  
  <p>Here is the code for sending messages</p>
  
  <pre><code> public function notification($loggedUserId,$send_to){
      global $objSession;
      $modelUser = new Application_Model_User();      
      $data = $modelUser-&gt;getTwilio('twilio',$loggedUserId);
      // here in $data I got all data about subaccount 
       //by which a user is logged in and array i got is
      /* 
      Array
      (
       [twilio_id] =&gt; 1
       [twilio_trainer_id] =&gt; 147 (its logged user id)
       [twilio_phone] =&gt; +177*****09
       [twilio_sid] =&gt; ACfd42**********709***b***********
       [twilio_token] =&gt; 88a*************************da**
       [twilio_added] =&gt; 2014-04-29 19:42:14
      )*/
  
      // Step 1: Set Library.
      require_once(ROOT_PATH.'/library/twilio/Services/Twilio.php');
      // Step 2: set our AccountSid and AuthToken from www.twilio.com/user/account
      $AccountSid = $data['twilio_sid'];
      $AuthToken = $data['twilio_token'];
      $twilioPhone = $data['twilio_phone'];
  
  
      // Step 3: instantiate a new Twilio Rest Client
      $client = new Services_Twilio($AccountSid, $AuthToken);
      // Step 4: make an array of people we know, to send them a message. 
      // Feel free to change/add your own phone number and name here.
  
      $peopleInfo = $this-&gt;objUser-&gt;getUserData($send_to); 
      //prd($peopleInfo['user_phone']);
  
      // Step 5: Loop over all our friends. $number is a phone number above, and 
      // $name is the name next to it
  
  
      if(!empty($peopleInfo['user_phone'])){
          $sms = $client-&gt;account-&gt;messages-&gt;sendMessage(
              // Step 6: Change the 'From' number below to be a valid Twilio number 
              // that you've purchased, or the (deprecated) Sandbox number
              $twilioPhone,
              // the number we are sending to - Any phone number
              $peopleInfo['user_phone'],
              // the sms body
              "Hey , Monkey Party at 6PM. Bring Bananas!"
          );
          // Display a confirmation message on the screen
          echo "Sent Successufully ";
      }
      exit;
  }
  </code></pre>
  
  <p>Everything runs fine, but messages are not received on my number.
  Sent Successfully is printed, but no messages received.</p>
  
  <p>Can anyone see what am i doing wrong ?</p>