2
votes

I know I can set the status callback url when make a outbound call.
But how can I set a status callback url for an inbound call?

1

1 Answers

3
votes

Twilio developer evangelist here.

You can either set your inbound call webhook in your Twilio Console by updating your numbers. Or you can set it via the REST API by POSTing an update to your number with the VoiceUrl parameter set to your new URL.

That would look like this in PHP:

$sid = "your_account_sid"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$number = $client->account->incoming_phone_numbers->get("your_phone_number_sid");
$number->update(array(
    "VoiceUrl" => "http://example.com/voice"
));

Let me know if that helps at all.