feat: add rest:dial metadata

This commit is contained in:
Quan HL
2023-05-07 06:39:35 +07:00
parent 436c8e1861
commit 98043693be
2 changed files with 21 additions and 1 deletions

View File

@@ -394,7 +394,8 @@
"tag": "object",
"to": "#target",
"headers": "object",
"timeout": "number"
"timeout": "number",
"metadata": "object"
},
"required": [
"call_hook",

View File

@@ -258,6 +258,25 @@ test("validate correct verbs", async (t) => {
"language" : "en-US",
"interim": true
}
},
{
"verb": "rest:dial",
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",
},
metadata: {
customer: "acme",
referenceId: "deadbeef",
}
}
];
try {