Set callerid when calling to a numbre through a SI...
# support
f
Hello. I need to set the callerid to specify to my provider what line should use to make the call. The idea is to set the callerid to 600123123123, for example, this way my provider is able to determine which 600 line i need to use. How can i do this?
c
Hello! To set the caller ID (specifically the "From" number or CLI) so your provider knows which 600 line to use for the call, you'll generally need to configure this in your SIP headers or outbound dialplan logic. What are you planning to use?
f
we need to use the sip header. But i can not get info on the api to set this header
but if the way to do it in vapi is using the outboun dial plan, i can adjust to it
k
Send SIP headers by either adding custom X-Header values in the SIP INVITE to your assistant or for outbound calls via BYO SIP trunk, setting them in the trunk’s outboundAuthenticationPlan..
f
Could you tell me how to do it?
when i send the request to create an outbound call, Is it there were we should send the X-Header to the SIP Invite?
k
No, you cannot send X-Header directly in the outbound call request instead, set custom SIP headers like X-RPID in a BYO SIP trunk’s outboundAuthenticationPlan and use that trunk for calls.. https://docs.vapi.ai/advanced/sip
f
i have tried this type of credential request to create one: Endpoint: POST /credentials Request: { "provider": "byo-sip-trunk", "gateways": [ { "ip": "sip.sipprovider.com", "inboundEnabled": false } ], "outboundAuthenticationPlan": { "headers" : { "X-RPID": "sip:6000012345@sipprovider.com" } }, "outboundLeadingPlusEnabled": false, "name": "Custom600-12345" } Where should i send this header? The service respond that headers property should not exist. But in the documentation you sent my, i did not find any related information. Please help
c
Hello, Thanks for waiting patiently, With the Custom BYO SIP Trunk option, you can integrate with any SIP provider by simply supplying the SIP gateway address along with the required authentication credentials. Can you try this example? just change and fill out all needed parts. { "provider": "byo-sip-trunk", "name": "Zadarma Trunk", "gateways": \[ { "ip": "[sip.zadarma.com](http://sip.zadarma.com)", "inboundEnabled": false } \], "outboundLeadingPlusEnabled": true, "outboundAuthenticationPlan": { "authUsername": "YOUR_SIP_NUMBER", "authPassword": "YOUR_SIP_PASSWORD" } }
Hi Felipe Munoz, Sorry for that, This is the correct format that you can try:
Copy code
json
curl -X POST "https://api.vapi.ai/credential" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "Zadarma Trunk",
    "gateways": [{
      "ip": "sip.zadarma.com",
      "inboundEnabled": false
    }],
    "outboundLeadingPlusEnabled": true,
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_NUMBER",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
You may want to ensure the format of the caller ID matches the standards expected by the service provider associated with your SIP Trunk. You can find more details on phone number configurations in the [API Reference](https://docs.vapi.ai/api-reference/calls/create).
3 Views