mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
Support for Cisco NBR for Agentassist (#303)
* NBR Support * NBR Support * NBR Support * re-invite Ok sdp should be sendonly * NBR Support * sendrecv sdp correction * Update siprec-utils.js * Updated comments * Siprec participants details added to hook * Bugfix siprec * Update call-info.js
This commit is contained in:
@@ -46,7 +46,16 @@ module.exports = function(srf, logger) {
|
||||
}
|
||||
if (req.has('X-Authenticated-User')) req.locals.originatingUser = req.get('X-Authenticated-User');
|
||||
if (req.has('X-MS-Teams-Tenant-FQDN')) req.locals.msTeamsTenant = req.get('X-MS-Teams-Tenant-FQDN');
|
||||
|
||||
if (req.has('X-Cisco-Recording-Participant')) {
|
||||
const ciscoParticipants = req.get('X-Cisco-Recording-Participant');
|
||||
const regex = /sip:[\d]+@[\d]+\.[\d]+\.[\d]+\.[\d]+/g;
|
||||
const sipURIs = ciscoParticipants.match(regex);
|
||||
logger.info(`X-Cisco-Recording-Participant : ${sipURIs} `);
|
||||
if (sipURIs && sipURIs.length > 0) {
|
||||
req.locals.calledNumber = sipURIs[0];
|
||||
req.locals.callingNumber = sipURIs[1];
|
||||
}
|
||||
}
|
||||
next();
|
||||
}
|
||||
|
||||
@@ -94,8 +103,10 @@ module.exports = function(srf, logger) {
|
||||
.find((p) => p.type === 'application/sdp')
|
||||
.content;
|
||||
const {sdp1, sdp2, ...metadata} = await parseSiprecPayload(req, logger);
|
||||
req.locals.calledNumber = metadata.caller.number;
|
||||
req.locals.callingNumber = metadata.callee.number;
|
||||
if (!req.locals.calledNumber && !req.locals.calledNumber) {
|
||||
req.locals.calledNumber = metadata.caller.number;
|
||||
req.locals.callingNumber = metadata.callee.number;
|
||||
}
|
||||
req.locals = {
|
||||
...req.locals,
|
||||
siprec: {
|
||||
|
||||
Reference in New Issue
Block a user