mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2026-10-04 02:04:20 +00:00
fix: update register status with sid
This commit is contained in:
@@ -93,20 +93,20 @@ class Regbot {
|
|||||||
debug(`setting timer for next register to ${expires} seconds`);
|
debug(`setting timer for next register to ${expires} seconds`);
|
||||||
this.timer = setTimeout(this.register.bind(this, srf), (expires - 5) * 1000);
|
this.timer = setTimeout(this.register.bind(this, srf), (expires - 5) * 1000);
|
||||||
}
|
}
|
||||||
updateVoipCarriersRegisterStatus(this.voip_carrier_sid, {
|
updateVoipCarriersRegisterStatus(this.voip_carrier_sid, JSON.stringify({
|
||||||
status: res.status === 200 ? 'ok' : 'fail',
|
status: res.status === 200 ? 'ok' : 'fail',
|
||||||
reason: `${res.status} ${res.reason}`,
|
reason: `${res.status} ${res.reason}`,
|
||||||
cseq: req.get('Cseq'),
|
cseq: req.get('Cseq'),
|
||||||
callId: req.get('Call-Id')
|
callId: req.get('Call-Id')
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.logger.error({ err }, `Regbot Error registering to ${this.ipv4}:${this.port}`);
|
this.logger.error({ err }, `Regbot Error registering to ${this.ipv4}:${this.port}`);
|
||||||
this.timer = setTimeout(this.register.bind(this, srf), 60 * 1000);
|
this.timer = setTimeout(this.register.bind(this, srf), 60 * 1000);
|
||||||
updateVoipCarriersRegisterStatus(this.voip_carrier_sid, {
|
updateVoipCarriersRegisterStatus(this.voip_carrier_sid, JSON.stringify({
|
||||||
status: 'fail',
|
status: 'fail',
|
||||||
reason: err
|
reason: err
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user