Skip to content

Commit

Permalink
Contact header to have private IP on Private cidr (#147)
Browse files Browse the repository at this point in the history
* Contact header to have private IP on Private cidr

fix for #146

* Update call-session.js

* Update call-session.js

* Update call-session.js
  • Loading branch information
vdharashive authored Jun 25, 2024
1 parent f9ae466 commit 0e2285c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ class CallSession extends Emitter {
response.sdp;

const responseHeaders = {};
if (isPrivateVoipNetwork(this.req.source_address)) {
Object.assign(responseHeaders, {'Contact':`<sip:${this.privateSipAddress}>`});
}
if (this.req.locals.carrier) {
Object.assign(headers, {
'X-Originating-Carrier': this.req.locals.carrier,
Expand Down

0 comments on commit 0e2285c

Please sign in to comment.