Fix/dial refer (#1264)

* Revert "Update dial.js (#1243)"

This reverts commit 259dedcded.

* add to .gitignore

* when we receive a REFER on the parent leg, after adulting the child the dial task in the parent session should end
This commit is contained in:
Dave Horton
2025-06-28 15:01:09 -04:00
committed by GitHub
parent ab83b21979
commit 7691af30de
7 changed files with 234 additions and 2 deletions

View File

@@ -99,6 +99,24 @@ app.post('/actionHook', (req, res) => {
return res.sendStatus(200);
});
/*
* referHook
*/
app.post('/referHook', (req, res) => {
console.log({payload: req.body}, 'POST /referHook');
let key = req.body.from + "_referHook"
addRequestToMap(key, req, hook_mapping);
return res.json([{"verb": "pause", "length": 2}]);
});
/*
* adultingHook
*/
app.post('/adulting', (req, res) => {
console.log({payload: req.body}, 'POST /adulting');
return res.sendStatus(200);
});
/*
* customHook
* For the hook to return