From 045df8a9fe385d3f4556f4898a74340b1f552e3a Mon Sep 17 00:00:00 2001 From: Quan HL Date: Sun, 7 May 2023 19:40:28 +0700 Subject: [PATCH] rest:dial amd --- specs.json | 3 ++- test/jambonz-verb-test.js | 30 +++++++++++++++++------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/specs.json b/specs.json index a9d45cc..f45ff52 100644 --- a/specs.json +++ b/specs.json @@ -394,7 +394,8 @@ "tag": "object", "to": "#target", "headers": "object", - "timeout": "number" + "timeout": "number", + "amd": "#amd" }, "required": [ "call_hook", diff --git a/test/jambonz-verb-test.js b/test/jambonz-verb-test.js index e5388b7..db81f3b 100644 --- a/test/jambonz-verb-test.js +++ b/test/jambonz-verb-test.js @@ -261,21 +261,25 @@ test("validate correct verbs", async (t) => { }, { "verb": "rest:dial", - account_sid: "1291964182631236912836123912", - call_hook: { - url: "http://127.0.0.1:3100/", - method: "POST", - username: "username", - password: "password", + "account_sid": "1291964182631236912836123912", + "call_hook": { + "url": "http://127.0.0.1:3100/", + "method": "POST", + "username": "username", + "password": "password", }, - from: "15583084810", - to: { - type: "phone", - number: "15583084809", + "from": "15583084810", + "to": { + "type": "phone", + "number": "15583084809", }, - tag: { - customer: "acme", - referenceId: "deadbeef", + "tag": { + "customer": "acme", + "referenceId": "deadbeef", + }, + "amd": { + "actionHook": "/answeringMachineDetection", + } } ];