AWS Connect – 外呼调用返回200,但电话呼叫未被执行。

huangapple go评论66阅读模式
英文:

AWS Connect - Outbound call returns a 200 but phone call isn't being made

问题

我有一个非常基本的流程,我想通过编程向客户打电话,并使用文本转语音消息,例如“您的2FA代码是123456”。

var request = new StartOutboundVoiceContactRequest
{
    ContactFlowId = contactFlowId,
    DestinationPhoneNumber = destinationPhoneNumber,
    SourcePhoneNumber = sourcePhoneNumber,
    InstanceId = "INSTANCE-ID"
};

var response = await connectClient.StartOutboundVoiceContactAsync(request);

// 检查响应是否成功或需要进行其他处理。
if (response.HttpStatusCode == System.Net.HttpStatusCode.OK)
{
    // 联系流程成功启动。
}
else
{
    // 处理错误或失败情况。
}

当我运行这段代码时,会返回一个200的响应。

但是目标电话号码(我的手机)从未响起。

我注意到我使用的是一个免费电话号码,而不是一个DID号码,这可能是根本原因吗?

英文:

I have a very basic flow whereby I want to programmatically make a phone call to a customer with a text to voice message like "Your 2FA code is 123456"

    var request = new StartOutboundVoiceContactRequest
    {
        ContactFlowId = contactFlowId,
        DestinationPhoneNumber = destinationPhoneNumber,
        SourcePhoneNumber = sourcePhoneNumber,
        InstanceId = "INSTANCE-ID"
    };

    var response = await connectClient.StartOutboundVoiceContactAsync(request);

    // Check the response for success or additional processing.
    if (response.HttpStatusCode == System.Net.HttpStatusCode.OK)
    {
        // Contact flow successfully initiated.
    }
    else
    {
        // Handle errors or failure cases.
    }

AWS Connect – 外呼调用返回200,但电话呼叫未被执行。

When I run the code.... a response of 200 is returned.

BUT the destination phone number (my mobile) never rang.

I do note that I am using a toll free number as opposed to a DID one as the source number could that be the root cause?

答案1

得分: -1

嗯,听起来有点棘手。我之前在使用亚马逊连接时也遇到过类似的问题。让我们看看能否找出解决办法:

  1. **实例设置:**首先,再次确认您是否在亚马逊连接实例上启用了“出站呼叫”。

  2. **联系流程:**查看您正在使用的联系流程。确保它正确设置用于出站呼叫。

  3. **电话号码格式:**确保您的“destinationPhoneNumber”以正确的格式存在,例如“+12065551234”。另外,请尝试使用DID号码而不是免费电话号码作为源。有时,免费电话号码在出站呼叫中可能会有问题。

  4. **日志:**深入了解您的连接实例的CloudWatch日志。它们通常可以提供有关出错原因的提示。

  5. **服务限制:**只是一个想法,您可能需要检查是否已达到并发呼叫的服务限制。

  6. **区域:**这是一个小问题,但请确保您在正确的AWS区域中使用连接实例。

  7. **计费:**我之前曾因AWS计费问题而导致某些服务暂停。也许您可以检查一下这方面的情况是否正常。

  8. **权限:**确保您使用的IAM角色具有执行该任务所需的正确权限。

如果所有这些方法都无效,您可以尝试在亚马逊连接界面上手动进行出站呼叫。如果这也不起作用,那可能是您的连接设置存在更深层次的问题。

希望这些能有所帮助!如果您仍然遇到困难,可以尝试联系AWS支持。根据我的经验,他们非常乐于提供帮助。

祝您的项目顺利!👍

英文:

Hmm, sounds tricky. I've run into similar issues with Amazon Connect before. Let's see if we can figure this out:

  1. Instance Settings: First, double-check if you've enabled Outbound calling on your Amazon Connect instance.
  2. Contact Flows: Have a look at the contact flow you're using. Make sure it's set up correctly for outbound calls.
  3. Phone Number Format: Make sure your destinationPhoneNumber is in the right format, like +12065551234. And yeah, try using a DID instead of a toll-free number as the source. Sometimes toll-free numbers can be finicky with outbound calls.
  4. Logs: Dive into the CloudWatch Logs for your Connect instance. They can often provide hints on what's going wrong.
  5. Service Limits: Just a thought, but you might want to check if you've hit any service limits on concurrent calls.
  6. Region: It's a small thing, but ensure you're in the correct AWS region for your Connect instance.
  7. Billing: I've been caught out before by AWS billing issues that paused some services. Maybe check that everything's okay on that front.
  8. Permissions: Make sure the IAM role you're using has the right permissions for the task.

If all else fails, you might want to try making an outbound call manually in the Amazon Connect interface. If that doesn't work either, it might be a deeper issue with your Connect setup.

Hope that helps! If you're still stuck, maybe reach out to AWS Support. They've been pretty helpful in my experience.

Best of luck with your project! 👍

huangapple
  • 本文由 发表于 2023年8月9日 12:20:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864557.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定