Need to track Caller number after Call fowarding
# support
a
I have set up call forwarding from a client’s practice to the Twilio number of the AI agent. However, in all the call logs, it always shows the practice’s number instead of the caller’s number. How can I change this?
v
@AiCallYu_JuanS. It sounds like you might need to adjust the configuration of your call forwarding setup to ensure that the original caller's number is being passed through to the logs, rather than the practice's number. This typically involves setting the correct parameters when handling incoming calls in your voice application. If you're using the Create Assistant API and encountering issues with the
forwardingPhoneNumber
attribute, remember that it can sometimes cause errors if not handled properly. You might want to omit it or set it to null or an empty string ('') to avoid these issues. However, to provide you with a more precise solution, I would need to know more about how you've configured the call forwarding and which system or API you're using to manage the calls. Could you provide more details on your current setup?
You can continue this conversation by mentioning me in the message.
a
Actually, I just configured it inside of Twilio and then I just configured it with the program of the practice and just put in there the forwarding to the Twilio number and the twilio number is imported into Vapi for the agent. Thats it.
v
@AiCallYu_JuanS. It seems like the issue might be with the Twilio configuration. When setting up call forwarding in Twilio, you need to ensure that the original caller's number is being passed through as the
From
parameter in the Twilio request to your application. Here's what you can check and adjust in your Twilio configuration: 1. Twilio Voice Webhook: When a call comes into your Twilio number, Twilio sends a request to your configured webhook URL. Make sure that the webhook handling the incoming calls is correctly extracting the
From
parameter, which contains the caller's original phone number. 2. Twiml Bin or Application: If you're using a Twiml Bin or a Twilio application to handle the call forwarding, ensure that the
<Dial>
verb is using the
callerId
attribute correctly. The
callerId
should be set to the original caller's number (
request.From
) if you want to display the caller's number in the logs. 3. Call Forwarding Logic: Double-check the call forwarding logic within your application to ensure that it's not inadvertently setting the practice's number as the caller ID for forwarded calls. If you've verified these settings and the issue persists, it might be necessary to look into the specific code or configuration that handles the incoming calls on your Twilio number. If you're not sure how to proceed or if you need further assistance with the Twilio configuration, please reach out to Twilio support for more detailed guidance.
a
OK, another question is that even though I’m enabling the end call function, and I’m also prompting to finish the call or to hang up if it seems to be the end or if the customer says bye … the AI agent is not doing it and it’s not hanging up the call and this is sometimes causing that customers are still saying any words and the agent is keep on talking instead of hanging up the call. So how can I manage that?
v
@AiCallYu_JuanS. To ensure that the AI agent hangs up the call when it's appropriate, you need to make sure that the end call functionality is configured correctly. Here are a few steps you can take to manage this: 1. Review End Call Phrases: Make sure that the
endCallPhrases
array is populated with the phrases that indicate the end of a call, such as "bye", "goodbye", "hang up", "end call", etc. These phrases should trigger the agent to end the call. 2. Check End Call Message: If you have specified an
endCallMessage
, ensure that it is set to a message you want the AI agent to say before hanging up. If you prefer the call to end without a message, you can leave this unspecified. 3. Test the Functionality: After setting up the end call phrases and message, test the functionality by simulating calls and using the end call phrases to see if the agent responds correctly by ending the call. 4. Review Call Logs: Check the call logs to see if the end call phrases are being recognized correctly by the AI agent. If the phrases are not being detected, you may need to adjust the speech recognition settings or add more variations of the phrases. 5. Update Agent's Logic: If the agent is not hanging up despite the correct phrases being spoken, you may need to review and update the logic in your voice application that handles the end call functionality. If you've gone through these steps and the issue still persists, it might be a technical issue that requires further investigation. In that case, please provide more details about how you've configured the end call functionality, and I can assist you further. If necessary, you can also reach out to the support team for more in-depth troubleshooting.
s
Hey @AiCallYu_JuanS. you can set the caller id on destination number and then the caller id will be always be used instead of your practice's number. Check screenshot for reference, do let me know if you have further questions. https://cdn.discordapp.com/attachments/1308103585686622309/1308369962544402463/image.png?ex=673db1fb&is=673c607b&hm=1de17b5864eb4979ac05d4deac71f46cece3e1b5fb4986deb6fc96702093231d&
a
Where do i do that? In vapi or twilio or n8n?
s
You have do this in Vapi when creating custom transfer call functions, check this for more info https://docs.vapi.ai/call-forwarding
a
Are you sure that this is correctly for the case that I told you before because that looks like it’s meant to be for a call transfer during the call if the collar is asking to be connected to a human or to another agent in my case is that we took the original number of the doctors practice and transferred it to my to your number to reach the agent. . so every time a patient is calling to the practice. He is instantly transferred to the agent so.
s
Your right I guess there is confusion.
This solution is when your transferring call from Vapi agent to your client number, and if this time you want to set the caller id then the above practice is used.
> I have set up call forwarding from a client’s practice to the Twilio number of the AI agent. However, in all the call logs, it always shows the practice’s number instead of the caller’s number. How can I change this? Now for this
call forwarding from a client’s practice to the Twilio
, what do you mean by call forwarding and in what logs do you check? (asking to avoid mis interpretations)
a
Well, this is already the call forwarding, what I’m asking for is that in the call logs I can’t see the original number of the caller. I just see the number of the practice.
This is not the number of the caller its the number of the business
Call ID: ac895e67-88fe-4f48-9e6b-ffaf0ef454e1
@Chowderr
c
Hey @Shubham Bajaj the E.O.C.R shows something interesting, but it looks wrong.
Also you guys need to change the wording on the documentation. You guys are doing "Call Transfer", not "Call Forwarding"
In his case - when someone calls the business number, it automatically routes to the number set to the assistant. Mo one has to be on the phone (which is a transfer) I hope this makes sense.
This is why you did not understand what he meant in the beginning.
s
Oh understood now @AiCallYu_JuanS. your forwarding all of the calls from your client number to the Vapi phone number, and you want to show the customer number instead of client number. Now Vapi doesn't knows anything about the customer in this scenario, what you can do is pass the customer number through assistant overrides depending upon how your doing call forwarding, which you can get back through end of call report.
Do let me know how can i help you next here @AiCallYu_JuanS.
a
@Chowderr would you may have an opinion on how to solve this or what they need to integrate to be able to get it? (Original Callers/customers number) @Shubham Bajaj how can I override it?
c
I would not hae anything better then the team. @Shubham Bajaj so basically it just needs to be in a transient assistant?
a
What do you mean with I would not habe anything better them the team?
c
Like how the platform is built lol. It looks like a transient assistant needs to be used. " Now Vapi doesn't knows anything about the customer in this scenario, what you can do is pass the customer number through assistant overrides depending upon how your doing call forwarding, which you can get back through end of call report"
a
Pls I need a solution. Pls answer
s
@AiCallYu_JuanS. here's the overview what needs to be done https://discord.com/channels/1211482211119796234/1308103585686622309/1309517469089665095 . Why your blocked till now, unable to understand or require docs setting it up? What's the blocker.
a
You still seem to misunderstand it although @Chowderr tried to explain it to you. I dont understand the question about being blocked?
s
Bro @AiCallYu_JuanS. can you join #1246808687176060960 , I've been trying to say the same.
Here's step by step breakdown of the overview:- 1. Assign a server url to the phone number associated with Vapi. 2. Remove any assistantId or SquadId assigned to it. 3. After that, when a call arrives Vapi will send an request to your server url of type
request-assistant
, your supposed to return the assistant to be used for the call. Now this all is done right before the call. 4. Now coming to main part
How to pass customer's phone number?
. Let's suppose you have the customer phone number with you at your server, then using assistantOverrides pass the customer phone number as item or value of assistant's metadata. This metadata will be unique to each call and you can retrieve it later for the same call. 5. At the end of call Vapi will send an
end-of-call-report
to your assistant server url(you required to assign an server url your assistant, and select end-of-call-report server message) which will call (request payload) your customer's phone number under assistant overrides metadata. Now the part which left is identifying which forwarded call belongs to which
request-assistant
?
@AiCallYu_JuanS. does this helps to understand only what needs to be done? I'll help you with execution. Waiting for your response.
a
I came in but i was alone there.
It’s a pity that I cannot do that because when I did exactly that step this is also what chowder told me… it stopped to work and it finished the call after one time of ringing and I was struggling with this two full days without having the opportunity to get in a call so the only way it’s working for the business is by setting a number to an assistant and to integrate the server URL inside of the advanced settings
s
You could have tagged me, if still open to tag me once you join.
Can you share the call id?
a
e0e440a7-22d5-41b2-9b9f-2ce2f427ff03 This is one of many
s
@AiCallYu_JuanS. I believe your sharing the working one with assistantId assigned to it. Will it be possible for you to join #1246808687176060960 ? https://cdn.discordapp.com/attachments/1308103585686622309/1310604630308425810/Screenshot_2024-11-25_at_7.23.52_PM.png?ex=6745d32d&is=674481ad&hm=ca93d7e883757e06371712fe7b55b1c8607fe49cbafdda2cfca5658ae6a9b7e0&
a
Yes give me 5 mins to come in pls
s
Ping Me When your available.
a
How do I do that I never did it before 🙂
z
@AiCallYu_JuanS. @Shubham Bajaj hello, I have the same exact issue as Manuel. Did you find a solution ? Could you share it here ? I transfer the calls from my customer mobile to vapi. In my webhook (event: "assistant-request") I want the number of my customer and not the number of the initial caller A calls B transfer to VAPI I get the A number but want the B number. I also use twilio and can gat it work in retellai. thx
a
No man we couldnt solve it and the customer had to officially change the business number to the new Twilio Number and announce it to his clients/patients. oh really in retell ai its possible?
z
Yes it is. I developped a webhook calles when twilio receive a call and this is what twilio sends to me body: { Called: '+33518251676', ToState: 'Southwest France', CallerCountry: 'FR', Direction: 'inbound', CallerState: '', CalledVia: '+33620164283', ToZip: '', CallSid: 'CA2aae5b907f83edafe8ba86b8b218abc1', To: '+33518251676', CallerZip: '', ToCountry: 'FR', StirVerstat: 'TN-Validation-Passed-C', CallToken: '', CalledZip: '', ApiVersion: '2010-04-01', CalledCity: '', CallStatus: 'ringing', From: '+33786218042', AccountSid: 'AC09d1473f7b67b1270406008ec62f0abd', CalledCountry: 'FR', CallerCity: '', ToCity: '', FromCountry: 'FR', Caller: '+33786218042', FromCity: '', CalledState: 'Southwest France', ForwardedFrom: '+33620164283', FromZip: '', FromState: '' } You can see that there are 3 numbers - Called -Called via - From Maybe VAPI does not forward all the 3 ? For now it's blocking me to move from retellAI to VAPI 😦 Maybe @User can have an idea ?
a
Cool I was trying out Retell yesterday it was not bad but sometimes the voice was mire robitic and not as fluent as in vapi and the thing what bothers me ther is that the interruption sensitivity of the Agent is not working as it should and the agent keep on talking instead of stopping to let the human intervent. Maybe Shubham knows if its working now after a few months
s
@AiCallYu_JuanS. we had discussion over the call if I remember correctly and that time you said it's clear to you and then what happened after that?
@zxdream Do let me know if you have further doubts. `From`: the person who initiated the call
CalledVia
or
forwardedFrom
: intermediary number through which the call was routed. `Called`: This is the number that was dialed
z
No it's OK The only thing is that those 3 numbers are not available from vapi and that I had to make an api call to twilio to get them
s
@zxdream These details are available from Twilio's side. When Twilio forwards messages to us, we forward them to you, mainly through the
forwardedFrom
field. We are actively working on improving this functionality for you and will keep you updated.
a
Nop that also doesnt work from Twilio side we already tried it. But im curious to see if it will be buikd by you guys. @zxdream nice I will let my devs know about your way to handle it. Thanks
5 Views