Skip to content

Commit

Permalink
Merge pull request #12 from jambonz/feat/reinv_cust_headers
Browse files Browse the repository at this point in the history
allow send customer headers in re-invite
  • Loading branch information
davehorton authored Mar 4, 2024
2 parents e723385 + 6045155 commit ee3265d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class SrsClient extends Emitter {
return true;
}

async pause() {
async pause(options) {
if (this.paused) return;
const opts = {
'call-id': this.rtpEngineOpts.common['call-id'],
Expand All @@ -315,7 +315,9 @@ class SrsClient extends Emitter {
'from-tag': fromTag
});
}
await this.uac.modify(this.sdpOffer);
await this.uac.modify(this.sdpOffer, {
headers: options?.headers || {}
});
this.paused = true;
return true;
} catch (err) {
Expand All @@ -324,7 +326,7 @@ class SrsClient extends Emitter {
return false;
}

async resume() {
async resume(options) {
if (!this.paused) return;
const opts = {
'call-id': this.rtpEngineOpts.common['call-id'],
Expand All @@ -340,7 +342,9 @@ class SrsClient extends Emitter {
'from-tag': fromTag
});
}
await this.uac.modify(this.sdpOffer);
await this.uac.modify(this.sdpOffer, {
headers: options?.headers || {}
});
this.paused = false;
return true;
} catch (err) {
Expand Down

0 comments on commit ee3265d

Please sign in to comment.