Get Vonage price on Vapi server events
# support
r
I am using vonage phone number in vapi to make calls. To configure it, vapi only asks for api key and api secret along with number from vonage to start making calls via agent. Vapi configures vonage by creating an application on the vonage account and attaching webhook urls for the events triggered by vonage. Ex: for event the url set by vapi on vonage is https://api.vapi.ai/vonage/status Now vonage sends the following payload when call completes after answering { "callId": "id", "headers": {}, "conversationId": "CON-conversationId", "network": "PE-FIXED", "duration": "27", "disconnected_by": "user", "rate": "0.00880000", "price": "0.00396000", "startTime": "2025-04-04T03:08:43.000Z", "from": "51551000-number", "endTime": "2025-04-04T03:09:10.000Z", "to": "5115-number", "status": "completed", "direction": "inbound", "timestamp": "2025-04-04T03:09:09.471Z" } But when I fetch call details from vapi, it only responds me with phoneNumberId which is
conversationId
from the above json. I want vapi to also send over the
price
as well whenever vonage shares this detail. As this whole process of setting the webhooks is automated by vapi, i want a way to also get
price
details from vapi when I fetch call details or via server events triggered.
v
Hi there! 👋 I understand you're looking for a way to access the Vonage
price
field in Vapi, either through call details or server events. While I couldn't find specific information about whether Vapi currently includes the Vonage
price
field in its responses, I can share what I know about Vapi's handling of call details and potential approaches. ## What Vapi Server Events Are Vapi server events allow your application to receive data and communicate with Vapi during conversations. According to the [Vapi documentation](https://docs.vapi.ai/server-url/events), these events are sent to a Server URL as POST requests and include various types: - Status Updates - Transcript Updates - Function Calls - Assistant Requests - End of Call Report - Hang Notifications The server events follow this structure:
Copy code
json
{
  "message": {
    "type": "function-call",
    "call": { Call Object },
    ...other message properties
  }
}
## Accessing Call Cost Information Vapi does provide some cost information that you might find useful: 1. **Call Cost Information**: According to the [Vapi changelog](https://docs.vapi.ai/changelog/2024/10/9), you can use
call.costs[type=vapi].subType
to determine if a VAPI cost is
normal
or an
overage
. 2. **Dashboard Cost Breakdown**: You can view a breakdown of your cost per call in your dashboard at [dashboard.vapi.ai/calls](https://dashboard.vapi.ai/calls), which includes STT, LLM, TTS, Vapi platform fee, and Transport (telephony costs). 3. **API Endpoints**: Vapi provides several API endpoints related to calls, including "GET List Calls" and "GET Get Call" which might contain cost information. 4. **Analytics API**: The Vapi analytics API can be used to retrieve usage data, including cost information. ## Potential Approaches Since you're specifically looking for the Vonage
price
field, here are some approaches you might consider:
1. Check the "End of Call Report" server event, which provides call summary data and might include cost information. 2. Use the "GET Get Call" API endpoint (
/api-reference/calls/get
) to see if it includes the price information you need. 3. **Contact Vapi Support**: For specific features like including the Vonage
price
field in responses, reaching out to Vapi support at support@vapi.ai might be the most direct approach. They could either confirm if this is already possible or consider it as a feature request. Would you like me to provide more details on any of these approaches or help with anything else? Sources: - [Vapi Server Events](https://docs.vapi.ai/server-url/events) - [Vapi Changelog](https://docs.vapi.ai/changelog/2024/10/9) - [Estimating Costs](https://docs.vapi.ai/billing/estimating-costs) - [API Reference](https://docs.vapi.ai/api-reference/)
I've looked into this further, and I think this might require some specific configuration or possibly a feature enhancement. I'm going to escalate your request to our technical support team who can provide a definitive answer about including the Vonage
price
field in Vapi responses. They'll be able to confirm whether this is currently possible and, if not, consider it as a feature request. The team will reach out to you directly with more information. In the meantime, you might want to check the "End of Call Report" server event as it provides the most comprehensive call summary data, though I can't confirm if it includes the Vonage price field specifically. Thanks for your patience! Is there anything else you'd like to know while we wait for the support team's response?
k
Thank you for reaching out to us. We've received your message and will get back to you as soon as possible.
Hi, checking if this is resolved/solved for you?