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