mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
bugfix: 302 response in rest outdial caused restart
This commit is contained in:
@@ -112,6 +112,9 @@ router.post('/', async(req, res) => {
|
|||||||
try {
|
try {
|
||||||
const dlg = await srf.createUAC(uri, {...opts, followRedirects: true, keepUriOnRedirect: true}, {
|
const dlg = await srf.createUAC(uri, {...opts, followRedirects: true, keepUriOnRedirect: true}, {
|
||||||
cbRequest: (err, inviteReq) => {
|
cbRequest: (err, inviteReq) => {
|
||||||
|
/* in case of 302 redirect, this gets called twice, ignore the second */
|
||||||
|
if (res.headersSent) return;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error(err, 'createCall Error creating call');
|
logger.error(err, 'createCall Error creating call');
|
||||||
res.status(500).send('Call Failure');
|
res.status(500).send('Call Failure');
|
||||||
|
|||||||
Reference in New Issue
Block a user