Fix/transport in contact (#190)

* use the req transport param in the From and Contact headers if set.

* Update call-session.js
This commit is contained in:
Sam Machin
2025-09-03 18:53:51 +01:00
committed by GitHub
parent 616228bf09
commit c87f831868

View File

@@ -497,16 +497,19 @@ class CallSession extends Emitter {
};
}
else {
const uri = parseUri(this.req.uri);
hdrs = {
...hdrs,
'From': createBLegFromHeader({
logger: this.logger,
req: this.req,
transport: uri.params.transport,
...(private_network && {host: this.privateSipAddress})
}),
'Contact': createBLegFromHeader({
logger: this.logger,
req: this.req,
transport: uri.params.transport,
...(private_network && {host: this.privateSipAddress})
})
};