support srtp for sips sipuri outbound call (#224)

* support srtp for sips sipuri outbound call

* wip

* wip

* add env variable for disable the srtp for sipURI
This commit is contained in:
Hoan Luu Huu
2026-04-22 19:00:50 +07:00
committed by GitHub
parent 8ccd02aa1f
commit 4f65b4b585
+5
View File
@@ -237,6 +237,11 @@ class CallSession extends Emitter {
this.logger.info(`sending call to registered user ${destUri}`);
}
else if (this.req.locals.target === 'forward') {
if (process.env.JAMBONES_SIPS_FORWARD_SRTP && this.req.uri.startsWith('sips:')) {
this.logger.info({uri: this.req.uri}, 'using SRTP/TLS for forwarded sips: call');
this.rtpEngineOpts = makeRtpEngineOpts(this.req, false, true, false, false);
encryptedMedia = true;
}
uris = [{
private_network: await isPrivateVoipNetwork(this.req.uri),
uri: this.req.uri