Skip to content

Commit

Permalink
fix scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Frindt committed Jul 23, 2024
1 parent b21eaad commit 864151a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {SipError, stringifyUri, parseUri} = require('drachtio-srf');
const debug = require('debug')('jambonz:sbc-outbound');

const makeInviteInProgressKey = (callid) => `sbc-out-iip${callid}`;
const IMMUTABLE_HEADERS = ['via', 'from', 'to', 'call-id', 'cseq', 'max-forwards', 'content-length'];
const IMMUTABLE_HEADERS = ['via', 'from', 'to', 'call-id', 'cseq', 'max-forwards', 'content-length', 'contact'];
/**
* this is to make sure the outgoing From has the number in the incoming From
* and not the incoming PAI
Expand All @@ -16,6 +16,7 @@ const createBLegFromHeader = (req, teams, register_from_domain = null) => {
const from = req.getParsedHeader('From');
const uri = parseUri(from.uri);
let user = uri.user || 'anonymous';
this.scheme = uri.scheme;
let host = 'localhost';
if (teams) {
host = req.get('X-MS-Teams-Tenant-FQDN');
Expand Down Expand Up @@ -1057,8 +1058,6 @@ Duration=${payload.duration} `
if (farEnd.params?.transport) {
this.transport = `transport=${farEnd.params.transport}`;
}
/* TODO: we receive a lowercase 'contact' from feature-server */
delete customHeaders['contact'];

this.referContactHeader = `<${this.scheme}:${uri.user}@${uri.host}:${uri.port}>;${this.transport}`;
const response = await this.uac.request({
Expand Down

0 comments on commit 864151a

Please sign in to comment.