Get twilio paramerter with "Dialogflow\WebhookClient"

45 views
Skip to first unread message

belhadj asma

unread,
Nov 19, 2020, 11:10:08 AM11/19/20
to Dialogflow Essentials Edition users
I made a twilio integration with call and messae and it's OK , 
with messae i can got caller number but not with call.

code:
agent = new WebhookClient(json_decode(file_get_contents('php://input'),true));

$parameters = $agent->getParameters();
$originalRequest = $agent->getOriginalRequest();
$payload=$originalRequest['payload'];

$location=$parameters['location'][0];

$adr=$location["street-address"]." ".$location["business-name"]." ".$location["city"]." ".$location["admin-area"];
   

$sid    = "AC7b87e65b48b7ef6ce4c9a98acd0c50dc";
$token  = "01e3f7948d137a7e4f4de63f0da21936";

mail('a****j...@mail.com',"Test",$adr.' '.$payload['From'].' .' );

Hu (Cloud Platform Support)

unread,
Feb 1, 2021, 7:41:08 PM2/1/21
to Dialogflow Essentials Edition users
Hi,

Google Groups are for general discussion. For specific coding issues, can you please ask on Stackoverflow.com that is monitored by many developers?

Reply all
Reply to author
Forward
0 new messages