php - Making call on two different numbers using Twilio -


i wish call customer through user interface using api, have 3 parameters 1st: customer number, 2nd: twilio number,3rd: actual mobile number both of me , customer should see twilio number caller id. can me through this? current code below:

$client = new services_twilio($accountsid,$authtoken); $from = $from_ctn_code.$ctc->from; $to = $to_ctn_code.$ctc->to; try { $call = $client->account->calls->create($from,$to,$url.'callback.php?number='.$from); $ctc->sid = $call->sid; $ctc->call_logs(); } catch (exception $e) {  } 

twilio evangelist here.

we call 'anonymous calling', , it's pretty easy started. want make call using code posted above , twilio number $from parameter. url provide needs link twiml document cause twilio connect customer. need php script following twiml (xml)

<response>   <dial callerid="<?php echo $twilio_number ?>">      <?php echo $customer_number ?>   </dial> </response>  

this way, twilio call showing twilio number, call customer showing twilio number (hence callerid= attribute).

there's walkthrough on making calls on twilio.com. key thing here use twilio number from/callerid in both cases, give anonymous calling.

hope helps.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -