add support for overrideTo and 302 redirect on rest outdial

This commit is contained in:
Dave Horton
2021-09-24 09:58:39 -04:00
parent aebcf2b006
commit 7cf342eeb8
2 changed files with 12 additions and 1 deletions

View File

@@ -85,6 +85,12 @@ class SingleDialer extends Emitter {
uri = `sip:${this.target.name}`;
to = this.target.name;
if (this.target.overrideTo) {
Object.assign(opts.headers, {
'X-Override-To': this.target.overrideTo
});
}
// need to send to the SBC registered on
const reg = await registrar.query(aor);
if (reg) {