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; }
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; }