mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
more rest-dial testing
This commit is contained in:
@@ -27,8 +27,8 @@ class CallInfo {
|
||||
this.accountSid = parentCallInfo.accountSid;
|
||||
this.applicationSid = parentCallInfo.applicationSid;
|
||||
this.from = req.callingNumber;
|
||||
this.to = to || req.calledNumber;
|
||||
this.callerName = this.from.name || req.callingNumber;
|
||||
this.to = to;
|
||||
this.callerId = this.from.name || req.callingNumber;
|
||||
this.callId = req.get('Call-ID');
|
||||
this.callStatus = CallStatus.Trying,
|
||||
this.sipStatus = 100;
|
||||
@@ -70,7 +70,7 @@ class CallInfo {
|
||||
callId: this.callId,
|
||||
sipStatus: this.sipStatus,
|
||||
callStatus: this.callStatus,
|
||||
callerId: this.callId,
|
||||
callerId: this.callerId,
|
||||
accountSid: this.accountSid,
|
||||
applicationSid: this.applicationSid
|
||||
};
|
||||
|
||||
@@ -223,7 +223,7 @@ class CallSession extends Emitter {
|
||||
this.callInfo.updateCallStatus(callStatus, sipStatus);
|
||||
if (typeof duration === 'number') this.callInfo.duration = duration;
|
||||
try {
|
||||
this.notifyHook(call_status_hook);
|
||||
if (call_status_hook) this.notifyHook(call_status_hook);
|
||||
} catch (err) {
|
||||
this.logger.info(err, `CallSession:_notifyCallStatusChange error sending ${callStatus} ${sipStatus}`);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ class RestCallSession extends CallSession {
|
||||
});
|
||||
this.req = req;
|
||||
this.ep = ep;
|
||||
|
||||
this.on('callStatusChange', this._notifyCallStatusChange.bind(this));
|
||||
this._notifyCallStatusChange({callStatus: CallStatus.Trying, sipStatus: 100});
|
||||
}
|
||||
|
||||
setDialog(dlg) {
|
||||
|
||||
Reference in New Issue
Block a user