https://retellai.com/?utm_source=discord&utm_medium=seo logo
Allow list guardrails for Dynamic Transfer Number
# đŸ“’ăƒ»feature-requests
h
I am using dynamic routing using the retell built in call transfer functionality. I have a large directory that I transfer from inside my prompt. Can we add a piece of functionality to transfer (cold and warm please) that allows us to pass in a list of valid transfer phone numbers. That way if the AI hallucinates a number outside of our allowed list we can short circuit the transfer and tell the AI that it did an incorrect number, giving it a chance to fix it. Right now I'm using 4.1 which works most of the time, but occasionally it hallucinates which isnt great. Its transferring to random numbers which is really bad actually. I would prefer we had an allow list so that we could short circuit transfers for hallucinations.
c
as of right now, the solution to this is having a get-directory custom function; which returns the keys (names) of the people you need to transfer to
then you’ll have a separate function “transfer” which in the json parameter you’re basically going to tell it to format it in the same way that the list returned based on what the caller said
h
custom functions have to be over the network right? so ill have to deal with network latency?
c
there’s latency in anything you do, it won’t be very noticeable
h
what are the params you pass to get directory? Just the name
c
you don’t pass any parameters
you just return a list of all the function names
the parameters will be in the transfer function which will map it out correctly based on what the caller said
get-directory should return something like {“amy_stevenson”,”aaron_peterson”,”colin”} etc
h
Okay this has given me stuff to think about. however, this is kinda overkill for my usecase. I have a > 99% success rate with my current implmentation which is a directory in the prompt and then having 4.1 pick the right number., This was made recently possible by how good 4.1 is. I think adding the guardrails to the transfer functionality would be a useful feature
c
it will become an issue with the more phone numbers or people you need to transfer to
h
I gotcha
ill take a look at it
c
one of our clients has >200 and we achieved >99% accuracy
h
but i dont think im gonna need to increase much more
c
it’s all about printing
prompting*
h
ok thank
you
c
of course
if you get worried about latency, you can always send it through the inbound webhook
h
send what through the webhook?
c
the function names
instead of calling it in real time during the call
h
so youre doing a function name per person you transfer to?
i have one function call
and then I have it pass in the number using dynamic routing
c
yeah, we use custom functions for our transfer because we’re using sip to their pbx
2 functions, a list phone directory and a transfer directory
list just forces it to match the current name based on caller intent
because there’s multiple ways to spell a persons name
h
4.1 is pretty good about misspellings though. I have a Mr. Thibodeau who always get mis transcribed (Tibby Doe) and 4.1 usually gets is
gets it
c
yeah 4.1 is solid, i use it for a couple of clients
h
I do think the guard rail is a valuable feature for people who are using dynamic router
like if your suggestion is the go to way to do it, then why support dynamic routing at all