twilio - Dynamic destination phone assign, at incoming call start -


i looking possibility implement call tracking twilio.

what need right @ start of incoming call able change destination number call. how achievable twilio via api?

reading api docs found there real-time call , message routing feature (here) , followed example (here) it's not achieve.

thanks ahead suggestion , help!
--steve

twilio developer evangelist here.

you absolutely can dynamically change destination number calls on twilio. when forwarding calls use <dial> noun in twiml so:

<response>   <dial>your_number_here</dial> </response> 

however, if serve twiml dynamically can return whatever number in <dial> tag want, based on whatever conditions want. example in ruby using sinatra:

post "/voice"   if params["from"] === some_special_number     number = forwarding_number_1   else     number = forwarding_number_2   end   "<response>     <dial>#{number}</dial>   </response>" end 

let me know if helps @ all.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -