mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-10-09 21:14:05 +00:00
fix: use sips scheme in From/Contact when forwarding to a sips Request-URI
RFC 3261 8.1.1.8 requires a SIPS Contact when the Request-URI is SIPS. The forward path (dial verb to a sip target) always defaulted to sip:. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c596efc8db
commit
0738c58f76
@@ -505,17 +505,21 @@ class CallSession extends Emitter {
|
||||
}
|
||||
else {
|
||||
const uri = parseUri(this.req.uri);
|
||||
/* RFC 3261 8.1.1.8: a sips Request-URI requires a sips Contact */
|
||||
const scheme = uri.scheme === 'sips' ? 'sips' : 'sip';
|
||||
hdrs = {
|
||||
...hdrs,
|
||||
'From': createBLegFromHeader({
|
||||
logger: this.logger,
|
||||
req: this.req,
|
||||
scheme,
|
||||
transport: uri.params.transport,
|
||||
...(private_network && {host: this.privateSipAddress})
|
||||
}),
|
||||
'Contact': createBLegFromHeader({
|
||||
logger: this.logger,
|
||||
req: this.req,
|
||||
scheme,
|
||||
transport: uri.params.transport,
|
||||
...(private_network && {host: this.privateSipAddress})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user