Prompt

How do I forward calls from one number to another with an API?

Technology / API Platforms1 observationLast seen Oct 10, 2026

Latest observation

Oct 10, 2026OpenAI APIWeb search: off

To forward calls from one number to another using an API, you usually need a telephony provider that controls the phone number and supports either:

  1. Call forwarding configuration on the number itself, or
  2. Programmable call handling where inbound calls are answered by your app and then dialed onward to another number.

Common approaches

1) Direct forwarding on the provider

Some providers let you set a destination number for an inbound phone number via API.

Typical flow:

  • Buy or port a phone number
  • Update that number’s voice settings
  • Set the inbound route to forward to another number

Example conceptually:

  • Incoming call to +15551234567
  • Provider automatically forwards it to +15557654321

This is simplest if your provider supports it.

2) App-controlled forwarding

If the provider doesn’t offer direct forwarding, or you want logic-based routing, you:

  • Configure the number to send inbound calls to a webhook
  • Your app receives the call event
  • Your app responds with instructions to connect the call to the destination number

This lets you add rules like:

  • Forward only during business hours
  • Forward based on caller ID
  • Ring multiple numbers
  • Send voicemail if no one answers

Example with Twilio

If you use Twilio, you can forward an inbound call by returning TwiML from your webhook:

<Response>
  <Dial>+15557654321</Dial>
</Response>

If you want to configure a Twilio number via API to hit your webhook, you update the number’s voice URL.

Python example

from twilio.rest import Client

account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

incoming_number = client.incoming_phone_numbers.list(phone_number="+15551234567")[0]
incoming_number.update(voice_url="https://yourapp.com/forward-call")

Then your webhook returns:

from flask import Flask, Response

app = Flask(__name__)

@app.route("/forward-call", methods=["POST"])
def forward_call():
    twiml = """
    <Response>
      <Dial>+15557654321</Dial>
    </Response>
    """
    return Response(twiml, mimetype="text/xml")

Example with Vonage/Nexmo

You’d typically point the number to an inbound webhook, then respond with NCCO instructions:

[
  {
    "action": "connect",
    "from": "YOUR_VONAGE_NUMBER",
    "endpoint": [
      {
        "type": "phone",
        "number": "+15557654321"
      }
    ]
  }
]

Things to keep in mind

  • Consent and legality: Call forwarding can be regulated in some regions.
  • Caller ID: Decide whether to preserve original caller ID.
  • Costs: You may be billed for both inbound and outbound legs.
  • Availability: Ensure the destination number can receive forwarded calls.
  • Emergency services: Forwarding typically should not be used for emergency numbers.

If you want the simplest answer

Use your telephony provider’s API to:

  1. Point the inbound number to a webhook or forwarding destination
  2. In that webhook, instruct the provider to connect the call to the target number

If you tell me which provider you’re using (Twilio, Vonage, Plivo, Telnyx, etc.), I can give you the exact API calls and code.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.