Sip From Header modification
# support
f
Hello. i need some helps guys. Our contact center had started vapi adoption. We are successful integrated our crm with your services. Now a days, the Chilean legislation has changed. We need to use specific lines to do outbound calls. Our Sip Trunks providers required a specific from header when vapi makes a call, the required this: sip:566000061260@192.141.64.138 for example. Is there a way to set this in am outbound call in vapi? I do not want to use a sip proxy, this will add latency to my calls. Someone has an advice?
c
You can modify the SIP From header directly in Vapi without using a SIP proxy by configuring your SIP trunk with the appropriate details. Here's how you can specify a custom SIP From header for your outbound calls: - **Create or Update your SIP Trunk Credential**: Use the Vapi API to create or update your SIP trunk credential so that the From header is formatted as required by your provider. - **Example API Call**: Ensure you include the necessary From header configuration in your request to the Vapi API.
Copy code
bash
$ curl -X POST https://api.vapi.ai/credential \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "Custom Trunk",
    "gateways": [
      {
        "ip": "192.141.64.138"
      }
    ],
    ...
    "outboundAuthenticationPlan": {
      ...
      "customFromHeader": "566000061260@192.141.64.138"
    }
  }'
- **Register your SIP Phone Number**: Ensure your phone number is properly associated with this trunk. - **Test Your Configuration**: Make a test call to verify the From header is applied correctly. By following the above steps, you should be able to ensure that the required specific SIP From header is used during outbound calls through Vapi. You may need to adjust other fields to match your SIP trunk provider requirements. For further details, you might want to review the specific [SIP integration documentation](https://docs.vapi.ai/advanced/sip/sip-trunk).
3 Views