Abe
09/07/2024, 11:09 PMVapi
09/07/2024, 11:10 PMphoneNumberId
or phoneNumber
object, depending on whether you're using an existing number or a transient number.
When you define your custom function, you should specify the parameters it accepts. For instance, if your function needs to know the caller's phone number, you would include a parameter for that in your function's definition. Then, when you trigger the function call, you pass the phoneNumberId
or phoneNumber
object to it as an argument.
Here's a simplified example of how you might define and call such a function:
javascript
// Define your custom function with the necessary parameters
function handleIncomingCall(callerPhoneNumber) {
// Your logic here, using callerPhoneNumber
}
// Trigger the custom function with the phone number data
handleIncomingCall(phoneNumberId); // If you're using an existing number
// or
handleIncomingCall(phoneNumber); // If you're using a transient number
In the context of VAPI, you would ensure that your function is set up to be called with the appropriate event or trigger that provides the phone number data. If you need further assistance with setting up or triggering your custom function, please ask support for more info on this.Vapi
09/07/2024, 11:10 PMJotham
09/07/2024, 11:32 PMChowderr
09/07/2024, 11:44 PMShubham Bajaj
09/09/2024, 5:29 PMShubham Bajaj
09/09/2024, 5:30 PM