Skip to content

Only works when the caller is using a verified phone number? #7

Open
@glienard

Description

@glienard

I have setup the application as documented. I am testing with +33973729651 as the "customer" calling the translator service, but I am getting an error because +33973729651 is not verified for my account. When I test with a verified phone number as the customer calling the translator service, it is working. But this is not very useful in a real life scenario.

[nodemon] starting `tsx src`
[12:37:10.904] INFO: Server listening at http://0.0.0.0:5050
    stream: "access"
[12:37:47.432] INFO: incoming request
    stream: "access"
    reqId: "req-1"
    req: {
      "method": "POST",
      "url": "/incoming-call?lang=english",
      "hostname": "dc07-84-197-107-153.ngrok-free.app",
      "remoteAddress": "127.0.0.1",
      "remotePort": 51140
    }
[12:37:47.438] INFO: Setting up media stream...
    stream: "app"
    reqId: "req-1"
    requestId: "req-1"
[12:37:47.439] INFO: Sending TwiML response...
    stream: "app"
    reqId: "req-1"
    requestId: "req-1"
[12:37:47.443] INFO: request completed
    stream: "access"
    reqId: "req-1"
    res: {
      "statusCode": 200
    }
    responseTime: 10.035299956798553
[12:37:49.755] INFO: incoming request
    stream: "access"
    reqId: "req-2"
    req: {
      "method": "GET",
      "url": "/intercept",
      "hostname": "dc07-84-197-107-153.ngrok-free.app",
      "remoteAddress": "127.0.0.1",
      "remotePort": 51144
    }
[12:37:49.922] INFO: Added inbound interceptor for +33973729651 with streamSid MZa08e98df9ac292dbd30171a601d667bb for callSid
    stream: "app"
    reqId: "req-2"
    requestId: "req-2"
[12:37:49.922] INFO: Connecting to Agent
    stream: "app"
    reqId: "req-2"
    requestId: "req-2"
RestException [Error]: The caller id phone number provided, +33973729651, is not yet verified for your account. You may only make calls from phone numbers that you've verified or purchased from Twilio.
    at success (C:\Github\live-translation-openai-realtime-api\node_modules\twilio\lib\base\Version.js:79:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (c:\Github\live-translation-openai-realtime-api\src\routes\intercept.ts:49:11) {
  status: 400,
  code: 21231,
  moreInfo: 'https://www.twilio.com/docs/errors/21231',
  details: undefined
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions