mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-04 19:21:53 +00:00
Feature/siprec client (#45)
* updateCall now supports record action to start, stop, pause, or resume siprec * update Dockerfile
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
FROM node:17
|
||||
FROM node:lts-slim
|
||||
WORKDIR /opt/app/
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
@@ -7,4 +7,4 @@ COPY . /opt/app
|
||||
ARG NODE_ENV
|
||||
ENV NODE_ENV $NODE_ENV
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
CMD [ "npm", "start" ]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:17
|
||||
FROM node:lts-slim
|
||||
WORKDIR /opt/app/
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
|
||||
@@ -117,7 +117,8 @@ function validateUpdateCall(opts) {
|
||||
'conf_hold_status',
|
||||
'conf_mute_status',
|
||||
'mute_status',
|
||||
'sip_request'
|
||||
'sip_request',
|
||||
'record'
|
||||
]
|
||||
.reduce((acc, prop) => (opts[prop] ? ++acc : acc), 0);
|
||||
|
||||
@@ -156,6 +157,12 @@ function validateUpdateCall(opts) {
|
||||
(!opts.sip_request.method && !opts.sip_request.content_type || !opts.sip_request.content_type)) {
|
||||
throw new DbErrorBadRequest('sip_request requires content_type and content properties');
|
||||
}
|
||||
if (opts.record && !opts.record.action) {
|
||||
throw new DbErrorBadRequest('record requires action property');
|
||||
}
|
||||
if ('startCallRecording' === opts.record?.action && !opts.record.siprecServerURL) {
|
||||
throw new DbErrorBadRequest('record requires siprecServerURL property when starting recording');
|
||||
}
|
||||
}
|
||||
|
||||
function validateTo(to) {
|
||||
|
||||
@@ -3135,6 +3135,20 @@ paths:
|
||||
type: string
|
||||
headers:
|
||||
type: object
|
||||
record:
|
||||
type: object
|
||||
properties:
|
||||
action:
|
||||
type: string
|
||||
enum:
|
||||
- startCallRecording
|
||||
- stopCallRecording
|
||||
- pauseCallRecording
|
||||
- resumeCallRecording
|
||||
recordingID:
|
||||
type: string
|
||||
siprecServerURL:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: Accepted
|
||||
|
||||
Reference in New Issue
Block a user