Created
December 8, 2011 18:12
-
-
Save Gipetto/1447888 to your computer and use it in GitHub Desktop.
Inserting custom numbers in to the CallerId list (hack)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not copy this line | |
// Add this code to `OpenVBX/controllers/iframe.php` | |
// In the 1.0.x branch insert the following on line 53 | |
// In the 1.1.x branch insert the following on line 66 | |
// Create a list of extra caller id numbers to add | |
// These numbers need to be validated in Twilio | |
// Validated numbers are listed in your Twilio Account: https://www.twilio.com/user/account/phone-numbers/verified | |
$custom_numbers = array( | |
(object) array( | |
'id' => null, | |
'flow_id' => null, | |
'name' => '(415) 000-0000', // friendly formatted number | |
'phone' => '(415) 000-0000', // friendly formatted number | |
'pin' => null, | |
'sandbox' => null, | |
'url' => null, | |
'method' => null, | |
'smsUrl' => null, | |
'smsMethod' => null, | |
'capabilities' => 'voice', | |
'voiceApplicationSid' => null | |
), | |
// add another object here if you have more than 1 number to add | |
); | |
// iterate the above list and PREPEND the numbers to the list of numbers | |
// so that they show up first | |
foreach ($custom_numbers as $number) | |
{ | |
array_unshift($data['callerid_numbers'], $number); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment