feat: Explicit answer/reject for inbound calls (#2504)
This commit is contained in:
committed by
dermotduffy
parent
b9f09b7c4e
commit
f397596ed1
@@ -3,6 +3,7 @@ import { mock } from 'vitest-mock-extended';
|
||||
import { INTERNAL_CALLBACK_ACTION } from '../../src/config/schema/actions/custom/internal.js';
|
||||
import { ActionConfig } from '../../src/config/schema/actions/types.js';
|
||||
import {
|
||||
createCallAnswerAction,
|
||||
createCallEndAction,
|
||||
createCallStartAction,
|
||||
createCameraAction,
|
||||
@@ -430,6 +431,23 @@ describe('createSubstreamOffAction', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('createCallAnswerAction', () => {
|
||||
it('should create call answer action', () => {
|
||||
expect(createCallAnswerAction()).toEqual({
|
||||
action: 'fire-dom-event',
|
||||
advanced_camera_card_action: 'call_answer',
|
||||
});
|
||||
});
|
||||
|
||||
it('should create call answer action with a cardID', () => {
|
||||
expect(createCallAnswerAction({ cardID: 'card_id' })).toEqual({
|
||||
action: 'fire-dom-event',
|
||||
advanced_camera_card_action: 'call_answer',
|
||||
card_id: 'card_id',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('createCallEndAction', () => {
|
||||
it('should create call end action', () => {
|
||||
expect(createCallEndAction()).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user