twilio-php

How do I get a call recording url in twilio when programming in PHP?

拥有回忆 提交于 2019-12-11 06:48:44
问题 I am completely new to Twilio and I need the call recording url of multiple phone calls, made from one account but with different sub-accounts and with an authority token. How to go about it? 回答1: Each recording has an ID, something like `RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'. The url for MP3 format is https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Recordings/RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.mp3?Download=false You can also get the url for WAV fromat https://api

Twilio to post gather digits with other details

独自空忆成欢 提交于 2019-12-11 03:10:51
问题 Can I send additional data with the gather digits by twilio. I am trying to achieve is if someone sends a text saying HELP , we would call a support team and ask them that we have received the text message and if they want to talk to then press 1, and if they press 1 we will be able to call to the number from we have received the text message. I was checking the twilio example and it sends the POST with the gather digits , can I post additional details , so a call will be made <Response>

Is there a way we can dial two numbers and make them join a conference

会有一股神秘感。 提交于 2019-12-11 02:47:12
问题 I am new to Twilio. Is it possible to make calls to two phone numbers and join them into a conference using Twilio-PHP? I know we can join two received calls into a conference, I'm wondering if we can do the same with two dialed calls. If yes , I would be grateful if someone refers me to that part of documentation. Thanks in Advance. 回答1: Twilio developer evangelist here. You absolutely can do that. When you initiate a call from within Twilio you pass three arguments, the number you're

Twilio - why i get in call status is in-progress also completed and my phone not ringing yet

别等时光非礼了梦想. 提交于 2019-12-08 11:37:55
问题 this is my code : require_once 'library/Twilio/autoload.php' use Twilio\Rest\Client account_sid ='ACXXXXXXX' auth_token ='xxxxx' twilio_number ='+1xxxx' to_number = "+212xxxx" client = new Client($account_sid, $auth_token) client->account->calls->create( to_number, twilio_number, array("method" => "GET","statusCallback" => "https://xxx.php", "statusCallbackEvent" => array('initiated', 'ringing', 'answered','completed'), "statusCallbackMethod" => "POST", "url" => "http://xxx.php" ) ) And this

How to put Twilio call on hold

不羁岁月 提交于 2019-12-08 09:45:14
问题 I am trying to implement following on Twilio, but not sure why I am not able to get it done correctly. I have initiated a call using standard Twilio procedures from twilio.device.connect . After a call is initiated, I am updating the call to new url in order to put it on hold. $client = new Services_Twilio($accountSid, $authToken); $call = $client->account->calls->get($call_sid); $call->update( array( "Url" => "http://localhost/voice.xml", "Method" => "POST", ) ); Now here instead of putting

Twilio hangup call through REST API not working?

北城以北 提交于 2019-12-08 04:07:44
问题 How to hang up the call whent it's status is in queued state(ringing or initiated)? None of the codes below have any effect on call, call continues to ring untill receiver picks up.Sometimes when agent realizes they are dialing wrong number they need a way to hangup the call in the middle of ringing. PHP code $client->calls($callRecord->call_sid)->update([ 'status' => 'canceled' ]); $client->calls($callRecord->call_sid)->update([ 'status' => 'completed' ]); $client->calls($callRecord->call

Receiving SMS and storing it in database using Twilio

怎甘沉沦 提交于 2019-12-07 09:28:20
问题 i am using Twilio API to send and receive sms from the customers. Every time i send the sms to my customers, i store the feilds like to , body in to my database. I have implemented the API for send message that works fine and am simply saving the fields in to my database. My Problem When i receive SMS from my customers to my twilio number. i want to get the fields like from number and the body and save to my databse. i looked that the documentation here https://www.twilio.com/docs/api/twiml

twilio catching error does not work

岁酱吖の 提交于 2019-12-06 06:25:24
I am implementing twilio in my laravel 5 application. To use it in the framework I use aloha/laravel-twilio integration. Sending a valid request with test-credentials works fine. I have problems when I want to implement an error-handling . For some reason the catch does not get the error, which results in a crash of the app. The error seems to be in the twilio-sdk if I read the error message correctly. Here is what I've done so far: <?php namespace App; use Illuminate\Database\Eloquent\Model; use Aloha\Twilio\TwilioInterface; class Activation extends Model { protected $fillable = array( 'a',

Twilio sending message Using twilio library

余生长醉 提交于 2019-12-06 04:23:05
Sending twilio message from my api returns this error Twilio sending message The requested resource /2010-04-01/Accounts//Messages.json was not found this is how I send a message. anyone incountered a problem? $this->client = new \Services_Twilio($sid, $token); return $this->client->account->messages->sendMessage($from ,$to, $message); this is the documentation I followed https://www.twilio.com/docs/api/rest/sending-sms How do I create Messages.json I used this https://github.com/twilio/twilio-php on laravel 4.2 Hi Twilio developer evangelist here. Sorry to hear you're having trouble with your

Twilio - Connecting an Enqueued call to an Agent

守給你的承諾、 提交于 2019-12-06 03:02:43
问题 I'm trying to create a phone system where a caller gets enqueued, and ideally, the system will then call out to an agent, who would then pickup and then modify the call to bridge the top of the queue. What I've accomplished thus far is the dialing loop, where a user calls in, and it dials agents in sequence, until someone picks up, or gives the user the option to leave a message or stay on the line while hearing it ring. And a simple enqueue with hold music. I just can't seem to figure out