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
Post a Comment