Ejemplo n.º 1
0
 public static function call($to, $twiML)
 {
     $from = parent::getFrom();
     $client = parent::getServiceClient();
     try {
         $call = $client->account->calls->create($from, $to, $twiML);
     } catch (Exception $e) {
         Log::error($e);
         return false;
     }
     return false;
 }
Ejemplo n.º 2
0
 public static function send($to, $message)
 {
     try {
         $from = parent::getFrom();
         $client = parent::getServiceClient();
         $message = $client->account->messages->sendMessage($from, $to, $message);
         return $message->sid;
     } catch (Exception $e) {
         Log::error($e);
         return false;
     }
     return false;
 }