mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-10-04 02:04:22 +00:00
pass on displayName of From header if we get it (#82)
* pass on displayName of From header if we get it * bump version
This commit is contained in:
+4
-2
@@ -22,8 +22,10 @@ const MS_TEAMS_SIP_ENDPOINT = 'sip.pstnhub.microsoft.com';
|
|||||||
const createBLegFromHeader = (req) => {
|
const createBLegFromHeader = (req) => {
|
||||||
const from = req.getParsedHeader('From');
|
const from = req.getParsedHeader('From');
|
||||||
const uri = parseUri(from.uri);
|
const uri = parseUri(from.uri);
|
||||||
if (uri && uri.user) return `<sip:${uri.user}@localhost>`;
|
const name = from.name;
|
||||||
return '<sip:anonymous@localhost>';
|
const displayName = name ? `${name} ` : '';
|
||||||
|
if (uri && uri.user) return `${displayName}<sip:${uri.user}@localhost>`;
|
||||||
|
else return `${displayName}<sip:anonymous@localhost>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const createSiprecBody = (headers, sdp, type, content) => {
|
const createSiprecBody = (headers, sdp, type, content) => {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "sbc-inbound",
|
"name": "sbc-inbound",
|
||||||
"version": "v0.8.0",
|
"version": "v0.8.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sbc-inbound",
|
"name": "sbc-inbound",
|
||||||
"version": "v0.8.0",
|
"version": "v0.8.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jambonz/db-helpers": "^0.7.4",
|
"@jambonz/db-helpers": "^0.7.4",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sbc-inbound",
|
"name": "sbc-inbound",
|
||||||
"version": "v0.8.0",
|
"version": "v0.8.1",
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 12.0.0"
|
"node": ">= 12.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user