[
  {
    "id": "debed60bf171318a",
    "type": "subflow",
    "name": "ARI Caller",
    "info": "`EndPoint`  \r\nPhone/Extention that rings\r\n\r\n`Extention`  \r\nPhone/Extention that gets connected after answer  \r\nMost likely it will play a message ",
    "category": "",
    "in": [{ "x": 40, "y": 40, "wires": [{ "id": "0c497bbfbb3e3e0e" }] }],
    "out": [
      { "x": 520, "y": 40, "wires": [{ "id": "0f9bb285c2559f1c", "port": 0 }] }
    ],
    "env": [
      {
        "name": "",
        "type": "str",
        "value": "Spacer",
        "ui": { "type": "none" }
      },
      {
        "name": "",
        "type": "str",
        "value": "ServerSettings",
        "ui": {
          "icon": "font-awesome/fa-server",
          "label": { "en-US": "ARI Server" },
          "type": "none"
        }
      },
      {
        "name": "ariServer",
        "type": "str",
        "value": "192.168.2.20",
        "ui": {
          "label": { "en-US": "IP" },
          "type": "input",
          "opts": { "types": ["str"] }
        }
      },
      {
        "name": "ariPort",
        "type": "num",
        "value": "8088",
        "ui": {
          "label": { "en-US": "Port" },
          "type": "input",
          "opts": { "types": ["num"] }
        }
      },
      {
        "name": "",
        "type": "str",
        "value": "Spacer",
        "ui": { "type": "none" }
      },
      {
        "name": "",
        "type": "str",
        "value": "ServerCredentials",
        "ui": {
          "icon": "font-awesome/fa-user",
          "label": { "en-US": "ARI Credentials" },
          "type": "none"
        }
      },
      {
        "name": "ariUser",
        "type": "str",
        "value": "",
        "ui": {
          "label": { "en-US": "ARI User" },
          "type": "input",
          "opts": { "types": ["str"] }
        }
      },
      {
        "name": "ariPassword",
        "type": "cred",
        "ui": {
          "label": { "en-US": "ARI Password" },
          "type": "input",
          "opts": { "types": ["cred"] }
        }
      },
      {
        "name": "",
        "type": "str",
        "value": "Spacer",
        "ui": { "type": "none" }
      },
      {
        "name": "",
        "type": "str",
        "value": "CallSettings",
        "ui": {
          "icon": "font-awesome/fa-phone",
          "label": { "en-US": "Call Setting" },
          "type": "none"
        }
      },
      {
        "name": "endpoint",
        "type": "num",
        "value": "",
        "ui": {
          "label": { "en-US": "EndPoint" },
          "type": "input",
          "opts": { "types": ["num"] }
        }
      },
      {
        "name": "extention",
        "type": "num",
        "value": "",
        "ui": {
          "label": { "en-US": "Extention" },
          "type": "input",
          "opts": { "types": ["num"] }
        }
      },
      {
        "name": "CallerID",
        "type": "str",
        "value": "NodeRed <0>",
        "ui": { "label": { "en-US": "Caller ID" } }
      }
    ],
    "meta": { "author": "brammp <dev@bprieshof.nl>", "desc": "ARI Caller" },
    "color": "#3FADB5",
    "icon": "font-awesome/fa-phone"
  },
  {
    "id": "0f9bb285c2559f1c",
    "type": "http request",
    "z": "debed60bf171318a",
    "name": "Send ARI request",
    "method": "POST",
    "ret": "txt",
    "paytoqs": "ignore",
    "url": "",
    "tls": "",
    "persist": false,
    "proxy": "",
    "insecureHTTPParser": false,
    "authType": "basic",
    "senderr": false,
    "headers": [
      {
        "keyType": "other",
        "keyValue": "Content-Type",
        "valueType": "other",
        "valueValue": "application/x-www-form-urlencoded"
      }
    ],
    "x": 390,
    "y": 40,
    "wires": [[]]
  },
  {
    "id": "0c497bbfbb3e3e0e",
    "type": "function",
    "z": "debed60bf171318a",
    "name": "Prepair ARI request",
    "func": "var call={\n    url: env.get(\"ariServer\") + \":\" + env.get(\"ariPort\") + \"/ari/channels\",\n    payload:{ \n        'endpoint': 'PJSIP/' + env.get(\"endpoint\"),\n        'extension': env.get(\"extention\"),\n        'context': 'from-internal',\n        'callerId': env.get(\"CallerID\")\n    }\n\n};\nreturn call;\n\n\n\n\n",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 170,
    "y": 40,
    "wires": [["0f9bb285c2559f1c"]]
  },
  {
    "id": "603f44a955e26689",
    "type": "subflow:debed60bf171318a",
    "z": "5b5de3f9b5eae1d7",
    "name": "",
    "x": 80,
    "y": 60,
    "wires": [[]]
  }
]
