@jambonz/node-red-contrib-jambonz 2.2.73 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/examples/Authenticating sip devices.json +1 -0
  2. package/examples/Conference with LCC.json +1 -0
  3. package/{src/examples → examples}/Connecting to a dialogflow bot.json +0 -0
  4. package/examples/Create Call and Send DTMF.json +1 -0
  5. package/examples/Get Log Data.json +1 -0
  6. package/examples/Leave Queue.json +1 -0
  7. package/examples/SIP Responses.json +1 -0
  8. package/{src/examples → examples}/SIP trunking outbound call.json +0 -0
  9. package/examples/Simple IVR.json +1 -0
  10. package/examples/Simple Queue.json +1 -0
  11. package/examples/Using Redirect.json +1 -0
  12. package/examples/Voicemail using Listen into S3 bucket.json +130 -0
  13. package/examples/config.json +1 -0
  14. package/examples/gather.json +1 -0
  15. package/examples/lex.json +1 -0
  16. package/examples/messages.json +1 -0
  17. package/examples/rasa.json +1 -0
  18. package/examples/tag a call.json +1 -0
  19. package/package.json +52 -14
  20. package/resources/editor.js +414 -0
  21. package/src/data/recognizer.json +685 -1
  22. package/src/data/tts.json +2970 -1
  23. package/src/nodes/auth.html +108 -0
  24. package/src/nodes/auth.js +43 -0
  25. package/src/nodes/conference.html +121 -0
  26. package/src/nodes/conference.js +31 -0
  27. package/src/nodes/config.html +484 -0
  28. package/src/nodes/config.js +74 -0
  29. package/src/nodes/create_call.html +287 -0
  30. package/src/nodes/create_call.js +104 -0
  31. package/src/nodes/create_sms.html +106 -0
  32. package/src/nodes/create_sms.js +65 -0
  33. package/src/nodes/dequeue.html +102 -0
  34. package/src/nodes/dequeue.js +25 -0
  35. package/src/nodes/dial.html +629 -0
  36. package/src/nodes/dial.js +141 -0
  37. package/src/nodes/dialogflow.html +260 -0
  38. package/src/nodes/dialogflow.js +53 -0
  39. package/src/nodes/dtmf.html +74 -0
  40. package/src/nodes/dtmf.js +22 -0
  41. package/src/nodes/enqueue.html +90 -0
  42. package/src/nodes/enqueue.js +25 -0
  43. package/src/nodes/gather.html +326 -0
  44. package/src/nodes/gather.js +83 -0
  45. package/src/nodes/get_alerts.html +94 -0
  46. package/src/nodes/get_alerts.js +47 -0
  47. package/src/nodes/get_calls.html +59 -0
  48. package/src/nodes/get_calls.js +38 -0
  49. package/src/nodes/get_recent_calls.html +95 -0
  50. package/src/nodes/get_recent_calls.js +47 -0
  51. package/src/nodes/hangup.html +46 -0
  52. package/src/nodes/hangup.js +20 -0
  53. package/src/nodes/jambonz.html +63 -38
  54. package/src/nodes/lcc.html +256 -0
  55. package/src/nodes/lcc.js +102 -0
  56. package/src/nodes/leave.html +40 -0
  57. package/src/nodes/leave.js +21 -0
  58. package/src/nodes/lex.html +264 -0
  59. package/src/nodes/lex.js +75 -0
  60. package/src/nodes/libs.js +100 -0
  61. package/src/nodes/listen.html +341 -0
  62. package/src/nodes/listen.js +82 -0
  63. package/src/nodes/message.html +95 -0
  64. package/src/nodes/message.js +32 -0
  65. package/src/nodes/pause.html +62 -0
  66. package/src/nodes/pause.js +25 -0
  67. package/src/nodes/play.html +76 -0
  68. package/src/nodes/play.js +23 -0
  69. package/src/nodes/rasa.html +106 -0
  70. package/src/nodes/rasa.js +22 -0
  71. package/src/nodes/redirect.html +64 -0
  72. package/src/nodes/redirect.js +24 -0
  73. package/src/nodes/s3-upload.html +29 -14
  74. package/src/nodes/s3-upload.js +24 -9
  75. package/src/nodes/say.html +119 -0
  76. package/src/nodes/say.js +38 -0
  77. package/src/nodes/sip-decline.html +76 -0
  78. package/src/nodes/sip-decline.js +25 -0
  79. package/src/nodes/sip-refer.html +116 -0
  80. package/src/nodes/sip-refer.js +33 -0
  81. package/src/nodes/sip-request.html +96 -0
  82. package/src/nodes/sip-request.js +36 -0
  83. package/src/nodes/tag.html +60 -0
  84. package/src/nodes/tag.js +22 -0
  85. package/src/nodes/template.html +63 -0
  86. package/src/nodes/template.js +9 -0
  87. package/src/nodes/userauth.html +85 -0
  88. package/src/nodes/userauth.js +70 -0
  89. package/src/nodes/webhooks.js +0 -16
  90. package/src/utils/http-helpers.js +68 -0
  91. package/src/examples/Authenticating sip devices.json +0 -10
  92. package/src/nodes/http-helpers.js +0 -26
  93. package/src/nodes/jambonz.js +0 -1044
