add custom nye headers to completed hook (#1552)

This commit is contained in:
Sam Machin
2026-05-21 10:02:28 -04:00
committed by GitHub
parent c1a7f1146a
commit d84690dfb1
6 changed files with 60 additions and 16 deletions
+12
View File
@@ -124,6 +124,14 @@ class CallInfo {
return this._customerData;
}
set sipHeaders(obj) {
this._sipHeaders = obj;
}
get sipHeaders() {
return this._sipHeaders;
}
toJSON() {
const obj = {
callSid: this.callSid,
@@ -150,6 +158,10 @@ class CallInfo {
Object.assign(obj, {customerData: this._customerData});
}
if (this._sipHeaders) {
Object.assign(obj, {headers: this._sipHeaders});
}
if (JAMBONES_API_BASE_URL) {
Object.assign(obj, {apiBaseUrl: JAMBONES_API_BASE_URL});
}