I have a use case where I want to forward a call from A to C. Here if the call is already forwarded to some number i.e A to B, then I need to disable the current forwarding(i.e A to B) and then enable the new call forwarding(i.e A to C). But the new forwarding should start only if the disable call worked. I am using twilio webhook call to identify the call status. The approach I have followed is, in the method to which webhook sends response, I am checking the status of call. So when its completed, I try to find the Phone A from my apps database using call_Sid. I am storing call_Sid against the phone number that is to be forwarded. But here is the main problem.
Now when I receive status as completed for disabling I need the number to which I need to forward the call to. How should I get this new number to be passed into this method which handled twilio webhook response.
Please let me know how to achieve this.
Aucun commentaire:
Enregistrer un commentaire