【发布时间】:2019-08-21 15:07:50
【问题描述】:
我想在 c# 解决方案中从 Twilio 获取 callerSid 参数,而不使用“使用 Twilio.AspNet.Common”库。
//here is the code that uses the ASPNET.Common library to get the
callerSid
public ActionResult Index(VoiceRequest request)
{
var response = new VoiceResponse();
List<string> validIds = new List<string> { "12345", "23456",
"34567" };
var userId = request.Digits;
var callerSid = request.callerSid;
var authenticated = validIds.Contains(userId);
if (!authenticated)
这是一张我目前没有使用过的 ASPNet 库的图片:
我不知道是否有人在调用时使用过其他 Twilio 帮助程序库来获取参数。
【问题讨论】:
-
我不确定你在这里问什么。什么对你有用,什么对你没用?为什么不想使用
Twilio.AspNet.Common库来帮助解析请求?没用有什么问题?