我是编程新手,所以选择了node red作为进入Nexmo的一种简单方法。我想用ngrok和Nexmo取代传统的拨号器报警系统。当报警输入被激活时,最多四个接收者将接收语音呼叫,直到一个接收者接受具有DTMF响应的呼叫,即"0“。我可以创建出站呼叫,但无法通过返回包含dtmf响应的文本转语音来继续呼叫,因为呼叫总是过早结束。有没有人知道使用类似工作流的教程或项目。我是一个新手在这一领域,并将感谢一点温和的指导。谢谢
发布于 2020-01-08 16:35:26
这是我认为你想要做的一个示例流程。它发出第一个呼叫,如果接收方按0,则它会以确认应答并在此结束,如果他们没有按任何键(输入超时)或按下另一个数字,则向下继续对第二个呼叫重复相同的过程,您可以将此流程扩展到3、4、5。人们可以随心所欲地调用链,希望它足够清楚在哪里做这件事,关键是使用一个开关节点来检查DTMF输入,关于这个刚刚上线的https://www.nexmo.com/blog/2020/01/08/interactive-voice-response-node-red-dr有一个新的教程。
[{"id":"4745e6f.c0a4f18","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ebcf4889.76fde8","type":"inject","z":"4745e6f.c0a4f18","name":"Go","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":340,"wires":[["2a747d63.4890fa"]]},{"id":"19db6c23.b9df34","type":"voice webhook","z":"4745e6f.c0a4f18","name":"","url":"/input1","method":"get","x":160,"y":580,"wires":[["15fd1045.7af4f"]]},{"id":"15fd1045.7af4f","type":"switch","z":"4745e6f.c0a4f18","name":"","property":"call.dtmf","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"empty"},{"t":"eq","v":"1,2,3,4,5,6,7,8,9","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":410,"y":620,"wires":[["699c7122.0eaec8"],["3beed2b7.667836","ac144668.83059"],["3beed2b7.667836","ac144668.83059"]]},{"id":"3beed2b7.667836","type":"return ncco","z":"4745e6f.c0a4f18","name":"","x":990,"y":520,"wires":[]},{"id":"699c7122.0eaec8","type":"talk","z":"4745e6f.c0a4f18","text":"Thank you for accepting, goodbye","voicename":"","bargein":false,"loop":"","level":"","x":650,"y":520,"wires":[["3beed2b7.667836"]]},{"id":"20e40559.a7d7a2","type":"comment","z":"4745e6f.c0a4f18","name":"First Call","info":"","x":160,"y":240,"wires":[]},{"id":"46ce6a0.6066318","type":"comment","z":"4745e6f.c0a4f18","name":"Second Call","info":"","x":150,"y":800,"wires":[]},{"id":"22e9b182.875fc6","type":"createcall","z":"4745e6f.c0a4f18","creds":"d21ce4e8.53a06","endpoint":"phone","to":"14155551111","dtmfanswer":"","wsuri":"","headers":"","sipuri":"","extension":"","from":"12125551212","ringingtimer":"","lengthtimer":"","machinedetection":"","answer":"","answertype":"fixed","eventurl":"","x":770,"y":340,"wires":[["bfa7566f.24217"]]},{"id":"2a747d63.4890fa","type":"talk","z":"4745e6f.c0a4f18","text":"Hello World this is node red calling, press 0 to acknowledge","voicename":"","bargein":true,"loop":"","level":"","x":360,"y":340,"wires":[["6ee0fc41.35d424"]]},{"id":"bfa7566f.24217","type":"debug","z":"4745e6f.c0a4f18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1030,"y":340,"wires":[]},{"id":"6ee0fc41.35d424","type":"input","z":"4745e6f.c0a4f18","eventurl":"https://demo.nodered.nexmodev.com/input1","eventmethod":"get","timeout":"","maxdigits":"1","submitonhash":false,"x":550,"y":340,"wires":[["22e9b182.875fc6"]]},{"id":"e36fa6f1.15008","type":"debug","z":"4745e6f.c0a4f18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":910,"y":900,"wires":[]},{"id":"9cb58bf1.4e28b8","type":"createcall","z":"4745e6f.c0a4f18","creds":"d21ce4e8.53a06","endpoint":"phone","to":"14155552222","dtmfanswer":"","wsuri":"","headers":"","sipuri":"","extension":"","from":"12125551212","ringingtimer":"","lengthtimer":"","machinedetection":"","answer":"","answertype":"fixed","eventurl":"","x":690,"y":900,"wires":[["e36fa6f1.15008"]]},{"id":"40f83c45.9190dc","type":"input","z":"4745e6f.c0a4f18","eventurl":"https://demo.nodered.nexmodev.com/input2","eventmethod":"get","timeout":"","maxdigits":"1","submitonhash":false,"x":490,"y":900,"wires":[["9cb58bf1.4e28b8"]]},{"id":"ac144668.83059","type":"talk","z":"4745e6f.c0a4f18","text":"Hello World this is node red calling, press 0 to acknowledge","voicename":"","bargein":true,"loop":"","level":"","x":310,"y":900,"wires":[["40f83c45.9190dc"]]},{"id":"f61e68c4.14919","type":"voice webhook","z":"4745e6f.c0a4f18","name":"","url":"/input2","method":"get","x":190,"y":1060,"wires":[["3c8e7f74.bf88f"]]},{"id":"3c8e7f74.bf88f","type":"switch","z":"4745e6f.c0a4f18","name":"","property":"call.dtmf","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"empty"},{"t":"eq","v":"1,2,3,4,5,6,7,8,9","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":440,"y":1100,"wires":[["69a04958.8ed8"],["e9fa46e5.4371f8"],["e9fa46e5.4371f8"]]},{"id":"e9fa46e5.4371f8","type":"return ncco","z":"4745e6f.c0a4f18","name":"","x":1010,"y":1060,"wires":[]},{"id":"69a04958.8ed8","type":"talk","z":"4745e6f.c0a4f18","text":"Thank you for accepting, goodbye","voicename":"","bargein":false,"loop":"","level":"","x":680,"y":1000,"wires":[["e9fa46e5.4371f8"]]},{"id":"d21ce4e8.53a06","type":"nexmovoiceapp","z":"","name":"NR1.0.0 Test"}]

https://stackoverflow.com/questions/59635942
复制相似问题