0

首先,我想说这是我第一次深入研究 Asterisk 相关的应用程序,而且我主要是一名 Web 开发人员。

我的工作场所使用安装了 Asterisk/FreePBX 的 MSP 来管理我们的电话系统。GUI 非常直观,在阅读并有点迷失之后,我想我会来这里看看如何进行设置。

我的任务是构建一个简单的应用程序,通过 Web 界面(已完成)和电话界面重置用户密码 - 通过拨打号码、拨打他们的 ID 卡#,然后重置他们的密码。我是一名系统管理员,可以访问所有必要的应用程序、服务器等。我可以很容易地完成任务,并且有人告诉我我有足够的时间来解决这个问题并完成它。

当用户调用特定扩展时,这就是我需要的伪代码:

recording('pwResetCardID'); // Play a "Please enter your ID # to reset PW" greeting. 

function getCardID() {
    cardID = input(); // Input 4-5 digits using the dialpad and save it to a var.
    verify = get('http://some.site/endpoint/cardid/'.$cardid); // Send a GET request.
    if verify { // If we got a successful response (200)
        recording('pwChanged'); // Tell the user their password has changed
    } else { // 
        recording('errorCardID'); // Otherwise tell them to try again
        getCardID(); // Recur the function.
    }
}

getCardID();

如果 cardID 有效,他们的 PW 在我的 node.js 应用程序的另一端被更改,我只需要发送 GET 请求并通知用户成功(或失败)

4

1 回答 1

1

您可以从描述星号拨号方案的文档开始

可能需要使用 func_CURL、Read application、Playbavk 和 Goto

您需要在 extensions_custom.conf 中放置新的拨号方案并通过自定义应用程序模块设置使用它

于 2015-07-18T21:42:39.097 回答