Customizing Twilio OpenVBX CallerID and Time Out

7:50 Apr 14th, 2011 | 0 notes

I am writing this post in hopes that someone having similar issues to me may find this useful.

My issue: Inbound calls were being routed to my cell phone, but my cell phone voicemail would be picked up and presented before the twilio call was able to route to my custom voicemail greeting. Also, there was no way for me to know if the call i was receiving was from Twilio, or a direct call. I use OpenVBX for business, so I want to know when the inbound call is coming from Twilio so that I can answer accordingly.

The Fix: It turns out you can update your twiml.php located inside plugins/standard/applets/dial on line 123:

Original

$dial = $response->addDial(array('action' => current_url()));

Replace With

$dial_timeout = "17" // about 4 rings for me
$dial = $response->addDial(array('action' => current_url(), 'callerId' => 'XXXXXXXXXX', 'timeout' => $dial_timeout));

* The number you use for caller ID must be a verified number on your Twilio Account (either a purchased number, or verified caller-id number)