@@ -0,0 +1 @@
1
+ [{"id":"200cac384933c69a","type":"user auth","z":"394e01b6582aeade","name":"1234","password":"1234","passwordType":"str","ha1":"","ha1Type":"str","x":570,"y":620,"wires":[["abe303aeefdf9b11"]]},{"id":"9a7c917fceaf1dd2","type":"webhook in","z":"394e01b6582aeade","name":"","url":"/reg","method":"post","x":160,"y":660,"wires":[["f55eb9548f7656fc"]]},{"id":"abe303aeefdf9b11","type":"webhook out","z":"394e01b6582aeade","name":"","x":830,"y":660,"wires":[]},{"id":"f55eb9548f7656fc","type":"switch","z":"394e01b6582aeade","name":"Check User","property":"authRequest.username","propertyType":"msg","rules":[{"t":"eq","v":"1234","vt":"str"},{"t":"eq","v":"5678","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":370,"y":660,"wires":[["200cac384933c69a"],["53984e5fd752ae48"],["4c41efc9fd0209d8"]]},{"id":"53984e5fd752ae48","type":"user auth","z":"394e01b6582aeade","name":"5678","password":"5678","passwordType":"str","ha1":"","ha1Type":"str","x":570,"y":660,"wires":[["abe303aeefdf9b11"]]},{"id":"4c41efc9fd0209d8","type":"user auth","z":"394e01b6582aeade","name":"Fail","password":"","passwordType":"str","ha1":"","ha1Type":"str","x":570,"y":700,"wires":[["abe303aeefdf9b11"]]}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"6f1659c227ac5c0a","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":170,"y":180,"wires":[["390a7f26d4eb4ca1","c02c09f176472250"]]},{"id":"63867d4d1232a7e8","type":"conference","z":"833497f2fae0aaf3","name":"","conference":"testconf","conferenceType":"str","beep":true,"endConferenceOnExit":false,"startConferenceOnEnter":true,"maxParticipants":"","maxParticipantsType":"num","enterHook":"/conf","enterHookType":"str","waitHook":"","waitHookType":"str","joinMuted":false,"x":530,"y":180,"wires":[["f246dbdf8065d691"]]},{"id":"043698be94846ac6","type":"lcc","z":"833497f2fae0aaf3","name":"","server":"1560464fc4351e6a","callSid":"callsid","callSidType":"flow","action":"hold_conf","text":"","vendor":"default","lang":"default","voice":"default","callHook":"","callHookType":"str","waitHook":"/wait","waitHookType":"str","x":480,"y":420,"wires":[["87c53f537d99b411"]]},{"id":"12afe13d8f2663e8","type":"inject","z":"833497f2fae0aaf3","name":"Hold Last Caller","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":240,"y":420,"wires":[["043698be94846ac6"]]},{"id":"f246dbdf8065d691","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":790,"y":180,"wires":[]},{"id":"390a7f26d4eb4ca1","type":"change","z":"833497f2fae0aaf3","name":"","rules":[{"t":"set","p":"callsid","pt":"flow","to":"call.call_sid","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":100,"wires":[[]]},{"id":"c02c09f176472250","type":"say","z":"833497f2fae0aaf3","name":"","text":"Connecting to conference","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":350,"y":180,"wires":[["63867d4d1232a7e8"]]},{"id":"224665842776d022","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/conf","method":"post","x":190,"y":280,"wires":[["3ee468cea7342993"]]},{"id":"951900596281cbd6","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":770,"y":280,"wires":[]},{"id":"3ee468cea7342993","type":"say","z":"833497f2fae0aaf3","name":"","text":"welcome","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":390,"y":280,"wires":[["951900596281cbd6"]]},{"id":"497318cfe96aa595","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/wait","method":"post","x":180,"y":340,"wires":[["5c3a304744139c0a"]]},{"id":"5c3a304744139c0a","type":"say","z":"833497f2fae0aaf3","name":"","text":"holding","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":390,"y":340,"wires":[["fa1c466bbeb88abc"]]},{"id":"fa1c466bbeb88abc","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":750,"y":340,"wires":[]},{"id":"e641ca6faadeb0b3","type":"lcc","z":"833497f2fae0aaf3","name":"","server":"1560464fc4351e6a","callSid":"callsid","callSidType":"flow","action":"unhold_conf","text":"","vendor":"default","lang":"default","voice":"default","callHook":"","callHookType":"str","waitHook":"/wait","waitHookType":"str","x":470,"y":500,"wires":[["87c53f537d99b411"]]},{"id":"db09eb0f0d76eb8e","type":"inject","z":"833497f2fae0aaf3","name":"Unhold Last Caller","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":250,"y":500,"wires":[["e641ca6faadeb0b3"]]},{"id":"87c53f537d99b411","type":"debug","z":"833497f2fae0aaf3","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":460,"wires":[]},{"id":"1560464fc4351e6a","type":"jambonz_auth","name":"jambonz.me","urlType":"str","url":"http://jambonz.me/api"}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"36235b0288c5eaf9","type":"create-call","z":"833497f2fae0aaf3","name":"","server":"a05757333290dd43","from":"12215551212","fromType":"str","to":"14155551000","toType":"str","dest":"phone","timeout":"","application":"2c4046ce-e600-4bc3-86fb-fa82105495e2","appName":"Ngrok","mode":"app","call_hook_url":"","call_hook_urlType":"str","call_hook_method":"GET","call_status_url":"","call_status_urlType":"str","call_status_method":"GET","vendor":null,"lang":"","voice":"","transcriptionvendor":"default","recognizerlang":"default","x":550,"y":300,"wires":[[]]},{"id":"5efd03b4b18f4193","type":"inject","z":"833497f2fae0aaf3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":300,"wires":[["36235b0288c5eaf9"]]},{"id":"76dfd7b70ec60274","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":210,"y":180,"wires":[["ae0eb8c79b2c3253"]]},{"id":"c48cd8590c2d4bcd","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":710,"y":180,"wires":[]},{"id":"ae0eb8c79b2c3253","type":"dtmf","z":"833497f2fae0aaf3","name":"","dtmf":"54321","duration":"500","x":390,"y":180,"wires":[["222f681d81ae99f5"]]},{"id":"222f681d81ae99f5","type":"pause","z":"833497f2fae0aaf3","name":"","len":"10","lenType":"num","x":550,"y":180,"wires":[["c48cd8590c2d4bcd"]]},{"id":"a05757333290dd43","type":"jambonz_auth","name":"XYZ","urlType":"https://api.jambonz.xyz","url":""}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"dff6b5aa87172311","type":"get_alerts","z":"833497f2fae0aaf3","name":"","server":"a05757333290dd43","page":1,"pageType":"num","count":25,"countType":"num","days":7,"x":560,"y":400,"wires":[["3fd80d23e0939b1b"]]},{"id":"9bee4a0f12053daf","type":"get_calls","z":"833497f2fae0aaf3","name":"","server":"a05757333290dd43","x":540,"y":540,"wires":[["9364d4aa1f24cacf"]]},{"id":"04d12287556dd92b","type":"get_recent_calls","z":"833497f2fae0aaf3","name":"","server":"a05757333290dd43","page":1,"pageType":"num","count":25,"countType":"num","days":7,"x":550,"y":680,"wires":[["dea539b390dccc09"]]},{"id":"298185c479604ced","type":"inject","z":"833497f2fae0aaf3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":360,"y":400,"wires":[["dff6b5aa87172311"]]},{"id":"c78fc2cb3536822d","type":"inject","z":"833497f2fae0aaf3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":540,"wires":[["9bee4a0f12053daf"]]},{"id":"3fd80d23e0939b1b","type":"debug","z":"833497f2fae0aaf3","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":400,"wires":[]},{"id":"9364d4aa1f24cacf","type":"debug","z":"833497f2fae0aaf3","name":"debug 7","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":540,"wires":[]},{"id":"eb201e6218cbecc8","type":"inject","z":"833497f2fae0aaf3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":680,"wires":[["04d12287556dd92b"]]},{"id":"dea539b390dccc09","type":"debug","z":"833497f2fae0aaf3","name":"debug 8","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":680,"wires":[]},{"id":"a05757333290dd43","type":"jambonz_auth","name":"XYZ","urlType":"https://api.jambonz.xyz","url":""}]
@@ -0,0 +1 @@
1
+ [{"id":"c6687cbd705a9ee6","type":"tab","label":"Flow 2","disabled":true,"info":"","env":[]},{"id":"80dda8e1dbae8f9e","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":830,"y":140,"wires":[]},{"id":"966a8333cc2df6a0","type":"say","z":"c6687cbd705a9ee6","name":"","text":"Hello, your call is being placed into a queue.","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":330,"y":140,"wires":[["b4bf2e128be393a1"]]},{"id":"b4bf2e128be393a1","type":"enqueue","z":"c6687cbd705a9ee6","name":"","queue":"testqueue","queueType":"str","actionHook":"","actionHookType":"str","waitHook":"/wait","waitHookType":"str","x":500,"y":140,"wires":[["1e39f1f207781fe1"]]},{"id":"6f7506f616e2b35e","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/wait","method":"post","x":100,"y":220,"wires":[["87b91f9decbdee15"]]},{"id":"df44bbb04ed38a25","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":830,"y":280,"wires":[]},{"id":"c35c9bce3622a919","type":"say","z":"c6687cbd705a9ee6","name":"","text":"waiting","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":490,"y":200,"wires":[["6d811cb35b587220"]]},{"id":"6d811cb35b587220","type":"pause","z":"c6687cbd705a9ee6","name":"","len":"1","lenType":"num","x":630,"y":200,"wires":[["df44bbb04ed38a25"]]},{"id":"1e39f1f207781fe1","type":"say","z":"c6687cbd705a9ee6","name":"","text":"goodbye","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":650,"y":140,"wires":[["80dda8e1dbae8f9e"]]},{"id":"87b91f9decbdee15","type":"switch","z":"c6687cbd705a9ee6","name":"queue time","property":"call.queue_time","propertyType":"msg","rules":[{"t":"lt","v":"10","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":220,"wires":[["c35c9bce3622a919"],["bcf3d50b0f8bd8be"]]},{"id":"bcf3d50b0f8bd8be","type":"leave","z":"c6687cbd705a9ee6","name":"","x":510,"y":280,"wires":[["df44bbb04ed38a25"]]},{"id":"310bf836355458b4","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/answer","method":"post","x":110,"y":140,"wires":[["966a8333cc2df6a0"]]},{"id":"48c4c9fdeb6fc0e4","type":"comment","z":"c6687cbd705a9ee6","name":"Example","info":"Adds the caller to the queue.\nOnce they have been in the queue for more than 10seconds it returns a leave \nThis removes them from the queue and carries on to the 2nd say in the first path.\n","x":100,"y":80,"wires":[]}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"06b840f4d9c7bc92","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":1090,"y":160,"wires":[]},{"id":"95a34bf4eade79fa","type":"say","z":"833497f2fae0aaf3","name":"","text":"Hello","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":290,"y":160,"wires":[["059e8ea21e1b5068"]]},{"id":"42d3a403aab28f6f","type":"sip:request","z":"833497f2fae0aaf3","name":"","method":"INFO","headers":"","headersType":"json","body":"Info Test","bodyType":"str","actionHook":"","actionHookType":"str","x":590,"y":160,"wires":[["f9eed73ec4a8d581"]]},{"id":"059e8ea21e1b5068","type":"pause","z":"833497f2fae0aaf3","name":"","len":"3","lenType":"num","x":430,"y":160,"wires":[["42d3a403aab28f6f"]]},{"id":"006adb53573de69d","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":70,"y":160,"wires":[["d3d42b20ab934be9"]]},{"id":"023df5204617e23d","type":"pause","z":"833497f2fae0aaf3","name":"","len":"5","lenType":"num","x":710,"y":340,"wires":[["06b840f4d9c7bc92"]]},{"id":"becf20314564e27d","type":"sip:request","z":"833497f2fae0aaf3","name":"","method":"NOTIFY","headers":"","headersType":"json","body":"Notify Test","bodyType":"str","actionHook":"","actionHookType":"str","x":530,"y":260,"wires":[["89225fa26b74de8f"]]},{"id":"f9eed73ec4a8d581","type":"pause","z":"833497f2fae0aaf3","name":"","len":"3","lenType":"num","x":390,"y":260,"wires":[["becf20314564e27d"]]},{"id":"28d18361304eb1ec","type":"sip:request","z":"833497f2fae0aaf3","name":"","method":"MESSAGE","headers":"","headersType":"json","body":"Message Test","bodyType":"str","actionHook":"","actionHookType":"str","x":530,"y":340,"wires":[["023df5204617e23d"]]},{"id":"89225fa26b74de8f","type":"pause","z":"833497f2fae0aaf3","name":"","len":"3","lenType":"num","x":390,"y":340,"wires":[["28d18361304eb1ec"]]},{"id":"d3d42b20ab934be9","type":"switch","z":"833497f2fae0aaf3","name":"","property":"call.to","propertyType":"msg","rules":[{"t":"eq","v":"123","vt":"str"},{"t":"eq","v":"404","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":230,"y":80,"wires":[["90c1e53d708a5be3"],["e30b02f408a87701"],["95a34bf4eade79fa"]]},{"id":"90c1e53d708a5be3","type":"sip:refer","z":"833497f2fae0aaf3","name":"","referTo":"456","referToType":"str","referredBy":"","referredByType":"str","headers":"","headersType":"json","eventHook":"","eventHookType":"str","actionHook":"","actionHookType":"str","x":400,"y":60,"wires":[["06b840f4d9c7bc92"]]},{"id":"e30b02f408a87701","type":"sip:decline","z":"833497f2fae0aaf3","name":"","status":"404","statusType":"num","reason":"","reasonType":"str","x":410,"y":100,"wires":[["06b840f4d9c7bc92"]]}]
@@ -0,0 +1 @@
1
+ [{"id":"c6687cbd705a9ee6","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"80dda8e1dbae8f9e","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":1010,"y":140,"wires":[]},{"id":"ae992c7104760820","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/answer","method":"post","x":170,"y":140,"wires":[["966a8333cc2df6a0"]]},{"id":"a35eedde1b318275","type":"gather","z":"c6687cbd705a9ee6","name":"","actionhook":"/input1","finishonkey":"","dtmfinput":true,"speechinput":false,"numdigits":"1","timeout":"","prompttype":"say","playurl":"","playurlType":"str","playLoop":"","text":"Please press 1 for music, 2 to be transferred or 3 to end the call","vendor":"default","lang":"default","voice":"default","xvoice":"default","xlang":"default","transcriptionvendor":"default","recognizerlang":"default","recognizeraltlang":"","recognizeraltlangType":"","interim":false,"profanityfilter":false,"transcriptionhints":"","transcriptionhintsType":"str","separaterecog":false,"useenhanced":false,"words":false,"punctuation":false,"diarization":false,"diarizationmin":2,"diarizationminType":"num","diarizationmax":6,"diarizationmaxType":"num","interactiontype":"voice_command","naics":0,"naicsType":"num","identifychannels":false,"speakerlabel":false,"vocabularyname":"","vocabularynameType":"str","vocabularyfiltername":"","vocabularyfilternameType":"str","x":750,"y":140,"wires":[["80dda8e1dbae8f9e"]]},{"id":"586065b4be59223a","type":"dial","z":"c6687cbd705a9ee6","name":"","targets":[{"type":"phone","varType":"str","dest":"12125551212"}],"headers":[],"actionhook":"","actionhookType":"str","answeronbridge":false,"callerid":"call.to","calleridType":"msg","confirmhook":"","confirmhookType":"str","dialmusic":"","dialmusicType":"str","dtmfcapture":"","dtmfcaptureType":"str","dtmfhook":"","dtmfhookType":"str","timelimit":"","timeout":"","listenurl":"","listenurlType":"str","transcriptionhook":"","transcriptionhookType":"str","transcriptionvendor":"default","recognizerlang":"default","recognizeraltlang":"","recognizeraltlangType":"","interim":false,"profanityfilter":false,"transcriptionhints":"","transcriptionhintsType":"str","separaterecog":false,"useenhanced":false,"words":false,"punctuation":false,"diarization":false,"diarizationmin":2,"diarizationminType":"num","diarizationmax":6,"diarizationmaxType":"num","interactiontype":"unspecified","naics":0,"naicsType":"num","identifychannels":false,"speakerlabel":false,"vocabularyname":"","vocabularynameType":"str","vocabularyfiltername":"","vocabularyfilternameType":"str","x":830,"y":420,"wires":[["b311c4697bf682ef"]]},{"id":"979c327a6e5d596b","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/input1","method":"post","x":170,"y":300,"wires":[["ef2db044345c7040"]]},{"id":"b311c4697bf682ef","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":1150,"y":380,"wires":[]},{"id":"e973d21a3359edb9","type":"play","z":"c6687cbd705a9ee6","name":"","url":"http://example.com/opus1.mp3","urlType":"str","early":false,"loop":1,"x":830,"y":380,"wires":[["b311c4697bf682ef"]]},{"id":"45f130f460fd71e6","type":"hangup","z":"c6687cbd705a9ee6","name":"","x":900,"y":480,"wires":[["b311c4697bf682ef"]]},{"id":"453c257866b37a81","type":"say","z":"c6687cbd705a9ee6","name":"","text":"Goodbye","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":770,"y":480,"wires":[["45f130f460fd71e6"]]},{"id":"966a8333cc2df6a0","type":"say","z":"c6687cbd705a9ee6","name":"","text":"Hello","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":390,"y":140,"wires":[["a35eedde1b318275"]]},{"id":"ef2db044345c7040","type":"switch","z":"c6687cbd705a9ee6","name":"Reason","property":"call.reason","propertyType":"msg","rules":[{"t":"eq","v":"timeout","vt":"str"},{"t":"eq","v":"dtmfDetected","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":360,"y":300,"wires":[["a35eedde1b318275"],["46ac3bf482262e32"],["a35eedde1b318275"]]},{"id":"46ac3bf482262e32","type":"switch","z":"c6687cbd705a9ee6","name":"","property":"call.digits","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":530,"y":400,"wires":[["e973d21a3359edb9"],["586065b4be59223a"],["453c257866b37a81"],["a35eedde1b318275"]]},{"id":"f6febe414ac1a88c","type":"comment","z":"c6687cbd705a9ee6","name":"Initial Greeting","info":"","x":430,"y":80,"wires":[]},{"id":"67e593ee1a7c00eb","type":"comment","z":"c6687cbd705a9ee6","name":"Options","info":"","x":770,"y":80,"wires":[]},{"id":"f1a9dcc4f6c439ba","type":"comment","z":"c6687cbd705a9ee6","name":"Check for input","info":"If no digits detected or timeout then go back to options","x":360,"y":260,"wires":[]},{"id":"eb80e0ecb5962cd5","type":"comment","z":"c6687cbd705a9ee6","name":"Validate input","info":"If no valid option then go back to menu","x":530,"y":340,"wires":[]},{"id":"42b9baee457219ce","type":"comment","z":"c6687cbd705a9ee6","name":"Call Routes","info":"","x":850,"y":320,"wires":[]}]
@@ -0,0 +1 @@
1
+ [{"id":"c6687cbd705a9ee6","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"80dda8e1dbae8f9e","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":910,"y":140,"wires":[]},{"id":"ae992c7104760820","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/answer","method":"post","x":170,"y":140,"wires":[["966a8333cc2df6a0"]]},{"id":"966a8333cc2df6a0","type":"say","z":"c6687cbd705a9ee6","name":"","text":"Hello, your call is being placed into a queue.","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":390,"y":140,"wires":[["b4bf2e128be393a1"]]},{"id":"b4bf2e128be393a1","type":"enqueue","z":"c6687cbd705a9ee6","name":"","queue":"testqueue","queueType":"str","actionHook":"","actionHookType":"str","waitHook":"/wait","waitHookType":"str","x":600,"y":140,"wires":[["80dda8e1dbae8f9e"]]},{"id":"6f7506f616e2b35e","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/wait","method":"post","x":180,"y":220,"wires":[["9f87c66cddde90c0"]]},{"id":"df44bbb04ed38a25","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":890,"y":220,"wires":[]},{"id":"a537510c9c14fd5b","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":830,"y":380,"wires":[]},{"id":"9f87c66cddde90c0","type":"play","z":"c6687cbd705a9ee6","name":"","url":"https://example.com/opus1.mp3","urlType":"str","early":false,"loop":"1","x":390,"y":220,"wires":[["c35c9bce3622a919"]]},{"id":"1eda6dab5502deec","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/agent","method":"post","x":190,"y":380,"wires":[["fe466a811ca4ed78"]]},{"id":"fe466a811ca4ed78","type":"dequeue","z":"c6687cbd705a9ee6","name":"","queue":"testqueue","queueType":"str","actionHook":"","actionHookType":"str","confirmHook":"","confirmHookType":"str","beep":true,"timeout":"","timeoutType":"num","x":420,"y":380,"wires":[["b349d4de4e105c30"]]},{"id":"b349d4de4e105c30","type":"redirect","z":"c6687cbd705a9ee6","name":"","hook":"/agent","hookType":"str","x":600,"y":380,"wires":[["a537510c9c14fd5b"]]},{"id":"5ca895fc36f2d22c","type":"comment","z":"c6687cbd705a9ee6","name":"Calls from end customers","info":"","x":190,"y":100,"wires":[]},{"id":"7c92a30cccbd048f","type":"comment","z":"c6687cbd705a9ee6","name":"Calls from agents","info":"","x":160,"y":340,"wires":[]},{"id":"f784cf7db6df9aa6","type":"comment","z":"c6687cbd705a9ee6","name":"","info":"When customer hangs up the agent will loop around and pickup another call from the queue","x":600,"y":340,"wires":[]},{"id":"c35c9bce3622a919","type":"say","z":"c6687cbd705a9ee6","name":"","text":"Your call is important to us, please continue to hold","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":570,"y":220,"wires":[["df44bbb04ed38a25"]]}]
@@ -0,0 +1 @@
1
+ [{"id":"c6687cbd705a9ee6","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"80dda8e1dbae8f9e","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":910,"y":140,"wires":[]},{"id":"ae992c7104760820","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/answer","method":"post","x":170,"y":140,"wires":[["966a8333cc2df6a0"]]},{"id":"966a8333cc2df6a0","type":"say","z":"c6687cbd705a9ee6","name":"","text":"Hello, this is the first webhook.","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":390,"y":140,"wires":[["79ea6e86e6ce7241"]]},{"id":"79ea6e86e6ce7241","type":"redirect","z":"c6687cbd705a9ee6","name":"","hook":"/more","hookType":"str","x":660,"y":140,"wires":[["80dda8e1dbae8f9e"]]},{"id":"7a4c2562478f054e","type":"webhook in","z":"c6687cbd705a9ee6","name":"","url":"/more","method":"post","x":210,"y":260,"wires":[["ef526ec49e69fcee"]]},{"id":"ef526ec49e69fcee","type":"say","z":"c6687cbd705a9ee6","name":"","text":"And this is the second webhook","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":450,"y":260,"wires":[["b7fdd9e898eadbe2"]]},{"id":"b7fdd9e898eadbe2","type":"webhook out","z":"c6687cbd705a9ee6","name":"","x":910,"y":260,"wires":[]}]
@@ -0,0 +1,130 @@
1
+ [{
2
+ "id": "80dda8e1dbae8f9e",
3
+ "type": "webhook out",
4
+ "z": "c6687cbd705a9ee6",
5
+ "name": "",
6
+ "x": 710,
7
+ "y": 140,
8
+ "wires": []
9
+ }, {
10
+ "id": "b0eed88850f319d2",
11
+ "type": "audio in",
12
+ "z": "c6687cbd705a9ee6",
13
+ "name": "/socket",
14
+ "path": "/socket",
15
+ "bucket": "arn:aws:s3:eu-west-1:123456789:accesspoint/jambonz",
16
+ "aws": "d080336c94d31c24",
17
+ "x": 230,
18
+ "y": 300,
19
+ "wires": [
20
+ ["96408852d74fb36c"]
21
+ ]
22
+ }, {
23
+ "id": "aa8f6359afdd5f9f",
24
+ "type": "say",
25
+ "z": "c6687cbd705a9ee6",
26
+ "name": "Greeting",
27
+ "text": "Please leave your message at the tone",
28
+ "early": false,
29
+ "loop": 1,
30
+ "vendor": "default",
31
+ "lang": "default",
32
+ "xlang": "default",
33
+ "voice": "default",
34
+ "xvoice": "default",
35
+ "x": 380,
36
+ "y": 140,
37
+ "wires": [
38
+ ["7b1ad628ab592de5"]
39
+ ]
40
+ }, {
41
+ "id": "7b1ad628ab592de5",
42
+ "type": "listen",
43
+ "z": "c6687cbd705a9ee6",
44
+ "name": "",
45
+ "actionhook": "",
46
+ "actionhookType": "str",
47
+ "url": "/socket",
48
+ "urlType": "str",
49
+ "authuser": "",
50
+ "authuserType": "str",
51
+ "finishonkey": "",
52
+ "maxlength": "",
53
+ "metadata": "",
54
+ "metadataType": "json",
55
+ "mixtype": "mono",
56
+ "beep": false,
57
+ "samplerate": 8000,
58
+ "transcriptionhook": "",
59
+ "transcriptionhookType": "str",
60
+ "transcriptionvendor": "default",
61
+ "recognizerlang": "default",
62
+ "recognizeraltlang": "",
63
+ "recognizeraltlangType": "",
64
+ "interim": false,
65
+ "profanityfilter": false,
66
+ "transcriptionhints": "",
67
+ "transcriptionhintsType": "str",
68
+ "separaterecog": false,
69
+ "useenhanced": false,
70
+ "words": false,
71
+ "punctuation": false,
72
+ "diarization": false,
73
+ "diarizationmin": 2,
74
+ "diarizationminType": "num",
75
+ "diarizationmax": 6,
76
+ "diarizationmaxType": "num",
77
+ "interactiontype": "unspecified",
78
+ "naics": 0,
79
+ "naicsType": "num",
80
+ "identifychannels": false,
81
+ "speakerlabel": false,
82
+ "vocabularyname": "",
83
+ "vocabularynameType": "str",
84
+ "vocabularyfiltername": "",
85
+ "vocabularyfilternameType": "str",
86
+ "x": 530,
87
+ "y": 140,
88
+ "wires": [
89
+ ["80dda8e1dbae8f9e"]
90
+ ]
91
+ }, {
92
+ "id": "96408852d74fb36c",
93
+ "type": "debug",
94
+ "z": "c6687cbd705a9ee6",
95
+ "name": "debug 6",
96
+ "active": true,
97
+ "tosidebar": true,
98
+ "console": false,
99
+ "tostatus": false,
100
+ "complete": "false",
101
+ "statusVal": "",
102
+ "statusType": "auto",
103
+ "x": 460,
104
+ "y": 300,
105
+ "wires": []
106
+ }, {
107
+ "id": "ae992c7104760820",
108
+ "type": "webhook in",
109
+ "z": "c6687cbd705a9ee6",
110
+ "name": "",
111
+ "url": "/answer",
112
+ "method": "post",
113
+ "x": 170,
114
+ "y": 140,
115
+ "wires": [
116
+ ["aa8f6359afdd5f9f"]
117
+ ]
118
+ }, {
119
+ "id": "78cc0e7aaccb24b4",
120
+ "type": "comment",
121
+ "z": "c6687cbd705a9ee6",
122
+ "name": "Add AWS Config",
123
+ "info": "Setup your own AWS auth and S3 bucket access point in this node",
124
+ "x": 240,
125
+ "y": 260,
126
+ "wires": []
127
+ }, {
128
+ "id": "d080336c94d31c24",
129
+ "type": "aws_auth"
130
+ }]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"731590be86b5f487","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":390,"y":100,"wires":[["0b099ec890fbc97e"]]},{"id":"9ec0ae05aa2194cf","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":1010,"y":440,"wires":[]},{"id":"0b099ec890fbc97e","type":"say","z":"833497f2fae0aaf3","name":"","text":"Hello world this is the default voice","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":590,"y":140,"wires":[["8b428afc32c3523c"]]},{"id":"8b428afc32c3523c","type":"cfg","z":"833497f2fae0aaf3","name":"","tts":true,"vendor":"aws","lang":"en-GB-WLS","xlang":"en-GB-WLS","voice":"Geraint","xvoice":"Geraint","speechinput":0,"transcriptionvendor":"default","vocabularyname":"","vocabularynameType":"str","vocabularyfiltername":"","vocabularyfilternameType":"str","identifyChannels":"","recognizerlang":"default","recognizeraltlang":"","recognizeraltlangType":"","transcriptionhints":"","transcriptionhintsType":"str","bargeIn":0,"bargeIn_enable":"true","bargeIn_enableType":"bool","bargeIn_actionHook":"","bargeIn_actionHookType":"str","bargeIn_input":"","bargeIn_inputType":"inptype","bargeIn_finishOnKey":"","bargeIn_finishOnKeyType":"str","bargeIn_numDigits":"","bargeIn_numDigitsType":"num","bargeIn_minDigits":"","bargeIn_minDigitsType":"num","bargeIn_maxDigits":"","bargeIn_maxDigitsType":"num","bargeIn_interDigitTimeout":"","bargeIn_interDigitTimeoutType":"num","amd":0,"amd_actionHook":"","amd_actionHookType":"str","amd_thresholdWordCount":"","amd_thresholdWordCountType":"num","amd_timers_noSpeechTimeoutMs":"","amd_timers_noSpeechTimeoutMsType":"num","amd_timers_decisionTimeoutMs":"","amd_timers_decisionTimeoutMsType":"num","amd_timers_toneTimeoutMs":"","amd_timers_toneTimeoutMsType":"num","amd_timers_greetingCompletionTimeoutMs":"","amd_timers_greetingCompletionTimeoutMsType":"num","record":0,"record_action":"startCallRecording","record_actionType":"rectype","record_siprecServerURL":"","record_siprecServerURLType":"str","record_recordingID":"","record_recordingIDType":"str","x":790,"y":200,"wires":[["9053995d2c6b5805"]]},{"id":"9053995d2c6b5805","type":"say","z":"833497f2fae0aaf3","name":"","text":"And Now we've changed to a Welsh voice.","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":890,"y":300,"wires":[["9ec0ae05aa2194cf"]]}]
@@ -0,0 +1 @@
1
+ [{"id":"b7186bc3.26d27","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"5c7d76b4.98e518","type":"webhook in","z":"b7186bc3.26d27","name":"","url":"/dial-by-state","method":"post","x":190,"y":100,"wires":[["4fe7ff70.bb338"]]},{"id":"908c03f.89a528","type":"webhook out","z":"b7186bc3.26d27","name":"","x":1060,"y":80,"wires":[]},{"id":"4fe7ff70.bb338","type":"gather","z":"b7186bc3.26d27","name":"","actionhook":"/state-response","finishonkey":"","dtmfinput":0,"speechinput":1,"numdigits":"","timeout":"","prompttype":"say","playurl":"","playurlType":"str","text":"In order to route your call properly, please say the name of the US state you are calling from.","vendor":"default","lang":"default","voice":"default","recognizerlang":"en-US","recognizerhints":"hints","recognizerhintsType":"flow","x":430,"y":100,"wires":[["908c03f.89a528"]]},{"id":"2cb918e1.cb7428","type":"webhook in","z":"b7186bc3.26d27","name":"","url":"/state-response","method":"post","x":190,"y":180,"wires":[["a1e34024.e888d","5d39cdb2.553bcc"]]},{"id":"a1e34024.e888d","type":"debug","z":"b7186bc3.26d27","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"call","targetType":"msg","x":360,"y":340,"wires":[]},{"id":"d427b2d2.c296f","type":"inject","z":"b7186bc3.26d27","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":40,"wires":[["b9566212.09551"]]},{"id":"b9566212.09551","type":"function","z":"b7186bc3.26d27","name":"initialize states","func":"const states = [\n {\n \"name\": \"Alabama\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Alaska\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"American Samoa\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Arizona\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Arkansas\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"California\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Colorado\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Connecticut\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Delaware\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"District Of Columbia\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Federated States Of Micronesia\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Florida\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Georgia\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Guam\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Hawaii\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Idaho\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Illinois\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Indiana\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Iowa\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Kansas\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Kentucky\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Louisiana\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Maine\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Marshall Islands\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Maryland\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Massachusetts\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Michigan\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Minnesota\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Mississippi\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Missouri\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Montana\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Nebraska\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Nevada\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"New Hampshire\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"New Jersey\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"New Mexico\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"New York\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"North Carolina\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"North Dakota\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Northern Mariana Islands\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Ohio\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Oklahoma\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Oregon\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Palau\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Pennsylvania\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Puerto Rico\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Rhode Island\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"South Carolina\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"South Dakota\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Tennessee\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Texas\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Utah\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Vermont\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Virgin Islands\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Virginia\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Washington\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"West Virginia\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Wisconsin\",\n \"phone\": \"daveh@jambonz.us\"\n },\n {\n \"name\": \"Wyoming\",\n \"phone\": \"daveh@jambonz.us\"\n }\n];\nconst names = states.map((st) => st.name);\nconst hints = names.join(',');\n\nflow.set('hints', hints);\nflow.set('states', states);\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":40,"wires":[[]]},{"id":"5d39cdb2.553bcc","type":"function","z":"b7186bc3.26d27","name":"parse state requested","func":"msg.state = null;\nif (Array.isArray(msg.call.speech.alternatives)) {\n const alt = msg.call.speech.alternatives;\n if (alt.length > 0) {\n const confidence = alt[0].confidence;\n const transcript = alt[0].transcript;\n \n // parse the name\n const states = flow.get('states');\n const selected = states.find((st) => transcript.includes(st.name));\n if (selected && confidence > 0.5) {\n msg.state = selected.name;\n msg.phone = selected.phone;\n }\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":200,"wires":[["82d3a2c9.e4184"]]},{"id":"82d3a2c9.e4184","type":"switch","z":"b7186bc3.26d27","name":"","property":"state","propertyType":"msg","rules":[{"t":"null"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":220,"wires":[["747ae780.f7638"],["805c3325.97b388"]]},{"id":"805c3325.97b388","type":"say","z":"b7186bc3.26d27","name":"","text":"Please hold while we connect you to our call center in ${msg.state}","early":false,"loop":1,"vendor":"default","lang":"default","voice":"default","x":960,"y":280,"wires":[["66923c8c.9393fc"]]},{"id":"66923c8c.9393fc","type":"dial","z":"b7186bc3.26d27","name":"","targets":[{"type":"user","varType":"msg","dest":"phone"}],"headers":[],"actionhook":"","actionhookType":"str","answeronbridge":false,"callerid":"from","calleridType":"msg","confirmhook":"","confirmhookType":"str","dialmusic":"","dialmusicType":"str","dtmfcapture":"","dtmfcaptureType":"str","dtmfhook":"","dtmfhookType":"str","timelimit":"","timeout":"","listenurl":"","listenurlType":"str","transcribeurl":"","transcribeurlType":"str","interim":false,"transcribelang":"en-US","x":1120,"y":260,"wires":[["908c03f.89a528"]]},{"id":"747ae780.f7638","type":"say","z":"b7186bc3.26d27","name":"","early":false,"loop":1,"vendor":"default","lang":"default","voice":"default","x":930,"y":180,"wires":[["4fe7ff70.bb338"]]}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"731590be86b5f487","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":390,"y":100,"wires":[["792d9e7f12ca0b2f"]]},{"id":"9ec0ae05aa2194cf","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":830,"y":100,"wires":[]},{"id":"792d9e7f12ca0b2f","type":"lex","z":"833497f2fae0aaf3","name":"","aws":"d080336c94d31c24","bot":"BookTrip_enGB","botType":"str","alias":"prod","aliasType":"str","region":"us-east-1","locale":"en_GB","localeType":"str","specifyIntent":false,"intent":"HelloName","intentType":"str","slots":"name","slotsType":"json","metadata":"","metadataType":"json","welcomeMessage":"Hello what is your name","eventHook":"","eventHookType":"str","actionHook":"","actionHookType":"str","bargein":false,"inputTimeout":"5","inputTimeoutType":"num","passDtmf":false,"prompt":"lex","vendor":"aws","lang":"en-GB","voice":"Emma","xlang":"en-GB","xvoice":"Emma","x":610,"y":100,"wires":[["9ec0ae05aa2194cf"]]},{"id":"d080336c94d31c24","type":"aws_auth"}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"ee50078e5a687978","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":550,"y":120,"wires":[["90c30a11ab4d39b3"]]},{"id":"bda7be4b522c4ae8","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":1230,"y":120,"wires":[]},{"id":"90c30a11ab4d39b3","type":"say","z":"833497f2fae0aaf3","name":"","text":"Hello, we're sending you a text message","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":710,"y":120,"wires":[["6cc233b06a1214ef"]]},{"id":"6cc233b06a1214ef","type":"message","z":"833497f2fae0aaf3","name":"","from":"call.to","fromType":"msg","to":"call.from","toType":"msg","text":"This is your message","textType":"str","provider":"","providerType":"str","x":960,"y":120,"wires":[["bda7be4b522c4ae8"]]},{"id":"e35b55ec875f4d0d","type":"create-sms","z":"833497f2fae0aaf3","name":"","server":"a05757333290dd43","from":"123456","fromType":"str","to":"payload.dest","toType":"msg","text":"payload.text","textType":"msg","provider":"","providerType":"str","x":830,"y":420,"wires":[["f437483aaf655888"]]},{"id":"ccf953b35e32c99d","type":"inject","z":"833497f2fae0aaf3","name":"Configure Message & Dest","props":[{"p":"payload.dest","v":"12125551212","vt":"str"},{"p":"payload.text","v":"Hello","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":610,"y":420,"wires":[["e35b55ec875f4d0d"]]},{"id":"f437483aaf655888","type":"debug","z":"833497f2fae0aaf3","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1120,"y":420,"wires":[]},{"id":"a05757333290dd43","type":"jambonz_auth","name":"XYZ","urlType":"https://api.jambonz.xyz","url":""}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"fd2f8aa02eeff68d","type":"rasa","z":"833497f2fae0aaf3","name":"","url":"https://example.com/rasa","urlType":"str","prompt":"Hello, what can I help you with","promptType":"str","eventHook":"","eventHookType":"str","actionHook":"","actionHookType":"str","x":970,"y":160,"wires":[["e06631acd7a098fa"]]},{"id":"9f8055d32173baed","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":690,"y":160,"wires":[["fd2f8aa02eeff68d"]]},{"id":"e06631acd7a098fa","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":1190,"y":160,"wires":[]}]
@@ -0,0 +1 @@
1
+ [{"id":"833497f2fae0aaf3","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"ee50078e5a687978","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/answer","method":"post","x":390,"y":140,"wires":[["90c30a11ab4d39b3"]]},{"id":"bda7be4b522c4ae8","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":1190,"y":140,"wires":[]},{"id":"90c30a11ab4d39b3","type":"say","z":"833497f2fae0aaf3","name":"","text":"Hello","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":550,"y":140,"wires":[["ced7e61746fc3dbf"]]},{"id":"ced7e61746fc3dbf","type":"tag","z":"833497f2fae0aaf3","name":"","data":"{\"customerid\":123456}","dataType":"json","x":710,"y":140,"wires":[["354ec583b271505c"]]},{"id":"7ee32ebc8b67f198","type":"redirect","z":"833497f2fae0aaf3","name":"","hook":"/more","hookType":"str","x":1040,"y":140,"wires":[["bda7be4b522c4ae8"]]},{"id":"088569111a0473d2","type":"webhook in","z":"833497f2fae0aaf3","name":"","url":"/more","method":"post","x":470,"y":300,"wires":[["c25bd786b9f5952f","eeb100819cdc40aa"]]},{"id":"a4b88d00bef27cdb","type":"webhook out","z":"833497f2fae0aaf3","name":"","x":1150,"y":300,"wires":[]},{"id":"c25bd786b9f5952f","type":"debug","z":"833497f2fae0aaf3","name":"CustomerData","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"call.customerData","targetType":"msg","statusVal":"call.customerData.customerid","statusType":"msg","x":620,"y":500,"wires":[]},{"id":"eeb100819cdc40aa","type":"say","z":"833497f2fae0aaf3","name":"","text":"Goodbye","early":false,"loop":1,"vendor":"default","lang":"default","xlang":"default","voice":"default","xvoice":"default","x":750,"y":300,"wires":[["a4b88d00bef27cdb"]]},{"id":"354ec583b271505c","type":"pause","z":"833497f2fae0aaf3","name":"","len":"3","lenType":"num","x":870,"y":140,"wires":[["7ee32ebc8b67f198"]]},{"id":"fe158748b4374898","type":"inject","z":"833497f2fae0aaf3","name":"Clear Status","props":[{"p":"call.customerData.customerid","v":" ","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":410,"y":500,"wires":[["c25bd786b9f5952f"]]}]
package/package.json CHANGED
@@ -1,15 +1,53 @@
1
1
  {
2
2
  "name": "@jambonz/node-red-contrib-jambonz",
3
- "version": "2.2.73",
3
+ "version": "2.3.1",
4
4
  "description": "Node-RED nodes for jambonz",
5
5
  "keywords": [
6
6
  "node-red"
7
7
  ],
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git://github.com/jambonz/node-red-contrib-jambonz.git"
11
+ },
12
+ "engines": {
13
+ "node": ">=14.x"
14
+ },
8
15
  "node-red": {
16
+ "version": ">=2.0.0",
9
17
  "nodes": {
18
+ "helpers": "src/utils/http-helpers.js",
10
19
  "webhook": "src/nodes/webhooks.js",
11
- "jambonz": "src/nodes/jambonz.js",
12
- "s3:upload": "src/nodes/s3-upload.js"
20
+ "s3:upload": "src/nodes/s3-upload.js",
21
+ "auth": "src/nodes/auth.js",
22
+ "enqueue": "src/nodes/enqueue.js",
23
+ "lex": "src/nodes/lex.js",
24
+ "say": "src/nodes/say.js",
25
+ "dtmf": "src/nodes/dtmf.js",
26
+ "config": "src/nodes/config.js",
27
+ "conference": "src/nodes/conference.js",
28
+ "gather": "src/nodes/gather.js",
29
+ "listen": "src/nodes/listen.js",
30
+ "sip:decline": "src/nodes/sip-decline.js",
31
+ "sip:request": "src/nodes/sip-request.js",
32
+ "sip:refer": "src/nodes/sip-refer.js",
33
+ "hangup": "src/nodes/hangup.js",
34
+ "message": "src/nodes/message.js",
35
+ "tag": "src/nodes/tag.js",
36
+ "pause": "src/nodes/pause.js",
37
+ "dequeue": "src/nodes/dequeue.js",
38
+ "play": "src/nodes/play.js",
39
+ "dial": "src/nodes/dial.js",
40
+ "redirect": "src/nodes/redirect.js",
41
+ "dialogflow": "src/nodes/dialogflow.js",
42
+ "leave": "src/nodes/leave.js",
43
+ "rasa": "src/nodes/rasa.js",
44
+ "userauth": "src/nodes/userauth.js",
45
+ "create call": "src/nodes/create_call.js",
46
+ "create sms": "src/nodes/create_sms.js",
47
+ "lcc": "src/nodes/lcc.js",
48
+ "get_alerts": "src/nodes/get_alerts.js",
49
+ "get_calls": "src/nodes/get_calls.js",
50
+ "get_recent_calls": "src/nodes/get_recent_calls.js"
13
51
  }
14
52
  },
15
53
  "author": "Dave Horton",
@@ -17,17 +55,17 @@
17
55
  "dependencies": {
18
56
  "aws-sdk": "^2.833.0",
19
57
  "bent": "^7.3.12",
20
- "body-parser": "1.18.3",
21
- "cookie-parser": "1.4.3",
22
- "cors": "2.8.4",
23
- "hash-sum": "1.0.2",
24
- "is-utf8": "0.2.1",
25
- "media-typer": "0.3.0",
26
- "multer": "1.3.1",
27
- "mustache": "^2.3.2",
28
- "on-headers": "1.0.1",
29
- "raw-body": "2.3.3",
58
+ "body-parser": "^1.20.1",
59
+ "cookie-parser": "^1.4.6",
60
+ "cors": "^2.8.5",
61
+ "hash-sum": "^2.0.0",
62
+ "is-utf8": "^0.2.1",
63
+ "media-typer": "^1.1.0",
64
+ "multer": "^1.4.4",
65
+ "mustache": "^4.2.0",
66
+ "on-headers": "^1.0.2",
67
+ "raw-body": "^2.5.1",
30
68
  "s3-upload-stream": "^1.0.7",
31
- "ws": "^7.4.2"
69
+ "ws": "^8.11.0"
32
70
  }
33
71
  }