Feature/siprec server (#42)

* changes to handle siprec invites

* retain xml for sending

* send multipart body for siprec

* fixup sdp

* possibly trim xml string

* fix prev commit

* fix prev commit

* still tweaking sdp

* tweaks

* tweaking

* bit of refactoring

* refactor siprec client stuff into a library

* add direction in siprec metadata

* fix
This commit is contained in:
Dave Horton
2022-08-05 10:27:50 +01:00
committed by GitHub
parent 4e5f7ae908
commit 4e961491a6
6 changed files with 101 additions and 298 deletions

9
app.js
View File

@@ -111,6 +111,7 @@ const activeCallIds = srf.locals.activeCallIds;
const {
initLocals,
handleSipRec,
identifyAccount,
checkLimits,
challengeDeviceCalls
@@ -161,7 +162,13 @@ if (process.env.NODE_ENV === 'test') {
}
/* install middleware */
srf.use('invite', [initLocals, identifyAccount, checkLimits, challengeDeviceCalls]);
srf.use('invite', [
initLocals,
handleSipRec,
identifyAccount,
checkLimits,
challengeDeviceCalls
]);
srf.invite((req, res) => {
if (req.has('Replaces')) {