@routr/connect 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/router.js CHANGED
@@ -108,19 +108,23 @@ function router(location, apiClient) {
108
108
  switch (routingDirection) {
109
109
  case types_1.RoutingDirection.AGENT_TO_AGENT: {
110
110
  const route = yield agentToAgent(location, request);
111
- return Object.assign(Object.assign({}, route), { metadata: caller.extended });
111
+ return route
112
+ ? Object.assign(Object.assign({}, route), { metadata: caller.extended }) : null;
112
113
  }
113
114
  case types_1.RoutingDirection.AGENT_TO_PEER: {
114
115
  const route = yield agentToPeer(location, callee, request);
115
- return Object.assign(Object.assign({}, route), { metadata: caller.extended });
116
+ return route
117
+ ? Object.assign(Object.assign({}, route), { metadata: caller.extended }) : null;
116
118
  }
117
119
  case types_1.RoutingDirection.AGENT_TO_PSTN: {
118
120
  const route = yield agentToPSTN(request, caller, requestURI.user);
119
- return Object.assign(Object.assign({}, route), { metadata: caller.extended });
121
+ return route
122
+ ? Object.assign(Object.assign({}, route), { metadata: caller.extended }) : null;
120
123
  }
121
124
  case types_1.RoutingDirection.FROM_PSTN: {
122
125
  const route = yield fromPSTN(apiClient, location, callee, request);
123
- return Object.assign(Object.assign({}, route), { metadata: callee.extended });
126
+ return route
127
+ ? Object.assign(Object.assign({}, route), { metadata: callee.extended }) : null;
124
128
  }
125
129
  case types_1.RoutingDirection.PEER_TO_PSTN:
126
130
  return yield peerToPSTN(apiClient, request);
package/dist/tailor.js CHANGED
@@ -24,7 +24,6 @@ const function_1 = require("fp-ts/function");
24
24
  // Q: Should we add support for strict routing?
25
25
  const tailor = (route, req) => (0, function_1.pipe)(req, processor_1.Alterations.decreaseMaxForwards, processor_1.Alterations.removeAuthorization, processor_1.Alterations.removeSelfRoutes, processor_1.Alterations.removeXEdgePortRef,
26
26
  // NOTE: We should consider making the overwriteContactWithSenderInfo an Agent/Peer level alteration
27
- processor_1.Alterations.overwriteContactWithSenderInfo,
28
- // A.fixInvalidContact,
29
- processor_1.Alterations.fixRequestURI(route), processor_1.Alterations.addSelfVia(route), processor_1.Alterations.applyXHeaders(route), processor_1.Alterations.addSelfRecordRoute(route), processor_1.Alterations.addRouteToNextHop(route));
27
+ // A.overwriteContactWithSenderInfo,
28
+ processor_1.Alterations.fixInvalidContact, processor_1.Alterations.fixRequestURI(route), processor_1.Alterations.addSelfVia(route), processor_1.Alterations.applyXHeaders(route), processor_1.Alterations.addSelfRecordRoute(route), processor_1.Alterations.addRouteToNextHop(route));
30
29
  exports.tailor = tailor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/connect",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "Default processor",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -28,9 +28,9 @@
28
28
  "@opentelemetry/sdk-trace-base": "^1.0.4",
29
29
  "@opentelemetry/sdk-trace-node": "^1.0.4",
30
30
  "@opentelemetry/semantic-conventions": "^1.0.4",
31
- "@routr/common": "^2.2.0",
32
- "@routr/location": "^2.2.0",
33
- "@routr/processor": "^2.2.0",
31
+ "@routr/common": "^2.3.0",
32
+ "@routr/location": "^2.3.0",
33
+ "@routr/processor": "^2.3.0",
34
34
  "jsonwebtoken": "^9.0.0"
35
35
  },
36
36
  "devDependencies": {
@@ -49,5 +49,5 @@
49
49
  "bugs": {
50
50
  "url": "https://github.com/fonoster/routr/issues"
51
51
  },
52
- "gitHead": "e93238063bb807c4ea48e0d283845717a424541c"
52
+ "gitHead": "a07009852c37cf04303a5adef42bdac75a747a32"
53
53
  }