我按照http://docs.rapidsms.org/en/develop/tutorial/tutorial04.html中详述的所有步骤使用 tropo 在 Django 的 RapidSMS 中发送和接收 SMS 并将其部署在 heroku 上。然后我尝试做两件事。
1) 使用 tropo 发送 SMS - 我注册了一个电话号码,在选择后端时,我认为 Tropo (my-tropo-backend) 将是后端选择中的一个选项。但我不认为 tropo 作为后端选项,只是 message_tester。
2) 使用 tropo 接收短信 - 我向我的 tropo 电话号码发送了一条短信,我可以在 tropo 日志中看到消息,但我没有看到来自 Django URL https://yourhost.example.com/tropo/的响应在 tropo 日志中(使用 ping-pong 示例)。
我的 RapidSMS 和 Tropo 的 Django 设置如下:
INSTALLED_BACKENDS = {
"my-tropo-backend": {
"ENGINE": "rtropo.outgoing.TropoBackend",
'config': {
# Your Tropo application's outbound token for messaging (required)
'messaging_token': '244e51db5424c3438f122753b8947dee70803dshlfhdfdsdkjfdfd455466565e8e620c05f75323c17864',
# Your Tropo application's voice/messaging phone number, starting
# with "+" and the country code (required)
'number': '+1-000-200-6007',
},
},
"message_tester": {
"ENGINE": "rapidsms.backends.database.DatabaseBackend",
},
}
urls.py 有
url(r"^tropo/$",
views.message_received,
kwargs={'backend_name': 'my-tropo-backend'},
name='tropo'),
并且 'rtropo' 已添加到 INSTALLED_APPS
我错过了什么,有人做过这个并遇到过这个问题吗?请告诉我。
谢谢你。