major refactoring

This commit is contained in:
Dave Horton
2020-01-25 11:47:33 -05:00
parent 621ea8c0f5
commit 4a1ea4e091
25 changed files with 947 additions and 933 deletions

22
lib/session/call-info.js Normal file
View File

@@ -0,0 +1,22 @@
class CallInfo {
constructor(opts) {
this.callSid = opts.callSid;
this.parentCallSid = opts.parentCallSid;
this.direction = opts.direction;
this.from = opts.from;
this.to = opts.to;
this.callId = opts.callId;
this.sipStatus = opts.sipStatus;
this.callStatus = opts.callStatus;
this.callerId = opts.callerId;
this.accountSid = opts.accountSid;
this.applicationSid = opts.applicationSid;
}
updateCallStatus(callStatus, sipStatus) {
this.callStatus = callStatus;
if (sipStatus) this.sipStatus = sipStatus;
}
}
module.exports = CallInfo;