https://retellai.com/?utm_source=discord&utm_medium=seo logo
- I have webhook implemented to serve the dynamic ...
# ❓・ai-evy-support
r
@AI Evy - I have webhook implemented to serve the dynamic vars on incoming calls. But I need a way to transfer the call completely or not pick up or transfer to a different SIP trunk or an offline local number based on the identified number/caller. Is there a way to do that with the webhook response? If not, how else to accomplish this?
a
Thanks for tagging me @Rakshit Kalra. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, I don't have specific information about using webhook responses to conditionally route or reject inbound calls before they're answered by the Retell AI agent. However, when using the Dial to SIP URI method, you have more control over call routing since your system handles the telephony integration directly [(1) ]() . With this approach, all traffic appears as inbound to Retell, and you dial calls to
sip:{call_id}@sip.retellai.com
. This gives you the opportunity to implement your own call routing logic before connecting to Retell. For call transfers after the agent has answered, Retell supports transfer functionality when using SIP trunking. You'll need to configure your SIP trunking provider to allow SIP REFER and PSTN transfer . The documentation notes that for cold transfers with the transferee's number showing as caller ID, your provider must support these configurations . **Important limitation**: When using the Dial to SIP URI method, you cannot utilize Retell's transfer call feature directly, as Retell doesn't have access and control over the telephony provider . You would need to implement your own transfer logic using a custom function to trigger call transfers . For more advanced SIP call flow manipulation or custom routing needs, the documentation mentions telephony partners like Jambonz and Cloudonix that can connect to Retell's SIP server to manipulate the SIP call flow . I'd recommend checking with Retell support for specific guidance on pre-answer call routing based on caller identification, as this particular use case isn't explicitly covered in the available documentation.
​ To learn more, see the sources I considered: [[1] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.