mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
feat siprec custom header (#400)
* feat siprec custom header * wip * update verb specification * add newline to info siprec body * add newline to info siprec body
This commit is contained in:
@@ -423,7 +423,10 @@ class CallSession extends Emitter {
|
||||
'X-Call-Sid': this.callSid,
|
||||
'X-Account-Sid': this.accountSid,
|
||||
'X-Application-Sid': this.applicationSid,
|
||||
}
|
||||
...(this.recordOptions.headers && {'Content-Type': 'application/json'})
|
||||
},
|
||||
// Siprect Client is initiated from startCallRecording, so just need to pass custom headers in startRecording
|
||||
...(this.recordOptions.headers && {body: JSON.stringify(this.recordOptions.headers) + '\n'})
|
||||
});
|
||||
if (res.status === 200) {
|
||||
this._recordState = RecordState.RecordingOn;
|
||||
@@ -444,7 +447,7 @@ class CallSession extends Emitter {
|
||||
const res = await this.dlg.request({
|
||||
method: 'INFO',
|
||||
headers: {
|
||||
'X-Reason': 'stopCallRecording',
|
||||
'X-Reason': 'stopCallRecording'
|
||||
}
|
||||
});
|
||||
if (res.status === 200) {
|
||||
@@ -466,7 +469,7 @@ class CallSession extends Emitter {
|
||||
const res = await this.dlg.request({
|
||||
method: 'INFO',
|
||||
headers: {
|
||||
'X-Reason': 'pauseCallRecording',
|
||||
'X-Reason': 'pauseCallRecording'
|
||||
}
|
||||
});
|
||||
if (res.status === 200) {
|
||||
@@ -488,7 +491,7 @@ class CallSession extends Emitter {
|
||||
const res = await this.dlg.request({
|
||||
method: 'INFO',
|
||||
headers: {
|
||||
'X-Reason': 'resumeCallRecording',
|
||||
'X-Reason': 'resumeCallRecording'
|
||||
}
|
||||
});
|
||||
if (res.status === 200) {
|
||||
|
||||
Reference in New Issue
Block a user