Kapitan Teemo
Kapitan Teemo

Reputation: 2164

Twilio call next person from queue using PHP Laravel

I have this code in laravel

$client->calls->create(
     array(
        'from'=> '+6326263667',
        'to'=> ???,
        'url'=> 'twilio bin url'
     )
);

I don't know what to put in the "to" array. I'm copying the node version of this like:

client.calls.create({
   from: from,
   to: process.argv[2],
   url: url
})`

it there any other way if not like this?

Upvotes: 0

Views: 107

Answers (1)

LaylaCodesIt
LaylaCodesIt

Reputation: 166

Twilio Developer Evangelist here.

The to field is expecting the telephone number (in E.164 format) you wish to call.

In your Node example there, process.argv[2] is referring to the first argument passed to a command line operation.

If you want to learn more, I recommend you check out the Programmable Voice Quickstart for PHP.

Upvotes: 2

Related Questions