php - Twilio StatusCallback not working when modifying a live call -
i trying forward call in twilio modifying live call. have number set zip code caller , determine customer number forward call searching in database. first part of call (to zip code) i'm using gather verb. once have zip code , customer's assigned twilio number can forward call using rest api modify live call.
i need add parameters callback url request.
according twilio's website should able post statuscallbackurl , method modified call.
https://www.twilio.com/docs/api/rest/change-call-state
however, not working. here code:
$url = 'http://xxxx.com/phone/customer?to='.$number; $call = $this->twilio->account->calls->get($this->request->query->get('callsid')); $call->update(array( 'url' => $url, 'method' => 'get', 'statuscallbackmethod' => 'get', 'statuscallback' => 'http://xxxx.com/phone/log/callback' ));
the "url" , "method" optional parameters work twilio not call supplied callback url.
the new url twilio redirects call returns twiml twilio process.
the call initiated actual person picking phone , calling. tried create call via rest api , statuscallback works twilio expects twiml returned error in twilio.
Comments
Post a Comment