Configure an assistant selector webhook to extract the callerās number from the SIP āFromā header, pass it as callerId via assistantOverrides, create a lookup_contact tool that queries your database, add it to your assistant, and in the prompt, instruct the agent to call the tool using callerId and greet the caller by name if a match is found..
https://docs.vapi.ai/tools/custom-tools