I am implementing a Twilio call functionality in my Django app, where in I want to get a call to specified no, after the call is picked by a person it should connect the call to another phone no. This is what I have already implemented to get the call functionality running but I am not able to forward it to the desired no.
def call(country_code, to, lead_cc, lead_no, configuration):
account_sid = "XXX22a62f54bXXXXXXXXXXXXX"
auth_token = "XXXXXa61188eXXXXXXXXXXX"
client = Client(account_sid, auth_token)
no_str = str(country_code) + str(to[0])
no_uni = unicode(no_str)
lead_str = str(lead_cc) + str(lead_no[0])
lead_uni = unicode(lead_str)
client.calls.create(from_="+17xxXXXXX",
to=no_uni,
url= 'http://twimlets.com/forward?PhoneNumber=+91xxxxxxxxx')
Also, I need pass "lead_uni" in the URL like this but it's now working (url= 'http://twimlets.com/forward?PhoneNumber=lead_uni').Please, sugges !