英文:
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.
}
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
-
Instance Settings: 首先,请确认您是否在您的Amazon Connect实例上启用了
Outbound calling
。 -
Contact Flows: 查看您正在使用的联系流程。确保它已正确设置用于外呼电话。
-
Phone Number Format: 确保您的
destinationPhoneNumber
处于正确的格式,例如+12065551234
。而且,请尝试使用DID而不是免费电话号码作为源。有时,免费电话号码在外呼电话时可能会有问题。 -
Logs: 深入查看您的Connect实例的CloudWatch日志。它们通常可以提供有关出现问题的线索。
-
Service Limits: 只是一个想法,但您可能需要检查是否已达到并发呼叫的某些服务限制。
-
Region: 这是一个小事,但确保您在适用于您的Connect实例的正确AWS区域中。
-
Billing: 我之前曾因AWS计费问题而停用了一些服务。也许检查一下这方面的一切是否正常。
-
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:
- Instance Settings: First, double-check if you've enabled
Outbound calling
on your Amazon Connect instance. - Contact Flows: Have a look at the contact flow you're using. Make sure it's set up correctly for outbound calls.
- 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. - Logs: Dive into the CloudWatch Logs for your Connect instance. They can often provide hints on what's going wrong.
- Service Limits: Just a thought, but you might want to check if you've hit any service limits on concurrent calls.
- Region: It's a small thing, but ensure you're in the correct AWS region for your Connect instance.
- Billing: I've been caught out before by AWS billing issues that paused some services. Maybe check that everything's okay on that front.
- 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! 👍
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论