mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-07-04 19:32:04 +00:00
LICENSE
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 jambonz
|
||||
Copyright (c) 2021 Drachtio Communications Services, LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
"DTLS": "off",
|
||||
"SDES": "off",
|
||||
"ICE": "remove",
|
||||
"flags": ["media handover"],
|
||||
"rtcp-mux": ["demux"]
|
||||
}
|
||||
+14
-10
@@ -333,22 +333,25 @@ class CallSession extends Emitter {
|
||||
if (req.has('X-Retain-Call-Sid')) {
|
||||
Object.assign(headers, {'X-Retain-Call-Sid': req.get('X-Retain-Call-Sid')});
|
||||
}
|
||||
const dlg = await this.srf.createUAC(referTo.uri, {localSdp: dlg.local.sdp, headers});
|
||||
this.uas.destroy();
|
||||
|
||||
this.uas = dlg;
|
||||
this.uas.other = this.uac;
|
||||
this.uac.other = this.uas;
|
||||
this.uas.on('modify', this._onReinvite.bind(this, this.uas));
|
||||
this.uas.on('refer', this._onFeatureServerTransfer.bind(this, this.uas));
|
||||
this.uas.on('destroy', () => {
|
||||
const uas = await this.srf.createUAC(referTo.uri, {localSdp: dlg.local.sdp, headers});
|
||||
this.uas = uas;
|
||||
uas.other = this.uac;
|
||||
this.uac.other = uas;
|
||||
uas.on('modify', this._onReinvite.bind(this, uas));
|
||||
uas.on('refer', this._onFeatureServerTransfer.bind(this, uas));
|
||||
uas.on('destroy', () => {
|
||||
this.logger.info('call ended with normal termination');
|
||||
this.rtpEngineResource.destroy();
|
||||
this.activeCallIds.delete(this.req.get('Call-ID'));
|
||||
this.uas.other.destroy();
|
||||
uas.other.destroy();
|
||||
});
|
||||
|
||||
// now we can destroy the old dialog
|
||||
dlg.destroy();
|
||||
|
||||
// modify rtpengine to stream to new feature server
|
||||
// NB: the media handover flag should suffice to tell rtpengine to relearn addresses
|
||||
/*
|
||||
let response = await this.offer(Object.assign(this.rtpEngineOpts.offer, {sdp: this.uas.remote.sdp}));
|
||||
if ('ok' !== response.result) {
|
||||
throw new Error(`_onReinvite: rtpengine failed: offer: ${JSON.stringify(response)}`);
|
||||
@@ -360,6 +363,7 @@ class CallSession extends Emitter {
|
||||
if ('ok' !== response.result) {
|
||||
throw new Error(`_onReinvite: rtpengine failed: ${JSON.stringify(response)}`);
|
||||
}
|
||||
*/
|
||||
this.logger.info('successfully moved call to new feature server');
|
||||
} catch (err) {
|
||||
this.logger.error(err, 'Error handling refer from feature server');
|
||||
|
||||
Reference in New Issue
Block a user