You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to code some PHP for an outbound call conference room. The point of the conference room is to make a temporary solution for our customers calling one of our call centers, who need to be transferred, and automatically placed in a call with the other call center. This is exactly what we need, but having this error.
I already tried SMS and standard calls and those work fine. When I run the code below for conference calls, I get this error.
Fatal error: Call to undefined method Services_Twilio::request()
I have my conference.xml file already, like so.
<?php// The PHP Twilio helper library. Get it here http://www.twilio.com/docs/libraries/require('twilio-php/Services/Twilio.php');
$API_VERSION = '2010-04-01';
$ACCOUNT_SID = 'my sid #';
$AUTH_TOKEN = 'my auth_token';
$client = newServices_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
// The phone numbers of the people to be called$participants = array('customer#', 'call-center#');
// Go through the participants array and call each person.foreach ($participantsas$particpant)
{
$vars = array(
'From' => 'my #',
'To' => $participant,
'Url' => 'conference.xml');
$response = $client->request("/$API_VERSION/Accounts/$ACCOUNT_SID/Calls", "POST", $vars);
}
?>
It's getting an error on line 23, which is the line with the $response on it. Can you tell what's going wrong? I'm working off this code that Twilio provided. The part that says "Reach Out and Call Somebody". I changed TwilioRestClient to Services_Twilio because that is the newer version.
I am trying to code some PHP for an outbound call conference room. The point of the conference room is to make a temporary solution for our customers calling one of our call centers, who need to be transferred, and automatically placed in a call with the other call center. This is exactly what we need, but having this error.
I already tried SMS and standard calls and those work fine. When I run the code below for conference calls, I get this error.
Fatal error: Call to undefined method Services_Twilio::request()
I have my conference.xml file already, like so.
And my conference.php file looks like this:
It's getting an error on line 23, which is the line with the $response on it. Can you tell what's going wrong? I'm working off this code that Twilio provided. The part that says "Reach Out and Call Somebody". I changed TwilioRestClient to Services_Twilio because that is the newer version.
https://www.twilio.com/blog/2011/07/easy-conference-calling-twilio.html
Can you see where I'm messing up?
The text was updated successfully, but these errors were encountered: