测试 Twilio 的电话号码 [英] Test telephone numbers for Twilio

查看:44
本文介绍了测试 Twilio 的电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Twilio 是否有任何测试"电话号码可用于模拟出站呼叫?例如,我希望能够充分测试我的应用程序,为忙、应答机、乱序、无效号码等的呼叫获取异步响应(就像我通常期望的那样).

Does Twilio have any "test" telephone numbers that I can use to emulate outbound calls? For example, I'd like to be able to test my app to the fullest, getting back asynchronous responses (like I would normally expect to) for calls that are busy, answering machines, out-of-order, invalid numbers etc.

有一些号码可用于 SMS 消息 - 但这些都返回简单、即时的响应,而不是您期望通过 TwilXML 处理的语音呼叫实现的异步响应.

There are a few numbers you can use for SMS messages - but these all return simple, immediate responses, and not the kind of asynchronous ones you'd expect through voice calls that are being handled through TwilXML.

我应该如何在不拨打大量实时"号码的情况下测试所有这些功能?

How am I supposed to test all this functionality without making calls to tons of "live" numbers?

推荐答案

Twilio 布道者在这里.

Twilio evangelist here.

您是否考虑过使用测试凭据?这些是一组特殊的凭据和神奇的电话号码 您可以通过 REST API 告诉 Twilio 模拟诸如 拨打电话.使用神奇的电话号码,您可以让 Twilio 返回特定的响应(例如在没有正确权限的情况下尝试拨打国际电话号码).

Have you looked at using Test Credentials? These are a special set of credentials and magic phone numbers that you can use to tell Twilio via the REST API to emulate things like making an outbound phone call. Using the magic phone numbers you can get Twilio to return specific responses (like trying to dial an international phone number without the right permissions).

要测试 Webhook 端点(Twilio 将向其发出 HTTP 请求的 Webhook 中的 URL),您可以使用与测试普通 Web 应用程序相同的测试技术.

For testing webhook endpoints (the URL's in your webhook that Twilio is going to make its HTTP requests to), you can use the same testing techniques you would to test a normal web app.

这篇关于测试 Twilio 的电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