Skip to content

Instantly share code, notes, and snippets.

@davehorton
Last active August 12, 2024 13:12
Show Gist options
  • Save davehorton/b0c48873cd2fb13a55d8d6bfcbf38d1d to your computer and use it in GitHub Desktop.
Save davehorton/b0c48873cd2fb13a55d8d6bfcbf38d1d to your computer and use it in GitHub Desktop.
outbound Node-red callflow with teams integration
[
{
"id": "f317b3b0211b1ead",
"type": "group",
"z": "bbf6447fcb998d1d",
"name": "MS Teams Outbound",
"style": {
"label": true
},
"nodes": [
"65a7249b24dc2c96",
"038c49bfb4172761",
"464fc638bc9ecd58",
"03d395902f59b7b2"
],
"x": 34,
"y": 39,
"w": 812,
"h": 82
},
{
"id": "65a7249b24dc2c96",
"type": "dial",
"z": "bbf6447fcb998d1d",
"g": "f317b3b0211b1ead",
"name": "",
"targets": [
{
"type": "phone",
"varType": "msg",
"dest": "call.to",
"trunkType": "str",
"trunk": "yourtrunkname"
}
],
"headers": [],
"actionhook": "",
"actionhookType": "str",
"answeronbridge": true,
"anchormedia": true,
"callerid": "call.from",
"calleridType": "msg",
"callername": "call.caller_name",
"callernameType": "msg",
"confirmhook": "",
"confirmhookType": "str",
"dialmusic": "",
"dialmusicType": "str",
"dtmfcapture": "",
"dtmfcaptureType": "str",
"referhook": "",
"referhookType": "str",
"dtmfhook": "",
"dtmfhookType": "str",
"onholdhook": "",
"onholdhookType": "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": 590,
"y": 80,
"wires": [
[
"03d395902f59b7b2"
]
]
},
{
"id": "038c49bfb4172761",
"type": "function",
"z": "bbf6447fcb998d1d",
"g": "f317b3b0211b1ead",
"name": "Change call format",
"func": "// Remove only the outermost double quotes\nmsg.call.caller_name = msg.call.caller_name.replace(/^\"|\"$/g, '');\n\nmsg.call.from = msg.call.from.split(';')[0];\n/*msg.call.from = msg.call.from.replace('+','');\nmsg.call.to = msg.call.to.replace('+', '');\n*/\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 80,
"wires": [
[
"65a7249b24dc2c96"
]
]
},
{
"id": "464fc638bc9ecd58",
"type": "webhook in",
"z": "bbf6447fcb998d1d",
"g": "f317b3b0211b1ead",
"name": "",
"url": "/msteams/outbound",
"method": "post",
"x": 170,
"y": 80,
"wires": [
[
"038c49bfb4172761"
]
]
},
{
"id": "03d395902f59b7b2",
"type": "webhook out",
"z": "bbf6447fcb998d1d",
"g": "f317b3b0211b1ead",
"name": "",
"x": 750,
"y": 80,
"wires": []
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment