Compare commits

..
Author SHA1 Message Date
Vinod Dharashive 0e2285c4b8 Contact header to have private IP on Private cidr (#147)
* Contact header to have private IP on Private cidr

fix for #146

* Update call-session.js

* Update call-session.js

* Update call-session.js
2024-06-25 14:34:07 -04:00
+3
View File
@@ -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,