AWS Connect – 呼出电话返回 200 但电话并未拨出

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

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

问题

我有一个非常基本的流程,我想以编程方式给客户打电话,发送一个文本转语音消息,内容是"Your 2FA code is 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. Instance Settings: 首先,请确认您是否在您的Amazon Connect实例上启用了Outbound calling

  2. Contact Flows: 查看您正在使用的联系流程。确保它已正确设置用于外呼电话。

  3. Phone Number Format: 确保您的destinationPhoneNumber处于正确的格式,例如+12065551234。而且,请尝试使用DID而不是免费电话号码作为源。有时,免费电话号码在外呼电话时可能会有问题。

  4. Logs: 深入查看您的Connect实例的CloudWatch日志。它们通常可以提供有关出现问题的线索。

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

  6. Region: 这是一个小事,但确保您在适用于您的Connect实例的正确AWS区域中。

  7. Billing: 我之前曾因AWS计费问题而停用了一些服务。也许检查一下这方面的一切是否正常。

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

如果一切都失败了,您可以尝试在Amazon Connect界面中手动进行外呼电话。如果这也不起作用,那可能是您Connect设置的更深层次问题。

希望这能有所帮助!如果您仍然遇到困难,也许可以联系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-2.html
匿名

发表评论

匿名网友

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

确定