From f8873bbeb6e22cf5b6ed1bf2cd6b8eaaa94d0d1b Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Tue, 26 Dec 2023 15:30:58 -0500 Subject: [PATCH 01/18] chore: display warning for unavailable Egress Rules during Domain creation --- mods/ctl/src/commands/domains/create.ts | 4 ++++ mods/ctl/src/commands/domains/update.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mods/ctl/src/commands/domains/create.ts b/mods/ctl/src/commands/domains/create.ts index 3a1fea510..3f35e5dc1 100644 --- a/mods/ctl/src/commands/domains/create.ts +++ b/mods/ctl/src/commands/domains/create.ts @@ -76,6 +76,10 @@ Creating Domain Local Domain... b148b4b4-6884-4c06-bb7e-bd098f5fe793 this.log("This utility will help you create a new Domain.") this.log("Press ^C at any time to quit.") + if (numberChoices.length === 0) { + this.warn("Egress rules unavailable due to 0 configured numbers.") + } + const group1 = await inquirer.prompt([ { name: "name", diff --git a/mods/ctl/src/commands/domains/update.ts b/mods/ctl/src/commands/domains/update.ts index 12e37f223..98f78bd55 100644 --- a/mods/ctl/src/commands/domains/update.ts +++ b/mods/ctl/src/commands/domains/update.ts @@ -87,6 +87,10 @@ Updating Domain Local... 80181ca6-d4aa-4575-9375-8f72b07d5555 this.log("Press ^C at any time to quit.") this.warn("Adding Egress Policies will delete existing ones.") + if (numberChoices.length === 0) { + this.warn("Egress rules unavailable due to 0 configured numbers.") + } + const group1 = await inquirer.prompt([ { name: "name", From db2b08dd0352b10716daa8ab54a301e86f93dbb6 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Wed, 27 Dec 2023 11:08:42 -0500 Subject: [PATCH 02/18] chore: enhance NATS documentation and change all NATS occurrences to uppercase --- .../connect/sending-call-events-to-nats.md | 70 ++++++++++++++++--- .../metrics-events-logs-and-traces.md | 2 +- .../main/java/io/routr/GRPCSipListener.java | 10 ++- ...{NatsPublisher.java => NATSPublisher.java} | 6 +- 4 files changed, 67 insertions(+), 21 deletions(-) rename mods/edgeport/src/main/java/io/routr/events/{NatsPublisher.java => NATSPublisher.java} (90%) diff --git a/docs/docs/connect/sending-call-events-to-nats.md b/docs/docs/connect/sending-call-events-to-nats.md index 4e33acdd6..36859c0c7 100644 --- a/docs/docs/connect/sending-call-events-to-nats.md +++ b/docs/docs/connect/sending-call-events-to-nats.md @@ -1,6 +1,6 @@ -# Sending Call Events to NATs +# Sending Call Events to NATS -Routr ships with a NATs publisher that can be used to send call events to a NATs server. Call events are a function of the EdgePort. To enable the NATs publisher, you will need to update your EdgePort service to set the environment variable `NATS_PUBLISHER_ENABLED` to `true` as well as the environment variable `NATS_PUBLISHER_URL` to the URL of your NATs server. For example: +Routr ships with a NATS publisher that can be used to send call events to a NATS server. Call events are a function of the EdgePort. To enable the NATS publisher, you will need to update your EdgePort service to set the environment variable `NATS_PUBLISHER_ENABLED` to `true` as well as the environment variable `NATS_PUBLISHER_URL` to the URL of your NATS server. For example: ```yaml version: "3" @@ -15,10 +15,10 @@ services: - NATS_PUBLISHER_URL=nats:4222 ``` -Once you have enabled the NATs publisher, you can subscribe to the routr.call.started or routr.call.ended subjects to receive call events. +Once you have enabled the NATS publisher, you can subscribe to the routr.call.started or routr.call.ended subjects to receive call events. As of the writing of this book, only the routr.call.started and routr.call.ended subjects are supported. However, we plan to add more subjects in the future. Be sure to check in later to see if any more have been added. -To begin receiving call events, you can use the nats sub command line tool. To do this, first connect to your NATs server by running the following command: +To begin receiving call events, you can use the nats sub command line tool. To do this, first connect to your NATS server by running the following command: ```bash nats context add nats \ @@ -29,22 +29,70 @@ nats context add nats \ You should then see something like this: -![NATs context add](/img/nats-context-add-nats.png) +![NATS context add](/img/nats-context-add-nats.png) -In the previous command, we connected to the demo.nats.io server, which is a public NATs server. You can use your own NATs server if you have one. +In the previous command, we connected to the `demo.nats.io` server, which is a public NATS server. You can use your own NATS server if you have one. -Then, you can subscribe to the routr.call.started subject by running the following command: +Then, you can subscribe to the `routr.call.started` subject by running the following command: ```bash nats sub routr.call.started ``` +The `routr.call.started` event contains the following fields: + +- `callId`: The unique identifier of the call +- `from`: The caller's phone number +- `to`: The callee's phone number +- `startTime`: The time the call started formatted as an ISO 8601 string +- `extraHeaders`: Any extra headers that were sent with the call + +Every header startarting with `X-` is considered an extra header. For example, if you send a call with the following headers: + +```bash +X-My-Header: my-value +X-Another-Header: another-value +``` + +Then, the `extraHeaders` field will contain the following: + +```json +{ + "X-My-Header": "my-value", + "X-Another-Header": "another-value" +} +``` + After subscribing to the subject and making a call, you should see something like this: -![NATs call started](/img/nats-sub-routr-call-started.png) +![NATS call started](/img/nats-sub-routr-call-started.png) + +Similarly, you can subscribe to the routr.call.ended subject to receive call-ended events. + +```bash +nats sub routr.call.ended +``` + +The `routr.call.ended` event contains the following fields: + +- `callId`: The unique identifier of the call +- `endTime`: The time the call ended formatted as an ISO 8601 string +- `hangupCause`: The reason the call ended +- `extraHeaders`: Any extra headers that were sent with the call + +> Please see the [HangupCause.java](https://github.com/fonoster/routr/blob/main/mods/edgeport/src/main/java/io/routr/HangupCauses.java) class for a list of possible hangup causes. + +Lastly, you can subscribe to the `routr.endpoint.registered` subject to receive endpoint registered events. + +```bash +nats sub routr.endpoint.registered +``` -Similarly, you can subscribe to the routr.call.ended subject to receive call-ended events. This should produce an output like shown in the image below: +The `routr.endpoint.registered` event contains the following fields: -![NATs call ended](/img/nats-sub-routr-call-ended.png) +- `aor`: The address of record of the endpoint +- `registeredAt`: The time the endpoint registered formatted as an ISO 8601 string +- `expires`: The time in seconds the endpoint will remain registered +- `extraHeaders`: Any extra headers that were sent with the call -You can use the `NATS_PUBLISHER_SUBJECT` environment variable to change the based subject name. For example, you can set it to `myserver` to receive call events in the `myserver.calls.started` subject. \ No newline at end of file +You can use the `NATS_PUBLISHER_SUBJECT` environment variable to change the based subject name. For example, you can set it to `myserver` to receive call events in the `myserver.calls.started` subject. diff --git a/docs/docs/development/metrics-events-logs-and-traces.md b/docs/docs/development/metrics-events-logs-and-traces.md index 27b59abbc..cc027b797 100644 --- a/docs/docs/development/metrics-events-logs-and-traces.md +++ b/docs/docs/development/metrics-events-logs-and-traces.md @@ -3,5 +3,5 @@ Comin soon. \ No newline at end of file diff --git a/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java b/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java index 9e22c3f2c..6146a1d0b 100644 --- a/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java +++ b/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java @@ -169,7 +169,7 @@ public GRPCSipListener(final SipProvider sipProvider, final Map subject = "routr"; } - publishers.add(new NatsPublisher(natsUrl, subject)); + publishers.add(new NATSPublisher(natsUrl, subject)); LOG.info("nats publisher enabled with subject {} and url {}", subject, natsUrl); } @@ -310,7 +310,7 @@ public void processRequest(final RequestEvent event) { if (req.getMethod().equals(Request.CANCEL)) { assert serverTransaction != null; - this.sendCancel(serverTransaction, req, headers); + this.sendCancel(serverTransaction, req); return; } this.sendRequest(serverTransaction, req, headers); @@ -473,8 +473,7 @@ private void sendRequest(final ServerTransaction serverTransaction, final Reques } } - private void sendCancel(final ServerTransaction serverTransaction, final Request request, - final List
headers) { + private void sendCancel(final ServerTransaction serverTransaction, final Request request) { try { var callId = (CallIdHeader) request.getHeader(CallIdHeader.NAME); var originalClientTransaction = (ClientTransaction) this.activeTransactions.get(callId.getCallId() + "_client"); @@ -591,7 +590,7 @@ private void processCallEndedEvent(final MessageResponse request) { var callId = request.getMessage().getCallId().getCallId(); var callEndedEvent = new HashMap(); var type = ResponseCode.valueOf(request.getMessage().getResponseType().name()); - // FIXME: This is a workaround for call ending coming from a CANCEL request + int code = type.equals(ResponseCode.UNKNOWN) ? ResponseCode.OK.getCode() : type.getCode(); var cause = HangupCauses.get(code); @@ -607,7 +606,6 @@ private void processRegistrationEvent(final MessageRequest request, final int ex var registeredAt = ZonedDateTime.now(ZoneOffset.UTC) .truncatedTo(ChronoUnit.MILLIS) .format(DateTimeFormatter.ISO_INSTANT); - var callId = request.getMessage().getCallId().getCallId(); var uri = request.getMessage().getFrom().getAddress().getUri(); var registrationEvent = new HashMap(); diff --git a/mods/edgeport/src/main/java/io/routr/events/NatsPublisher.java b/mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java similarity index 90% rename from mods/edgeport/src/main/java/io/routr/events/NatsPublisher.java rename to mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java index c3d799778..526245ac4 100644 --- a/mods/edgeport/src/main/java/io/routr/events/NatsPublisher.java +++ b/mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java @@ -30,12 +30,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -public class NatsPublisher implements EventsPublisher { - private static final Logger LOG = LogManager.getLogger(NatsPublisher.class); +public class NATSPublisher implements EventsPublisher { + private static final Logger LOG = LogManager.getLogger(NATSPublisher.class); private Connection connection; private String subject; - public NatsPublisher(final String addr, final String subject) throws IOException, InterruptedException{ + public NATSPublisher(final String addr, final String subject) throws IOException, InterruptedException{ Options options = new Options.Builder().server(addr).build(); this.connection = Nats.connect(options); this.subject = subject; From ac887b36bff347705392ccd5ecb2263e48a44d94 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Wed, 27 Dec 2023 11:49:00 -0500 Subject: [PATCH 03/18] chore: code cleanup --- mods/registry/src/runner.ts | 3 ++- mods/registry/src/utils.ts | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/registry/src/runner.ts b/mods/registry/src/runner.ts index 3507984e5..2a132f9d2 100644 --- a/mods/registry/src/runner.ts +++ b/mods/registry/src/runner.ts @@ -19,11 +19,12 @@ */ // eslint-disable-next-line @typescript-eslint/no-var-requires require("./tracer").init("dispatcher") +import { CONFIG_PATH, ENABLE_HEALTHCHECKS } from "./envs" import registryService from "./service" import { getConfig } from "./config/get_config" import { getLogger } from "@fonoster/logger" -import { CONFIG_PATH, ENABLE_HEALTHCHECKS } from "./envs" import express from "express" + const app = express() const healthPort = 8080 diff --git a/mods/registry/src/utils.ts b/mods/registry/src/utils.ts index a43578639..b2c219b88 100644 --- a/mods/registry/src/utils.ts +++ b/mods/registry/src/utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -28,7 +29,6 @@ import { Trunk } from "./types" -// eslint-disable-next-line require-jsdoc export function getUnregisteredTrunks(store: IRegistryStore) { return async (trunks: Trunk[]): Promise => { const registryEntries = await store.list() @@ -41,7 +41,6 @@ export function getUnregisteredTrunks(store: IRegistryStore) { } } -// eslint-disable-next-line require-jsdoc export async function findTrunks(apiClient: CC.APIClient) { return ( await apiClient.trunks.findBy({ From ff95f784786f1f548f49a6576ab2738f0230b9c3 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 13:35:29 -0500 Subject: [PATCH 04/18] feat: set 'backend' as default behavior for peers --- config/resources/numbers.yaml | 6 +- config/resources/peers.yaml | 5 +- mods/common/src/connect/assertions.ts | 11 --- mods/common/src/connect/mappers/assertions.ts | 19 +--- mods/common/src/connect/mappers/peer.ts | 3 +- mods/common/src/connect/validations.ts | 19 ---- mods/connect/src/router.ts | 16 ++-- mods/ctl/src/commands/peers/create.ts | 6 +- mods/ctl/src/commands/peers/get.ts | 2 +- mods/ctl/src/commands/peers/update.ts | 6 +- mods/location/src/location.ts | 79 +++++++++------- mods/location/src/types.ts | 3 +- mods/location/test/location.unit.test.ts | 94 ++++++++----------- mods/pgdata/src/mappers/peer.ts | 8 -- mods/sdk/src/peers/peers.ts | 4 +- 15 files changed, 111 insertions(+), 170 deletions(-) diff --git a/config/resources/numbers.yaml b/config/resources/numbers.yaml index 9fc0e331c..72b8fd0d5 100644 --- a/config/resources/numbers.yaml +++ b/config/resources/numbers.yaml @@ -11,7 +11,7 @@ trunkRef: trunk-01 location: telUrl: tel:+17066041487 - aorLink: backend:conference + aorLink: sip:conference@sip.local sessionAffinityHeader: X-Room-Id extraHeaders: - name: X-Room-Id @@ -60,7 +60,7 @@ trunkRef: trunk-03 location: telUrl: tel:+18095863314 - aorLink: backend:voice + aorLink: sip:voice@sip.local - apiVersion: v2beta1 kind: Number @@ -75,4 +75,4 @@ trunkRef: trunk-01 location: telUrl: tel:+14045551212 - aorLink: backend:voice + aorLink: sip:voice@sip.local diff --git a/config/resources/peers.yaml b/config/resources/peers.yaml index 5a7c427b1..8827756dc 100644 --- a/config/resources/peers.yaml +++ b/config/resources/peers.yaml @@ -4,19 +4,20 @@ metadata: name: Asterisk (Media Server) spec: - aor: backend:conference + aor: sip:conference@sip.local username: asterisk credentialsRef: credentials-03 loadBalancing: withSessionAffinity: true algorithm: least-sessions + - apiVersion: v2beta1 kind: Peer ref: peer-02 metadata: name: FS Voice Feature Server spec: - aor: backend:voice + aor: sip:voice@sip.local username: freeswitch credentialsRef: credentials-05 loadBalancing: diff --git a/mods/common/src/connect/assertions.ts b/mods/common/src/connect/assertions.ts index 0e98af931..3404c76f1 100644 --- a/mods/common/src/connect/assertions.ts +++ b/mods/common/src/connect/assertions.ts @@ -38,7 +38,6 @@ import { hasValidHeaders, isValidAOR, isValidAORLink, - isValidBalancingAlgorithm, isValidContactAddress, isValidDomainUri, isValidE164, @@ -74,16 +73,6 @@ export const hasValidHeadersOrThrow = ( } } -export const isValidBalancingAlgorithmOrThrow = ( - aor: string, - algorithm: LoadBalancingAlgorithm -) => { - const E = isValidBalancingAlgorithm(aor, algorithm) - if (E instanceof BadRequestError) { - throw E - } -} - export const hasACLRulesOrThrow = (acl: { deny: string[]; allow: string[] }) => validOrThrow(hasACLRules, acl) diff --git a/mods/common/src/connect/mappers/assertions.ts b/mods/common/src/connect/mappers/assertions.ts index 4277e6619..dfaff2538 100644 --- a/mods/common/src/connect/mappers/assertions.ts +++ b/mods/common/src/connect/mappers/assertions.ts @@ -17,7 +17,7 @@ * limitations under the License. */ import { getLogger } from "@fonoster/logger" -import { PeerConfig, UserConfig } from "../config" +import { UserConfig } from "../config" const logger = getLogger({ service: "common", filePath: __filename }) export const assertValidSchema = ( @@ -36,20 +36,3 @@ export const assertValidSchema = ( process.exit(1) } } - -export const assertValidAorSchema = (config: UserConfig) => { - const spec = (config as PeerConfig).spec - if (spec.aor.startsWith("backend:") && !spec.loadBalancing) { - logger.error( - "found a bad resource: balancing algorithm is required for `backend:` aors" - ) - process.exit(1) - } - - if (spec.aor.startsWith("sip:") && spec.loadBalancing) { - logger.error( - "found a bad resource: balancing algorithm is not allowed for `sip:` aors" - ) - process.exit(1) - } -} diff --git a/mods/common/src/connect/mappers/peer.ts b/mods/common/src/connect/mappers/peer.ts index 510d38dd5..7a3d606ed 100644 --- a/mods/common/src/connect/mappers/peer.ts +++ b/mods/common/src/connect/mappers/peer.ts @@ -21,13 +21,12 @@ import { LoadBalancingAlgorithm } from "../../types" import { PeerConfig } from "../config" import { schemaValidators } from "../schemas" import { Peer, Kind } from "../types" -import { assertValidAorSchema, assertValidSchema } from "./assertions" +import { assertValidSchema } from "./assertions" const valid = schemaValidators.get(Kind.PEER) export function mapToPeer(config: PeerConfig): Peer { assertValidSchema(config, valid) - assertValidAorSchema(config) const normalizeAlgorithm = (algorithm: string) => algorithm?.replace(/-/g, "_").toUpperCase() as LoadBalancingAlgorithm diff --git a/mods/common/src/connect/validations.ts b/mods/common/src/connect/validations.ts index 2cd3bc79f..b2cdb5b7e 100644 --- a/mods/common/src/connect/validations.ts +++ b/mods/common/src/connect/validations.ts @@ -204,25 +204,6 @@ export const isValidInboundUri = (inboundUri: string) => { return true } -export const isValidBalancingAlgorithm = ( - aor: string, - algorithm: LoadBalancingAlgorithm -) => { - if (aor.startsWith("backend:")) { - if (!algorithm || algorithm === LoadBalancingAlgorithm.UNSPECIFIED) { - return new BadRequestError( - "when the aor schema is `backend:`, the balancing algorithm is required" - ) - } - } else { - if (algorithm && algorithm !== LoadBalancingAlgorithm.UNSPECIFIED) { - return new BadRequestError( - "when the aor schema is `sip:`, the balancing algorithm is not allowed" - ) - } - } -} - export const isValidPort = (port: string) => { if (port) { if (!Validator.default.isPort(port)) { diff --git a/mods/connect/src/router.ts b/mods/connect/src/router.ts index 7eb68b3a3..d185c727d 100644 --- a/mods/connect/src/router.ts +++ b/mods/connect/src/router.ts @@ -236,16 +236,15 @@ async function fromPSTN( const sessionAffinityRef = E.getHeaderValue(req, callee.sessionAffinityHeader) let backend: Backend - if (callee.aorLink.startsWith("backend:")) { - const peer = ( - await apiClient.peers.findBy({ - fieldName: "aor", - fieldValue: callee.aorLink - }) - ).items[0] + const peer = ( + await apiClient.peers.findBy({ + fieldName: "aor", + fieldValue: callee.aorLink + }) + ).items[0] + if (peer) { backend = { - ref: peer.ref, balancingAlgorithm: peer.balancingAlgorithm, withSessionAffinity: peer.withSessionAffinity } @@ -350,7 +349,6 @@ async function agentToPeer( req: MessageRequest ) { const backend: Backend = { - ref: callee.ref, balancingAlgorithm: callee.balancingAlgorithm, withSessionAffinity: callee.withSessionAffinity } diff --git a/mods/ctl/src/commands/peers/create.ts b/mods/ctl/src/commands/peers/create.ts index 799e8e124..74ca72641 100644 --- a/mods/ctl/src/commands/peers/create.ts +++ b/mods/ctl/src/commands/peers/create.ts @@ -122,8 +122,7 @@ Creating Peer Asterisk Conference... b148b4b4-6884-4c06-bb7e-bd098f5fe793 name: "withSessionAffinity", message: "Enable Session Affinity?", type: "confirm", - default: false, - when: (answers) => answers.aor.startsWith("backend:") + default: false }, { name: "balancingAlgorithm", @@ -139,8 +138,7 @@ Creating Peer Asterisk Conference... b148b4b4-6884-4c06-bb7e-bd098f5fe793 } ], type: "list", - default: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - when: (answers) => answers.aor.startsWith("backend:") + default: CT.LoadBalancingAlgorithm.ROUND_ROBIN }, { name: "enabled", diff --git a/mods/ctl/src/commands/peers/get.ts b/mods/ctl/src/commands/peers/get.ts index e92196c25..63db0daf4 100644 --- a/mods/ctl/src/commands/peers/get.ts +++ b/mods/ctl/src/commands/peers/get.ts @@ -32,7 +32,7 @@ export default class GetCommand extends BaseCommand { static examples = [ `<%= config.bin %> <%= command.id %> Ref Name Username AOR Balancing Algorithm Session Affinity -6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference backend:conference ROUND_ROBIN Yes +6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference sip:conference@sip.local ROUND_ROBIN Yes ` ] diff --git a/mods/ctl/src/commands/peers/update.ts b/mods/ctl/src/commands/peers/update.ts index 143a67b7a..783dd1943 100644 --- a/mods/ctl/src/commands/peers/update.ts +++ b/mods/ctl/src/commands/peers/update.ts @@ -126,8 +126,7 @@ Updating Peer Asterisk Conf... 80181ca6-d4aa-4575-9375-8f72b07d5555 name: "withSessionAffinity", message: "Enable Session Affinity?", type: "confirm", - default: peerFromDB.withSessionAffinity, - when: (answers) => answers.aor.startsWith("backend:") + default: peerFromDB.withSessionAffinity }, { name: "balancingAlgorithm", @@ -143,8 +142,7 @@ Updating Peer Asterisk Conf... 80181ca6-d4aa-4575-9375-8f72b07d5555 } ], type: "list", - default: peerFromDB.balancingAlgorithm, - when: (answers) => answers.aor.startsWith("backend:") + default: peerFromDB.balancingAlgorithm }, { name: "enabled", diff --git a/mods/location/src/location.ts b/mods/location/src/location.ts index 6da849af5..61fcd19a9 100644 --- a/mods/location/src/location.ts +++ b/mods/location/src/location.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -19,7 +20,6 @@ import { UnsupportedSchema } from "./errors" import { AddRouteRequest, - Backend, FindRoutesRequest, ILocationService, ILocatorStore, @@ -63,38 +63,53 @@ export default class Location implements ILocationService { /** @inheritdoc */ public async findRoutes(request: FindRoutesRequest): Promise { - let routes = await this.store.get(`${request.aor}:${request.callId}`) + const formatLabels = (labelsMap: Map) => { + return Array.from(labelsMap) + .sort(([keyA], [keyB]) => keyA.localeCompare(keyB)) + .map(([key, value]) => `${key}=${value}`) + .join(";") + } + + const labelString = request.labels ? formatLabels(request.labels) : null + const storeKeyWithLabels = labelString + ? `${request.aor}:${request.callId}:${labelString}` + : `${request.aor}:${request.callId}` + + let routes = await this.store.get(storeKeyWithLabels) - if (routes.length > 0) { + if (routes && routes.length > 0) { return routes } - routes = request.labels - ? (await this.store.get(request.aor)).filter( + if (labelString) { + const storeKey = `${request.aor}:${request.callId}:${labelString}` + routes = await this.store.get(storeKey) + + if (!routes || routes.length === 0) { + routes = (await this.store.get(request.aor)).filter( filterOnlyMatchingLabels(request.labels) ) - : (await this.store.get(request.aor)) ?? [] + } + } else { + routes = (await this.store.get(request.aor)) ?? [] + } - if (request.aor.startsWith(AOR_SCHEME.SIP)) { - // Set call to the last route + const { backend } = request + + if (!backend) { this.store.put(`${request.aor}:${request.callId}`, routes[0]) return routes - } else if (request.aor.startsWith(AOR_SCHEME.BACKEND)) { - const { backend } = request + } - // If it has not affinity session then get next - const r = - // Falls back to round-robin if no session affinity ref is provided - backend.withSessionAffinity && request.sessionAffinityRef - ? [await this.nextWithAffinity(routes, request.sessionAffinityRef)] - : [this.next(routes, backend)] + // If it has no affinity session then get next + const r = + backend?.withSessionAffinity && request.sessionAffinityRef + ? [await this.nextWithAffinity(routes, request.sessionAffinityRef)] + : [this.next(routes, request)] - // Next time we will get the route with callId - this.store.put(`${request.aor}:${request.callId}`, r[0]) + this.store.put(storeKeyWithLabels, r[0]) - return r - } - throw new UnsupportedSchema(request.aor) + return r } /** @inheritdoc */ @@ -102,44 +117,42 @@ export default class Location implements ILocationService { return this.store.delete(request.aor) } - // eslint-disable-next-line require-jsdoc - private next(routes: Array, backend: Backend): Route { + private next(routes: Array, request: FindRoutesRequest): Route { + const { backend } = request + const ref = backend?.ref || request.aor if ( - backend.balancingAlgorithm === CT.LoadBalancingAlgorithm.LEAST_SESSIONS + backend?.balancingAlgorithm === CT.LoadBalancingAlgorithm.LEAST_SESSIONS ) { return routes.sort((r1, r2) => r1.sessionCount - r2.sessionCount)[0] } // Continues using round-robin - const nextPosition = - this.rrCount.get(`${AOR_SCHEME.BACKEND}${backend.ref}`) ?? 0 - + const nextPosition = this.rrCount.get(ref) ?? 0 const result = routes[nextPosition] if (nextPosition >= routes.length - 1) { // Restarting round-robin counter - this.rrCount.set(`${AOR_SCHEME.BACKEND}${backend.ref}`, 0) + this.rrCount.set(ref, 0) } else { - this.rrCount.set(`${AOR_SCHEME.BACKEND}${backend.ref}`, nextPosition + 1) + this.rrCount.set(ref, nextPosition + 1) } return result } // Backend with session affinity does not support round-robin - // eslint-disable-next-line require-jsdoc private async nextWithAffinity( routes: Array, - sessionAffinityHeader: string + sessionAffinityRef: string ): Promise { - const route = await this.store.get(sessionAffinityHeader) + const route = await this.store.get(sessionAffinityRef) if (route.length > 0) { return route[0] } const r = routes.sort((r1, r2) => r1.sessionCount - r2.sessionCount)[0] - this.store.put(sessionAffinityHeader, r) + this.store.put(sessionAffinityRef, r) return r } diff --git a/mods/location/src/types.ts b/mods/location/src/types.ts index a18f7cd71..50074a80c 100644 --- a/mods/location/src/types.ts +++ b/mods/location/src/types.ts @@ -53,7 +53,8 @@ export interface RemoveRoutesRequest { } export interface Backend { - ref: string + // Keep this for backward compatibility + ref?: string balancingAlgorithm: CT.LoadBalancingAlgorithm withSessionAffinity: boolean } diff --git a/mods/location/test/location.unit.test.ts b/mods/location/test/location.unit.test.ts index 4c61af579..9039d5dd5 100644 --- a/mods/location/test/location.unit.test.ts +++ b/mods/location/test/location.unit.test.ts @@ -59,49 +59,46 @@ describe("@routr/location", () => { labels: labels2 } - expect((await locator.findRoutes(findRoutesRequest1)).length).to.be.equal(2) - expect((await locator.findRoutes(findRoutesRequest1))[0]) - .to.have.property("user") - .to.be.equal("1001") - - expect((await locator.findRoutes(findRoutesRequest2)).length).to.be.equal(1) - expect((await locator.findRoutes(findRoutesRequest2))[0]) - .to.have.property("user") - .to.be.equal("1001") + const result1 = await locator.findRoutes(findRoutesRequest1) + const result2 = await locator.findRoutes(findRoutesRequest2) + const result3 = await locator.findRoutes(findRoutesRequest3) - expect((await locator.findRoutes(findRoutesRequest3)).length).to.be.equal(0) + expect(result1.length).to.be.equal(2) + expect(result1[0]).to.have.property("user").to.be.equal("1001") + expect(result2.length).to.be.equal(1) + expect(result2[0]).to.have.property("user").to.be.equal("1001") + expect(result3.length).to.be.equal(0) }) it("find next backend using least-sessions", async () => { const locator = new Locator(new MemoryStore()) locator.addRoute({ - aor: "backend:voice_ls", + aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute01 }) locator.addRoute({ - aor: "backend:voice_ls", + aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute02 }) locator.addRoute({ - aor: "backend:voice_ls", + aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute03 }) locator.addRoute({ - aor: "backend:voice_ls", + aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute04 }) locator.addRoute({ - aor: "backend:voice_ls", + aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute05 }) const findRoutesRequest1: FindRoutesRequest = { callId: "3848276298220188511", - aor: "backend:voice_ls", + aor: "sip:voice_ls@sip.local", backend: { withSessionAffinity: true, - balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS, - ref: "voice_ls" + balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS } } @@ -113,87 +110,80 @@ describe("@routr/location", () => { it("find next backend using round-robin", async () => { const locator = new Locator(new MemoryStore()) locator.addRoute({ - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute05 }) locator.addRoute({ - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute04 }) locator.addRoute({ - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute03 }) locator.addRoute({ - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute02 }) locator.addRoute({ - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute01 }) const findRoutesRequest1 = { callId: "01", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } const findRoutesRequest2 = { callId: "02", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } const findRoutesRequest3 = { callId: "03", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } const findRoutesRequest4 = { callId: "04", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } const findRoutesRequest5 = { callId: "05", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } const findRoutesRequest6 = { callId: "06", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } const findRoutesRequest7 = { callId: "07", - aor: "backend:voice_rr", + aor: "sip:voice_rr@sip.local", backend: { withSessionAffinity: false, - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - ref: "voice_rr" + balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN } } @@ -228,37 +218,35 @@ describe("@routr/location", () => { it("find next backend with session affinity enabled", async () => { const locator = new Locator(new MemoryStore()) locator.addRoute({ - aor: "backend:conference", + aor: "sip:conference@sip.local", route: Routes.conferenceWithExpiredRoute }) locator.addRoute({ - aor: "backend:conference", + aor: "sip:conference@sip.local", route: Routes.conferenceBackendRoute02 }) locator.addRoute({ - aor: "backend:conference", + aor: "sip:conference@sip.local", route: Routes.conferenceBackendRoute01 }) const findRoutesRequest1 = { callId: "3848276298220188511", - aor: "backend:conference", + aor: "sip:conference@sip.local", sessionAffinityRef: "any-session-affinity-ref", backend: { withSessionAffinity: true, - balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS, - ref: "conference" + balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS } } const findRoutesRequest2 = { callId: "any-call-id", - aor: "backend:conference", + aor: "sip:conference@sip.local", sessionAffinityRef: "any-session-affinity-ref", backend: { withSessionAffinity: true, - balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS, - ref: "conference" + balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS } } diff --git a/mods/pgdata/src/mappers/peer.ts b/mods/pgdata/src/mappers/peer.ts index a49339bc0..50ca5a54d 100644 --- a/mods/pgdata/src/mappers/peer.ts +++ b/mods/pgdata/src/mappers/peer.ts @@ -52,10 +52,6 @@ export class PeerManager extends EntityManager { CC.hasAOROrThrow(this.peer.aor) CC.isValidAOROrThrow(this.peer.aor) CC.isValidContactAddressOrThrow(this.peer.contactAddr) - CC.isValidBalancingAlgorithmOrThrow( - this.peer.aor, - this.peer.balancingAlgorithm - ) } validOrThrowUpdate() { @@ -64,10 +60,6 @@ export class PeerManager extends EntityManager { CC.isValidUsernameOrThrow(this.peer.username) CC.isValidAOROrThrow(this.peer.aor) CC.isValidContactAddressOrThrow(this.peer.contactAddr) - CC.isValidBalancingAlgorithmOrThrow( - this.peer.aor, - this.peer.balancingAlgorithm - ) } mapToPrisma(): PeerPrismaModel { diff --git a/mods/sdk/src/peers/peers.ts b/mods/sdk/src/peers/peers.ts index 721753f47..6d97a4619 100644 --- a/mods/sdk/src/peers/peers.ts +++ b/mods/sdk/src/peers/peers.ts @@ -41,7 +41,7 @@ import { * const request = { * name: "Asterisk Conference Server", * username: "conference", - * aor: "backend:conference", + * aor: "sip:conference@sip.local", * contactAddr: "10.0.0.1:5060", * accessControlListRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", * credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", @@ -88,7 +88,7 @@ export class Peers extends APIClient { * const request = { * name: "Asterisk Conference Server", * username: "conference", - * aor: "backend:conference", + * aor: "sip:conference@sip.local", * contactAddr: "10.0.0.1:5060", * accessControlListRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", * credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", From 576ca53f342819b16022d2fa4b743eebbf170aa1 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 13:38:28 -0500 Subject: [PATCH 05/18] chore: update tests to remove the 'backend:' schema --- docs/docs/connect/nodesdk/sdk.md | 4 +- mods/common/src/connect/validations.ts | 1 - mods/location/test/memory_store.unit.test.ts | 36 +++++------ mods/location/test/redis_store.int.test.ts | 42 ++++++------ mods/pgdata/test/number.mapper.unit.test.ts | 12 ++-- mods/pgdata/test/peer.mapper.unit.test.ts | 68 +------------------- mods/sdk/README.md | 4 +- 7 files changed, 50 insertions(+), 117 deletions(-) diff --git a/docs/docs/connect/nodesdk/sdk.md b/docs/docs/connect/nodesdk/sdk.md index 1f8c79620..6cdd6c310 100644 --- a/docs/docs/connect/nodesdk/sdk.md +++ b/docs/docs/connect/nodesdk/sdk.md @@ -958,7 +958,7 @@ const peers = new SDK.Peers() const request = { name: "Asterisk Conference Server", username: "conference", - aor: "backend:conference", + aor: "sip:conference@sip.local", contactAddr: "10.0.0.1:5060", accessControlListRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", @@ -1004,7 +1004,7 @@ Creates a new Peer on Routr. const request = { name: "Asterisk Conference Server", username: "conference", - aor: "backend:conference", + aor: "sip:conference@sip.local", contactAddr: "10.0.0.1:5060", accessControlListRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", diff --git a/mods/common/src/connect/validations.ts b/mods/common/src/connect/validations.ts index b2cdb5b7e..4ed3d47a5 100644 --- a/mods/common/src/connect/validations.ts +++ b/mods/common/src/connect/validations.ts @@ -18,7 +18,6 @@ */ import * as Validator from "validator" import { BadRequestError } from "../errors" -import { LoadBalancingAlgorithm } from "../types" import { phone } from "phone" export const hasReference = (ref: string) => diff --git a/mods/location/test/memory_store.unit.test.ts b/mods/location/test/memory_store.unit.test.ts index adb9a7634..4ad410873 100644 --- a/mods/location/test/memory_store.unit.test.ts +++ b/mods/location/test/memory_store.unit.test.ts @@ -31,34 +31,34 @@ describe("@routr/location/memory_store", () => { it("puts value in a collection", async () => { const store = new MemoryStore() - store.put("backend:voice", Routes.voiceBackendRoute01) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:conference", Routes.conferenceBackendRoute01) - store.put("backend:conference", Routes.conferenceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:conference@sip.local", Routes.conferenceBackendRoute01) + store.put("sip:conference@sip.local", Routes.conferenceBackendRoute01) expect(store.size()).to.be.equal(2) - expect((await store.get("backend:voice")).length).to.be.equal(2) - expect((await store.get("backend:conference")).length).to.be.equal(1) + expect((await store.get("sip:voice@sip.local")).length).to.be.equal(2) + expect((await store.get("sip:conference@sip.local")).length).to.be.equal(1) }) it("test removing all routes for an aor", async () => { const store = new MemoryStore() - store.put("backend:voice", Routes.voiceBackendRoute01) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:voice", Routes.voiceBackendRoute02) - await store.delete("backend:voice") - expect(await store.get("backend:voice")).to.be.empty + store.put("sip:voice@sip.local", Routes.voiceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + await store.delete("sip:voice@sip.local") + expect(await store.get("sip:voice@sip.local")).to.be.empty }) it("sets an expire route and clean the collection", async () => { const store = new MemoryStore() - store.put("backend:voice", Routes.voiceBackendRoute01) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:conference", Routes.conferenceBackendRoute01) - store.put("backend:conference", Routes.conferenceWithExpiredRoute) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:conference@sip.local", Routes.conferenceBackendRoute01) + store.put("sip:conference@sip.local", Routes.conferenceWithExpiredRoute) store.cleanup() expect(store.size()).to.be.equal(2) - expect((await store.get("backend:conference")).length).to.be.equal(1) + expect((await store.get("sip:conference@sip.local")).length).to.be.equal(1) }) }) diff --git a/mods/location/test/redis_store.int.test.ts b/mods/location/test/redis_store.int.test.ts index dc85aa589..a2d644c76 100644 --- a/mods/location/test/redis_store.int.test.ts +++ b/mods/location/test/redis_store.int.test.ts @@ -31,36 +31,36 @@ describe("@routr/location/redis_store", () => { it("puts value in a collection", async () => { const store = new RedisStore() - store.put("backend:voice", Routes.voiceBackendRoute01) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:conference", Routes.conferenceBackendRoute01) - store.put("backend:conference", Routes.conferenceBackendRoute01) - expect((await store.get("backend:voice")).length).to.be.equal(2) - expect((await store.get("backend:conference")).length).to.be.equal(1) - expect((await store.get("backend:voice"))[0]) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:conference@sip.local", Routes.conferenceBackendRoute01) + store.put("sip:conference@sip.local", Routes.conferenceBackendRoute01) + expect((await store.get("sip:voice@sip.local")).length).to.be.equal(2) + expect((await store.get("sip:conference@sip.local")).length).to.be.equal(1) + expect((await store.get("sip:voice@sip.local"))[0]) .to.be.have.property("user") .to.be.equal("voice02") }) it("test removing all routes for an aor", async () => { const store = new RedisStore() - await store.delete("backend:voice") - store.put("backend:voice", Routes.voiceBackendRoute01) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:voice", Routes.voiceBackendRoute02) - await store.delete("backend:voice") - expect(await store.get("backend:voice")).to.be.empty + await store.delete("sip:voice@sip.local") + store.put("sip:voice@sip.local", Routes.voiceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + await store.delete("sip:voice@sip.local") + expect(await store.get("sip:voice@sip.local")).to.be.empty }) it("sets an expire route and clean the collection", async () => { const store = new RedisStore() - await store.delete("backend:voice") - await store.delete("backend:conference") - store.put("backend:voice", Routes.voiceBackendRoute01) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:voice", Routes.voiceBackendRoute02) - store.put("backend:conference", Routes.conferenceBackendRoute01) - expect((await store.get("backend:conference")).length).to.be.equal(1) + await store.delete("sip:voice@sip.local") + await store.delete("sip:conference@sip.local") + store.put("sip:voice@sip.local", Routes.voiceBackendRoute01) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:voice@sip.local", Routes.voiceBackendRoute02) + store.put("sip:conference@sip.local", Routes.conferenceBackendRoute01) + expect((await store.get("sip:conference@sip.local")).length).to.be.equal(1) }) }) diff --git a/mods/pgdata/test/number.mapper.unit.test.ts b/mods/pgdata/test/number.mapper.unit.test.ts index d38b1d667..b9c700d70 100644 --- a/mods/pgdata/test/number.mapper.unit.test.ts +++ b/mods/pgdata/test/number.mapper.unit.test.ts @@ -39,7 +39,7 @@ describe("@routr/pgdata/mappers/number", () => { trunkRef: "trunk-01", name: "(785)317-8070", telUrl: "tel:+17853178070", - aorLink: "backend:aor-01", + aorLink: "sip:aor-01@sip.local", city: "Durham", country: "United States", countryIsoCode: "US", @@ -189,7 +189,7 @@ describe("@routr/pgdata/mappers/number", () => { trunkRef: "trunk-01", name: "", telUrl: "tel:+17853178070", - aorLink: "backend:aor-01", + aorLink: "sip:aor-01@sip.local", city: "Durham", country: "United States", countryIsoCode: "US", @@ -224,7 +224,7 @@ describe("@routr/pgdata/mappers/number", () => { trunkRef: "trunk-01", name: "a".repeat(65), telUrl: "tel:+17853178070", - aorLink: "backend:aor-01", + aorLink: "sip:aor-01@sip.local", city: "Durham", country: "United States", countryIsoCode: "US", @@ -263,7 +263,7 @@ describe("@routr/pgdata/mappers/number", () => { trunkRef: "trunk-01", name: "(785)317-8070", telUrl: "tel:+17853178070", - aorLink: "backend:aor-01", + aorLink: "sip:aor-01@sip.local", city: "Durham", country: "United States", countryIsoCode: "US", @@ -296,7 +296,7 @@ describe("@routr/pgdata/mappers/number", () => { trunkRef: "trunk-01", name: "(785)317-8070", telUrl: "", - aorLink: "backend:aor-01", + aorLink: "sip:aor-01@sip.local", city: "Durham", country: "United States", countryIsoCode: "US", @@ -328,7 +328,7 @@ describe("@routr/pgdata/mappers/number", () => { trunkRef: "trunk-01", name: "(785)317-8070", telUrl: "tel:+17853178070", - aorLink: "backend:aor-01", + aorLink: "sip:aor-01@sip.local", city: "Durham", country: "United States", countryIsoCode: "US", diff --git a/mods/pgdata/test/peer.mapper.unit.test.ts b/mods/pgdata/test/peer.mapper.unit.test.ts index 587dcc261..f475083df 100644 --- a/mods/pgdata/test/peer.mapper.unit.test.ts +++ b/mods/pgdata/test/peer.mapper.unit.test.ts @@ -75,7 +75,7 @@ describe("@routr/pgdata/mappers/peer", () => { credentialsRef: "credentials-01", name: "Asterisk Media Server", username: "asterisk", - aor: "backend:voice", + aor: "sip:voice@sip.local", contactAddr: "192.168.1.3", balancingAlgorithm: "ROUND_ROBIN" as LoadBalancingAlgorithm, withSessionAffinity: false, @@ -319,71 +319,5 @@ describe("@routr/pgdata/mappers/peer", () => { "the aor schema must start with `backend:` or `sip:`" ) }) - - it("when aor schema is backend: but defined no balancing algorithm", () => { - // Arrange - const peer = { - apiVersion: "v2", - ref: "peer-01", - credentialsRef: "credentials-01", - accessControlListRef: "acl-01", - name: "Asterisk Media Server", - username: "asterisk", - aor: "backend:aor-01", - contactAddr: "192.168.1.12:5060", - enabled: true, - createdAt: new Date().getTime() / 1000, - updatedAt: new Date().getTime() / 1000, - extended: { - test: "test" - } - } - - // Act - const createResult = () => new PeerManager(peer).validOrThrowCreate() - const createUpdate = () => new PeerManager(peer).validOrThrowUpdate() - - // Assert - expect(createResult).to.throw( - "when the aor schema is `backend:`, the balancing algorithm is required" - ) - expect(createUpdate).to.throw( - "when the aor schema is `backend:`, the balancing algorithm is required" - ) - }) - - it("when aor schema is sip: balancing algorithm is not allowed", () => { - // Arrange - const peer = { - apiVersion: "v2", - ref: "peer-01", - credentialsRef: "credentials-01", - accessControlListRef: "acl-01", - name: "Asterisk Media Server", - username: "asterisk", - aor: "sip:1001@sip.local", - balancingAlgorithm: CT.LoadBalancingAlgorithm.ROUND_ROBIN, - withSessionAffinity: false, - contactAddr: "192.168.1.12:5060", - enabled: true, - createdAt: new Date().getTime() / 1000, - updatedAt: new Date().getTime() / 1000, - extended: { - test: "test" - } - } - - // Act - const createResult = () => new PeerManager(peer).validOrThrowCreate() - const createUpdate = () => new PeerManager(peer).validOrThrowUpdate() - - // Assert - expect(createResult).to.throw( - "when the aor schema is `sip:`, the balancing algorithm is not allowed" - ) - expect(createUpdate).to.throw( - "when the aor schema is `sip:`, the balancing algorithm is not allowed" - ) - }) }) }) diff --git a/mods/sdk/README.md b/mods/sdk/README.md index a27d61ee6..38434f385 100644 --- a/mods/sdk/README.md +++ b/mods/sdk/README.md @@ -966,7 +966,7 @@ const peers = new SDK.Peers() const request = { name: "Asterisk Conference Server", username: "conference", - aor: "backend:conference", + aor: "sip:conference@sip.local", contactAddr: "10.0.0.1:5060", accessControlListRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", @@ -1012,7 +1012,7 @@ Creates a new Peer on Routr. const request = { name: "Asterisk Conference Server", username: "conference", - aor: "backend:conference", + aor: "sip:conference@sip.local", contactAddr: "10.0.0.1:5060", accessControlListRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3", From e958922b4e024174a0329cbca95ed98d33f99591 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 14:10:21 -0500 Subject: [PATCH 06/18] chore: revise examples to align with deprecation of 'backend:' schema --- CONNECT.md | 6 +++--- CORE.md | 6 ++++-- docs/docs/connect/command-line/ctl.md | 4 ++-- docs/docs/development/components/apiserver.md | 4 ++-- docs/docs/development/components/location.md | 4 ++-- docs/docs/overview/concepts.md | 4 ++-- mods/ctl/README.md | 4 ++-- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CONNECT.md b/CONNECT.md index a41fffd20..a242155ea 100644 --- a/CONNECT.md +++ b/CONNECT.md @@ -122,7 +122,7 @@ Furthermore, an Agent can utilize the custom header X-Connect-Token to transmit { "ref": "agent-01", "aor": "sip:1001@sip.local", - "aorLink": "backend:voice", + "aorLink": "sip:voice@sip.local", "domain": "sip.local", "domainRef": "domain-01", "allowedMethods": [ "INVITE", "REGISTER"], @@ -245,7 +245,7 @@ Numbers represent virtual numbers that route calls from/to the PSTN via a Trunk. "trunkRef": "trunk-01", "location": { "telUrl": "tel:+17066041487", - "aorLink": "backend:conference", + "aorLink": "sip:conference@sip.local", "sessionAffinityHeader": "X-Room-Id", "extraHeaders": [{ "name": "X-Room-Id", @@ -268,7 +268,7 @@ Like Agents, Peers represent SIP endpoints such as Media Servers. Unlike Agents, }, "spec": { "username": "asterisk", - "aor": "backend:conference", + "aor": "sip:conference@sip.local", "contactAddr": "192.168.1.2:6060", "credentialsRef": "credentials-01", "loadBalancing": { diff --git a/CORE.md b/CORE.md index c43c64c01..587bf8963 100644 --- a/CORE.md +++ b/CORE.md @@ -1,6 +1,6 @@ # Routr Specification -### Version 0.1.4 (Draft) +### Version 0.1.5 (Draft)
Table of Contents @@ -700,7 +700,7 @@ The following functions are MUST have for an implementation of a *Location Servi - *Accept gRPC Requests* - Accept gRPC Requests - *Find Routes* - Find all the routes to an endpoint - *Filtering Labels* - MUST be able to store endpoints using labels (for filtering) -- *Backend or Endpoint* - MUST allow AOR the "sip:" and "backend:" schemes +- *Backend or Endpoint* - MUST allow AOR the "sip:" and "backend:" schemes ("backend:" is deprecated since v0.1.5) - *Balancing Algorithm* - Implements `round-robin` and `least-sessions` - *Session Affinity* - Implements session base affinity - *Cache* - Caching must be done via "providers" that are easily replaceable (e.g.: `Memory`, `Redis`, etc.) @@ -708,6 +708,8 @@ The following functions are MUST have for an implementation of a *Location Servi - *M.E.L.T* - Must be capable of collecting and sending M.E.L.T to external systems - *Service Port* - The default gRPC port at the Location Service SHOULD be `51902` +> Since SPEC v0.1.5 using "backend:" scheme is deprecated. The Location Service will continue to support it for backward compatibility. + **Non-functional Requirements** The following requirements are essential to have for an implementation of a *Location Service*: diff --git a/docs/docs/connect/command-line/ctl.md b/docs/docs/connect/command-line/ctl.md index 024ef7869..98d777cd3 100644 --- a/docs/docs/connect/command-line/ctl.md +++ b/docs/docs/connect/command-line/ctl.md @@ -757,8 +757,8 @@ DESCRIPTION EXAMPLES $ rctl peers get - Ref Name Username AOR Balancing Algorithm Session Affinity - 6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference backend:conference ROUND_ROBIN Yes + Ref Name Username AOR Balancing Algorithm Session Affinity + 6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference sip:conference@sip.local ROUND_ROBIN Yes ``` _See code: [dist/commands/peers/get.ts](https://github.com/fonoster/routr/blob/v2.1.11/dist/commands/peers/get.ts)_ diff --git a/docs/docs/development/components/apiserver.md b/docs/docs/development/components/apiserver.md index c61df6777..00fffe538 100644 --- a/docs/docs/development/components/apiserver.md +++ b/docs/docs/development/components/apiserver.md @@ -157,7 +157,7 @@ Filename: `numbers.yaml` trunkRef: trunk-01 location: telUrl: tel:+17066041487 - aorLink: backend:conference + aorLink: sip:conference@sip.local sessionAffinityHeader: X-Room-Id extraHeaders: - name: X-Room-Id @@ -251,7 +251,7 @@ Filename: `peers.yaml` metadata: name: Asterisk (Media Server) spec: - aor: backend:conference + aor: sip:conference@sip.local username: asterisk credentialsRef: credentials-03 loadBalancing: diff --git a/docs/docs/development/components/location.md b/docs/docs/development/components/location.md index d0004d4eb..8af55487f 100644 --- a/docs/docs/development/components/location.md +++ b/docs/docs/development/components/location.md @@ -19,7 +19,7 @@ ref: peer-01 metadata: name: Asterisk (Media Server) spec: - aor: backend:conference + aor: sip:conference@sip.local username: asterisk credentialsRef: credentials-01 loadBalancing: @@ -29,7 +29,7 @@ spec: Notice that the load balancing section sets the `withSessionAffinity` to `true`. We need session affinity to ensure that all calls related to the conference arrive on the same Asterisk server. -Every Asterisk server that registers using the `asterisk` username will join the same group under the `backend:conference` Address of Record (AOR). +Every Asterisk server that registers using the `asterisk` username will join the same group under the `sip:conference@sip.local` Address of Record (AOR). ## Configuration Spec diff --git a/docs/docs/overview/concepts.md b/docs/docs/overview/concepts.md index 2a2e1b167..72ff4fcb4 100644 --- a/docs/docs/overview/concepts.md +++ b/docs/docs/overview/concepts.md @@ -125,7 +125,7 @@ ref: peer-01 metadata: name: Asterisk (Media Server) spec: - aor: backend:conference + aor: sip:conference@sip.local username: asterisk credentialsRef: credentials-01 loadBalancing: @@ -135,7 +135,7 @@ spec: Notice that the load balancing section sets the `withSessionAffinity` to `true`. We need session affinity to ensure that all calls related to the conference arrive on the same Asterisk server. -Every Asterisk server that registers using the `asterisk` username will join the same group under the `backend:conference` Address of Record (AOR). +Every Asterisk server that registers using the `asterisk` username will join the same group under the `sip:conference@sip.local` Address of Record (AOR). ## Middlewares diff --git a/mods/ctl/README.md b/mods/ctl/README.md index 06004b281..2cdc8abc7 100644 --- a/mods/ctl/README.md +++ b/mods/ctl/README.md @@ -809,8 +809,8 @@ DESCRIPTION EXAMPLES $ rctl peers get - Ref Name Username AOR Balancing Algorithm Session Affinity - 6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference backend:conference ROUND_ROBIN Yes + Ref Name Username AOR Balancing Algorithm Session Affinity + 6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference sip:conference@sip.local ROUND_ROBIN Yes ``` _See code: [src/commands/peers/get.ts](https://github.com/fonoster/routr/blob/v2.6.1/mods/ctl/src/commands/peers/get.ts)_ From 2562aacc8d177acbc1d0059538bb321d324cfcfa Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 15:40:36 -0500 Subject: [PATCH 07/18] chore: add test find next backend using deprecated 'backend:' schema --- mods/location/test/location.unit.test.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mods/location/test/location.unit.test.ts b/mods/location/test/location.unit.test.ts index 9039d5dd5..2c23bdb58 100644 --- a/mods/location/test/location.unit.test.ts +++ b/mods/location/test/location.unit.test.ts @@ -258,6 +258,28 @@ describe("@routr/location", () => { .to.be.equal("conference01") }) + it("find next backend using deprecated 'backend:' schema", async () => { + const locator = new Locator(new MemoryStore()) + locator.addRoute({ + aor: "backend:voice_ls", + route: Routes.voiceBackendRoute01 + }) + + const findRoutesRequest1 = { + callId: "3848276298220188511", + aor: "backend:voice_ls", + backend: { + withSessionAffinity: true, + balancingAlgorithm: CT.LoadBalancingAlgorithm.LEAST_SESSIONS, + ref: "voice_ls" + } + } + + expect((await locator.findRoutes(findRoutesRequest1))[0]) + .to.be.have.property("user") + .to.be.equal("voice01") + }) + it("gets configuration from file", (done) => { const result = getConfig(__dirname + "/../../../config/location.yaml") if (result._tag === "Right") { From c2a5265539236e2aa279b372139ef323e9ffff31 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 17:29:43 -0500 Subject: [PATCH 08/18] chore: migrate project from Java 11 to Java 17 --- .scripts/custom-jre.sh | 2 +- Dockerfile | 7 +++---- mods/edgeport/edgeport.sh | 1 - mods/one/src/runner.ts | 4 ++++ mods/requester/requester.sh | 1 - 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.scripts/custom-jre.sh b/.scripts/custom-jre.sh index e9fbda214..9fcb6a49e 100644 --- a/.scripts/custom-jre.sh +++ b/.scripts/custom-jre.sh @@ -19,5 +19,5 @@ echo "" $JAVA_HOME/bin/jlink -c --no-man-pages --no-header-files -G \ --module-path $TARGET_HOME/jmods/ \ --add-modules \ - java.base,java.management,java.naming,java.sql,java.instrument,jdk.crypto.cryptoki,jdk.scripting.nashorn,jdk.unsupported,jdk.management.agent,jdk.unsupported.desktop,jdk.crypto.ec,java.security.jgss,jdk.jartool \ + java.base,java.management,java.naming,java.sql,java.instrument,jdk.crypto.cryptoki,jdk.unsupported,jdk.management.agent,jdk.unsupported.desktop,jdk.crypto.ec,java.security.jgss,jdk.jartool,java.scripting \ --output jre diff --git a/Dockerfile b/Dockerfile index eccca36bd..4a4aa4df9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,14 @@ FROM alpine:3.18 as builder LABEL maintainer="Pedro Sanders " -ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk WORKDIR /work COPY mods/one . COPY mods/pgdata/schema.prisma . COPY .scripts/custom-jre.sh . -RUN apk add --no-cache --update npm nodejs curl git tini python3 make cmake g++ openjdk11-jdk \ +RUN apk add --no-cache --update npm nodejs curl git tini python3 make cmake g++ openjdk17-jdk \ && sh custom-jre.sh \ && npm install --omit=dev \ && mv schema.prisma node_modules/@routr/pgdata/ \ @@ -42,8 +42,7 @@ ENV PKCS_PASSWORD=$PKCS_PASSWORD \ CA_CERT_SUBJECT=$CA_CERT_SUBJECT \ SERVER_CERT_SUBJECT=$SERVER_CERT_SUBJECT \ DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/routr \ - IGNORE_LOOPBACK_FROM_LOCALNETS=true \ - LOG4J2=/etc/routr/log4j2.yaml + IGNORE_LOOPBACK_FROM_LOCALNETS=true WORKDIR /service diff --git a/mods/edgeport/edgeport.sh b/mods/edgeport/edgeport.sh index 4a0f522c9..bffd45295 100755 --- a/mods/edgeport/edgeport.sh +++ b/mods/edgeport/edgeport.sh @@ -8,7 +8,6 @@ export HOME="$(cd "$(dirname "$0")"; pwd)" # TODO: Look into performance impact of not having runtime compilation context export JAVA_OPTS="-Dlog4j.configurationFile=${LOG4J2} \ -Dpolyglot.engine.WarnInterpreterOnly=false \ - -XX:CMSInitiatingOccupancyFraction=80 \ -Dsun.rmi.dgc.client.gcInterval=3600000 \ -Djava.net.preferIPv4Stack=true" diff --git a/mods/one/src/runner.ts b/mods/one/src/runner.ts index 1ceb53020..eb759cf9b 100644 --- a/mods/one/src/runner.ts +++ b/mods/one/src/runner.ts @@ -61,6 +61,10 @@ edgeportProcess.stdout.on("data", (data) => { process.stdout.write(`${data}`) }) +edgeportProcess.stderr.on("data", (data) => { + process.stderr.write(`${data}`) +}) + edgeportProcess.on("error", (err) => { logger.error(`failed to spawn edgeport process: ${err}`) process.exit(1) diff --git a/mods/requester/requester.sh b/mods/requester/requester.sh index 5fc62794f..4c6fad14c 100755 --- a/mods/requester/requester.sh +++ b/mods/requester/requester.sh @@ -5,7 +5,6 @@ export HOME="$(cd "$(dirname "$0")"; pwd)" [ -z "$JAVA_HOME" ] && { echo "Could not find a runtime environment. Please setup environment variable JAVA_HOME"; exit 1; } export JAVA_OPTS="-Dlog4j.configurationFile=${LOG4J2} \ - -XX:CMSInitiatingOccupancyFraction=80 \ -Dsun.rmi.dgc.client.gcInterval=3600000 \ -Djava.net.preferIPv4Stack=true" From b7b117b7093e60a882b499fce06f279fb487ee24 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 17:32:11 -0500 Subject: [PATCH 09/18] chore: remove Nashorn engine support --- .../src/main/java/io/routr/Launcher.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/mods/edgeport/src/main/java/io/routr/Launcher.java b/mods/edgeport/src/main/java/io/routr/Launcher.java index a61b2f7f3..7d89a8ba8 100644 --- a/mods/edgeport/src/main/java/io/routr/Launcher.java +++ b/mods/edgeport/src/main/java/io/routr/Launcher.java @@ -54,23 +54,6 @@ public static void main(String... args) { } public void launch() throws ScriptException { - String engine = System.getenv("JS_ENGINE"); - - if (engine != null && engine.equals("graal.js")) { - launchWithGraalJS(); - } else if (engine != null && engine.equals("nashorn")) { - launchWithNashorn(); - } else { - launchWithGraalJS(); - } - } - - public void launchWithNashorn() throws ScriptException { - ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn"); - engine.eval(LAUNCH_SCRIPT); - } - - public void launchWithGraalJS() { Context polyglot = Context .newBuilder() .allowExperimentalOptions(true) From 56b4e52121822e3fae3ac817017fc13d05f4318c Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 17:33:41 -0500 Subject: [PATCH 10/18] chore: upgrade base image to alpine:3.19 --- Dockerfile | 4 ++-- mods/connect/Dockerfile | 2 +- mods/dispatcher/Dockerfile | 2 +- mods/echo/Dockerfile | 2 +- mods/edgeport/Dockerfile | 4 ++-- mods/location/Dockerfile | 2 +- mods/pgdata/Dockerfile | 2 +- mods/registry/Dockerfile | 2 +- mods/requester/Dockerfile | 4 ++-- mods/rtprelay/Dockerfile | 2 +- mods/simpleauth/Dockerfile | 2 +- mods/simpledata/Dockerfile | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a4aa4df9..f188909c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ## ## Build and pack the service ## -FROM alpine:3.18 as builder +FROM alpine:3.19 as builder LABEL maintainer="Pedro Sanders " ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk @@ -23,7 +23,7 @@ RUN apk add --no-cache --update npm nodejs curl git tini python3 make cmake g++ ## ## Runner ## -FROM alpine:3.18 as runner +FROM alpine:3.19 as runner ARG PKCS_PASSWORD=changeme ARG POSTGRES_USER=postgres diff --git a/mods/connect/Dockerfile b/mods/connect/Dockerfile index 53366c0c4..f32992633 100644 --- a/mods/connect/Dockerfile +++ b/mods/connect/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/dispatcher/Dockerfile b/mods/dispatcher/Dockerfile index 6262a9c00..ee217ae50 100644 --- a/mods/dispatcher/Dockerfile +++ b/mods/dispatcher/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/echo/Dockerfile b/mods/echo/Dockerfile index 3134748a9..257f78976 100644 --- a/mods/echo/Dockerfile +++ b/mods/echo/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/edgeport/Dockerfile b/mods/edgeport/Dockerfile index e70495e54..3e0aa0b2c 100644 --- a/mods/edgeport/Dockerfile +++ b/mods/edgeport/Dockerfile @@ -1,7 +1,7 @@ ## ## Build and pack the service ## -FROM alpine:3.18 as builder +FROM alpine:3.19 as builder LABEL maintainer="Pedro Sanders " ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk @@ -15,7 +15,7 @@ RUN apk add --no-cache --update openjdk11-jdk \ ## ## Runner ## -FROM alpine:3.18 as runner +FROM alpine:3.19 as runner ARG PKCS12_PASSWORD=changeme ARG PATH_TO_CERTS=/etc/routr/certs diff --git a/mods/location/Dockerfile b/mods/location/Dockerfile index 7cc928e0f..6b2f5d142 100644 --- a/mods/location/Dockerfile +++ b/mods/location/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/pgdata/Dockerfile b/mods/pgdata/Dockerfile index 7dcb603a4..cea3fd051 100644 --- a/mods/pgdata/Dockerfile +++ b/mods/pgdata/Dockerfile @@ -1,7 +1,7 @@ ## ## Runner ## -FROM alpine:3.18 as runner +FROM alpine:3.19 as runner LABEL maintainer="Pedro Sanders " ARG CA_CERT_SUBJECT="/CN=Self Signed CA" diff --git a/mods/registry/Dockerfile b/mods/registry/Dockerfile index 7bab54e1e..e10df5a48 100644 --- a/mods/registry/Dockerfile +++ b/mods/registry/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/requester/Dockerfile b/mods/requester/Dockerfile index 8ee7599a6..8def607f4 100644 --- a/mods/requester/Dockerfile +++ b/mods/requester/Dockerfile @@ -1,7 +1,7 @@ ## ## Build and pack the service ## -FROM alpine:3.18 as builder +FROM alpine:3.19 as builder LABEL maintainer="Pedro Sanders " ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk @@ -15,7 +15,7 @@ RUN apk add --no-cache --update openjdk11-jdk \ ## ## Runner ## -FROM alpine:3.18 as runner +FROM alpine:3.19 as runner RUN mkdir -p /opt/routr && apk add --no-cache tini WORKDIR /opt/routr diff --git a/mods/rtprelay/Dockerfile b/mods/rtprelay/Dockerfile index 06d6c06ea..12d1c9722 100644 --- a/mods/rtprelay/Dockerfile +++ b/mods/rtprelay/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/simpleauth/Dockerfile b/mods/simpleauth/Dockerfile index ef3bd5cc6..8d48305f4 100644 --- a/mods/simpleauth/Dockerfile +++ b/mods/simpleauth/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts diff --git a/mods/simpledata/Dockerfile b/mods/simpledata/Dockerfile index 2d6195d4c..8cdc6d3d6 100644 --- a/mods/simpledata/Dockerfile +++ b/mods/simpledata/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.19 LABEL maintainer="Pedro Sanders " COPY . /scripts From 4aeaa324ac91a345dff91785d832aaadf79889cf Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Thu, 28 Dec 2023 18:17:08 -0500 Subject: [PATCH 11/18] chore: add deprecation notice for 'backend:' prefix --- mods/common/src/connect/assertions.ts | 1 - mods/simpledata/src/loaders/peers.ts | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mods/common/src/connect/assertions.ts b/mods/common/src/connect/assertions.ts index 3404c76f1..312a50c1d 100644 --- a/mods/common/src/connect/assertions.ts +++ b/mods/common/src/connect/assertions.ts @@ -17,7 +17,6 @@ * limitations under the License. */ import { BadRequestError } from "../errors" -import { LoadBalancingAlgorithm } from "../types" import { TrunkURI } from "./types" import { hasACLRules, diff --git a/mods/simpledata/src/loaders/peers.ts b/mods/simpledata/src/loaders/peers.ts index 75ef41629..3eef4c17a 100644 --- a/mods/simpledata/src/loaders/peers.ts +++ b/mods/simpledata/src/loaders/peers.ts @@ -18,8 +18,11 @@ * limitations under the License. */ import { CommonConnect as CC } from "@routr/common" +import { getLogger } from "@fonoster/logger" import { findByRef } from "./find" +const logger = getLogger({ service: "simpledata", filePath: __filename }) + export function peersLoader( config: CC.UserConfig, list: CC.UserConfig[] @@ -28,6 +31,13 @@ export function peersLoader( throw new Error("invalid resource type `Peer`") const peer = CC.mapToPeer(config) + + if (peer.aor.startsWith("backend:")) { + logger.warn( + "'backend:' prefix to be removed in upcoming updates. please use 'sip:' for compatibility." + ) + } + peer.credentials = findByRef( config.spec.credentialsRef, list From 895f975a7e414140abb9dec0dd7f77c9e22bc376 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Fri, 29 Dec 2023 16:12:40 -0500 Subject: [PATCH 12/18] chore: wip implement maxContact support for Agents and Peers --- mods/common/src/connect/config.ts | 4 + mods/common/src/connect/mappers/agent.ts | 4 +- mods/common/src/connect/mappers/peer.ts | 4 +- mods/common/src/connect/protos/agents.proto | 14 ++- mods/common/src/connect/protos/peers.proto | 12 ++ mods/common/src/connect/schemas/agent.ts | 10 ++ mods/common/src/connect/schemas/peer.ts | 10 ++ mods/common/src/connect/types.ts | 4 + mods/common/src/protos/location.proto | 1 + mods/connect/src/handlers/register.ts | 8 +- mods/location/src/client.ts | 7 +- mods/location/src/location.ts | 24 +++- mods/location/src/types.ts | 1 + mods/location/src/utils.ts | 6 +- mods/location/test/location.unit.test.ts | 118 +++++++++++++++++--- mods/pgdata/schema.prisma | 4 + mods/pgdata/src/mappers/agent.ts | 4 + mods/pgdata/src/mappers/peer.ts | 4 + mods/pgdata/test/agent.mapper.unit.test.ts | 4 + mods/pgdata/test/peer.mapper.unit.test.ts | 4 + 20 files changed, 216 insertions(+), 31 deletions(-) diff --git a/mods/common/src/connect/config.ts b/mods/common/src/connect/config.ts index 6b1f53def..b8dfe25bb 100644 --- a/mods/common/src/connect/config.ts +++ b/mods/common/src/connect/config.ts @@ -42,6 +42,8 @@ export interface AgentConfig extends ConfigBase { domainRef: string credentialsRef: string privacy: Privacy + maxContacts?: number + expires?: number enabled: boolean } } @@ -54,6 +56,8 @@ export interface PeerConfig extends ConfigBase { credentialsRef?: string contactAddr?: string enabled?: boolean + maxContacts?: number + expires?: number loadBalancing?: { algorithm: LoadBalancingAlgorithm withSessionAffinity: boolean diff --git a/mods/common/src/connect/mappers/agent.ts b/mods/common/src/connect/mappers/agent.ts index e3d345a3f..497df5822 100644 --- a/mods/common/src/connect/mappers/agent.ts +++ b/mods/common/src/connect/mappers/agent.ts @@ -36,6 +36,8 @@ export function mapToAgent(config: AgentConfig): Agent { privacy: config.spec.privacy ?? Privacy.NONE, enabled: config.spec.enabled as boolean, domainRef: config.spec.domainRef, - credentialsRef: config.spec.credentialsRef + credentialsRef: config.spec.credentialsRef, + maxContacts: config.spec.maxContacts, + expires: config.spec.expires } } diff --git a/mods/common/src/connect/mappers/peer.ts b/mods/common/src/connect/mappers/peer.ts index 7a3d606ed..dc7383874 100644 --- a/mods/common/src/connect/mappers/peer.ts +++ b/mods/common/src/connect/mappers/peer.ts @@ -42,6 +42,8 @@ export function mapToPeer(config: PeerConfig): Peer { balancingAlgorithm: normalizeAlgorithm( config.spec.loadBalancing?.algorithm ), - withSessionAffinity: config.spec.loadBalancing?.withSessionAffinity + withSessionAffinity: config.spec.loadBalancing?.withSessionAffinity, + maxContacts: config.spec.maxContacts, + expires: config.spec.expires } } diff --git a/mods/common/src/connect/protos/agents.proto b/mods/common/src/connect/protos/agents.proto index 88fd75b25..aba4c2ced 100644 --- a/mods/common/src/connect/protos/agents.proto +++ b/mods/common/src/connect/protos/agents.proto @@ -64,6 +64,10 @@ message Agent { int32 created_at = 7; // The updated_at timestamp of the Agent int32 updated_at = 8; + // The maximum number of contacts that can be created for this Agent + int32 max_contacts = 12; + // Value to override the expires requested by the Agent + int32 expires = 13; // The domain of the Agent fonoster.routr.connect.domains.v2beta1.Domain domain = 9; // The credentials of the Agent @@ -86,8 +90,12 @@ message CreateAgentRequest { string domain_ref = 5; // Reference to the Credentials of the Agent string credentials_ref = 6; + // The maximum number of contacts that can be created for this Agent + int32 max_contacts = 8; + // Value to override the expires requested by the Agent + int32 expires = 9; // The extended attributes of the Agent - .google.protobuf.Struct extended = 7; + .google.protobuf.Struct extended = 7; } // The request message for the Agents.Update method @@ -104,6 +112,10 @@ message UpdateAgentRequest { string domain_ref = 5; // Reference to the Credentials of the Agent string credentials_ref = 6; + // The maximum number of contacts that can be created for this Agent + int32 max_contacts = 8; + // Value to override the expires requested by the Agent + int32 expires = 9; // The extended attributes of the Agent .google.protobuf.Struct extended = 7; } diff --git a/mods/common/src/connect/protos/peers.proto b/mods/common/src/connect/protos/peers.proto index 030041c4f..556b61991 100644 --- a/mods/common/src/connect/protos/peers.proto +++ b/mods/common/src/connect/protos/peers.proto @@ -79,6 +79,10 @@ message Peer { fonoster.routr.connect.acl.v2beta1.AccessControlList access_control_list = 12; // The credentials of the Peer fonoster.routr.connect.credentials.v2beta1.Credentials credentials = 13; + // The maximum number of contacts that can be created for this Peer + int32 max_contacts = 15; + // Value to override the expires requested by the Peer + int32 expires = 16; // The extended attributes of the Peer .google.protobuf.Struct extended = 14; } @@ -103,6 +107,10 @@ message CreatePeerRequest { string credentials_ref = 8; // The status of the Peer bool enabled = 9; + // The maximum number of contacts that can be created for this Peer + int32 max_contacts = 11; + // Value to override the expires requested by the Peer + int32 expires = 12; // The extended attributes of the Peer .google.protobuf.Struct extended = 10; } @@ -127,6 +135,10 @@ message UpdatePeerRequest { string credentials_ref = 8; // The status of the Peer bool enabled = 9; + // The maximum number of contacts that can be created for this Peer + int32 max_contacts = 11; + // Value to override the expires requested by the Peer + int32 expires = 12; // The extended attributes of the Peer .google.protobuf.Struct extended = 10; } diff --git a/mods/common/src/connect/schemas/agent.ts b/mods/common/src/connect/schemas/agent.ts index e2c9bd0e1..cb653a5c0 100644 --- a/mods/common/src/connect/schemas/agent.ts +++ b/mods/common/src/connect/schemas/agent.ts @@ -63,6 +63,16 @@ export default { description: "The credential the Agent uses to authenticate", type: "string" }, + maxContacts: { + description: + "The maximum number of contacts acceptable for this Agent", + type: "integer" + }, + expires: { + description: + "Time, in seconds, to override the expires requested by the Agent", + type: "integer" + }, enabled: { description: "Whether the Agent is enabled (reserved for future use)", type: "boolean" diff --git a/mods/common/src/connect/schemas/peer.ts b/mods/common/src/connect/schemas/peer.ts index 5e04667ac..e9a253f49 100644 --- a/mods/common/src/connect/schemas/peer.ts +++ b/mods/common/src/connect/schemas/peer.ts @@ -91,6 +91,16 @@ export default { } } }, + maxContacts: { + description: + "The maximum number of contacts acceptable for this Peer", + type: "integer" + }, + expires: { + description: + "Time, in seconds, to override the expires requested by the Peer", + type: "integer" + }, enabled: { description: "Whether the Peer is enabled", type: "boolean" diff --git a/mods/common/src/connect/types.ts b/mods/common/src/connect/types.ts index ddc7029bd..4d5bed4f0 100644 --- a/mods/common/src/connect/types.ts +++ b/mods/common/src/connect/types.ts @@ -70,6 +70,8 @@ export interface Agent extends BaseConnectModel { enabled: boolean domainRef?: string domain?: Domain + maxContacts?: number + expires?: number credentialsRef?: string credentials?: Credentials } @@ -124,6 +126,8 @@ export interface Peer extends BaseConnectModel { accessControlList?: AccessControlList credentialsRef?: string credentials?: Credentials + maxContacts?: number + expires?: number balancingAlgorithm?: LoadBalancingAlgorithm withSessionAffinity?: boolean } diff --git a/mods/common/src/protos/location.proto b/mods/common/src/protos/location.proto index 53bb0533e..05865f5b6 100644 --- a/mods/common/src/protos/location.proto +++ b/mods/common/src/protos/location.proto @@ -60,6 +60,7 @@ message AddRouteRequest { // Address of record for the endpoint or trunk string aor = 1; Route route = 2; + int32 max_contacts = 3; } message FindRoutesRequest { diff --git a/mods/connect/src/handlers/register.ts b/mods/connect/src/handlers/register.ts index da8078bca..8957a20e3 100644 --- a/mods/connect/src/handlers/register.ts +++ b/mods/connect/src/handlers/register.ts @@ -51,11 +51,11 @@ export const handleRegister = ( const auth = { ...request.message.authorization } auth.method = request.method const fromURI = request.message.from.address.uri - const peerOrAgent = await findResource( + const peerOrAgent = (await findResource( apiClient, fromURI.host, fromURI.user - ) + )) as any if (!peerOrAgent) { return res.send(Auth.createForbideenResponse()) @@ -80,10 +80,10 @@ export const handleRegister = ( ) } - // TODO: Needs test await location.addRoute({ aor: "aor" in peerOrAgent ? peerOrAgent.aor : T.getTargetAOR(request), - route: H.createRoute(request) + route: H.createRoute(request), + maxContacts: peerOrAgent.maxContacts }) res.sendRegisterOk(request) diff --git a/mods/location/src/client.ts b/mods/location/src/client.ts index ab9de8317..2e2f7ebe8 100644 --- a/mods/location/src/client.ts +++ b/mods/location/src/client.ts @@ -67,9 +67,10 @@ export default class Location implements ILocationService { * @param {AddRouteRequest} request - Add route request * @param {string} request.aor - AOR of the route * @param {Route} request.route - Route to add + * @param {number} request.maxContacts - Max number of contacts to accept * @return {Promise} */ - public addRoute(request: AddRouteRequest): Promise { + public async addRoute(request: AddRouteRequest): Promise { return container( this, request, @@ -84,7 +85,7 @@ export default class Location implements ILocationService { * @param {string} request.aor - AOR of the route * @param {Map} request.labels - Optional Route labels (reserved for future use) * @param {object} request.backend - Optional Route backend (reserved for future use) - * @return {Promise} + * @return {Promise} */ public async findRoutes(request: FindRoutesRequest): Promise { return ( @@ -101,7 +102,7 @@ export default class Location implements ILocationService { * @param {string} request.aor - AOR of the route * @return {Promise} */ - public removeRoutes(request: RemoveRoutesRequest): Promise { + public async removeRoutes(request: RemoveRoutesRequest): Promise { return container( this, request, diff --git a/mods/location/src/location.ts b/mods/location/src/location.ts index 61fcd19a9..2ad416dbc 100644 --- a/mods/location/src/location.ts +++ b/mods/location/src/location.ts @@ -18,6 +18,7 @@ * limitations under the License. */ import { UnsupportedSchema } from "./errors" +import { CommonErrors as CE } from "@routr/common" import { AddRouteRequest, FindRoutesRequest, @@ -51,14 +52,33 @@ export default class Location implements ILocationService { } /** @inheritdoc */ - public addRoute(request: AddRouteRequest): Promise { + public async addRoute(request: AddRouteRequest): Promise { if ( !request.aor.startsWith(AOR_SCHEME.SIP) && !request.aor.startsWith(AOR_SCHEME.BACKEND) ) { throw new UnsupportedSchema(request.aor) } - return this.store.put(request.aor, request.route) + + const existingRoutes = await this.store.get(request.aor) + const routeExists = existingRoutes.some( + (route) => + route.user === request.route.user && + route.host === request.route.host && + route.port === request.route.port && + route.transport === request.route.transport + ) + + if ( + !routeExists && + request.maxContacts !== undefined && + existingRoutes.length >= request.maxContacts + ) { + throw new CE.BadRequestError( + `exceeds maximum of ${request.maxContacts} allowed contacts` + ) + } + return await this.store.put(request.aor, request.route) } /** @inheritdoc */ diff --git a/mods/location/src/types.ts b/mods/location/src/types.ts index 50074a80c..aab8eb209 100644 --- a/mods/location/src/types.ts +++ b/mods/location/src/types.ts @@ -33,6 +33,7 @@ export interface ILocatorStore { export interface AddRouteRequest { aor: string route: Route + maxContacts?: number } export interface FindRoutesRequest { diff --git a/mods/location/src/utils.ts b/mods/location/src/utils.ts index 56b0e3b90..2cf814c65 100644 --- a/mods/location/src/utils.ts +++ b/mods/location/src/utils.ts @@ -29,7 +29,7 @@ export const expiredFilter = (r: Route) => r.expires - (Date.now() - r.registeredOn) / 1000 > 0 export const duplicateFilter = (r1: Route, r2: Route) => - !(r1.host === r2.host && r1.port === r2.port) + !(r1.host === r2.host && r1.port === r2.port && r1.transport === r2.transport) export const mergeKeyValue = (map: Map) => Array.from(map).map((l) => l[0] + l[1]) @@ -53,9 +53,9 @@ export const getServiceInfo = ( // eslint-disable-next-line @typescript-eslint/no-explicit-any service: (LOCATION_OBJECT_PROTO as any).Location.service, handlers: { - addRoute: (call: CT.GrpcCall, callback) => { + addRoute: async (call: CT.GrpcCall, callback) => { try { - locator.addRoute(call.request as AddRouteRequest) + await locator.addRoute(call.request as AddRouteRequest) callback(null, {}) } catch (e) { callback(e, null) diff --git a/mods/location/test/location.unit.test.ts b/mods/location/test/location.unit.test.ts index 2c23bdb58..8a1b865e0 100644 --- a/mods/location/test/location.unit.test.ts +++ b/mods/location/test/location.unit.test.ts @@ -41,8 +41,14 @@ describe("@routr/location", () => { ["region", "us-east01"] ]) - locator.addRoute({ aor: "sip:1001@sip.local", route: Routes.simpleRoute01 }) - locator.addRoute({ aor: "sip:1001@sip.local", route: Routes.simpleRoute02 }) + await locator.addRoute({ + aor: "sip:1001@sip.local", + route: Routes.simpleRoute01 + }) + await locator.addRoute({ + aor: "sip:1001@sip.local", + route: Routes.simpleRoute02 + }) const findRoutesRequest1 = { callId: "3848276298220188511", @@ -72,23 +78,23 @@ describe("@routr/location", () => { it("find next backend using least-sessions", async () => { const locator = new Locator(new MemoryStore()) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute01 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute02 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute03 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute04 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_ls@sip.local", route: Routes.voiceBackendRoute05 }) @@ -109,23 +115,23 @@ describe("@routr/location", () => { it("find next backend using round-robin", async () => { const locator = new Locator(new MemoryStore()) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute05 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute04 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute03 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute02 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:voice_rr@sip.local", route: Routes.voiceBackendRoute01 }) @@ -217,15 +223,15 @@ describe("@routr/location", () => { it("find next backend with session affinity enabled", async () => { const locator = new Locator(new MemoryStore()) - locator.addRoute({ + await locator.addRoute({ aor: "sip:conference@sip.local", route: Routes.conferenceWithExpiredRoute }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:conference@sip.local", route: Routes.conferenceBackendRoute02 }) - locator.addRoute({ + await locator.addRoute({ aor: "sip:conference@sip.local", route: Routes.conferenceBackendRoute01 }) @@ -258,9 +264,89 @@ describe("@routr/location", () => { .to.be.equal("conference01") }) + it("checks if maxContacts has been reached (passing a different route)", async () => { + const locator = new Locator(new MemoryStore()) + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute01, + maxContacts: 1 + }) + + try { + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute02, + maxContacts: 1 + }) + throw new Error("Test failed - no error thrown") + } catch (error) { + expect(error.message).to.equal("exceeds maximum of 1 allowed contacts") + } + }) + + it("checks if maxContacts has been reached (passing the same route)", async () => { + const locator = new Locator(new MemoryStore()) + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute01, + maxContacts: 1 + }) + + // It should not throw an error since it is the same route + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute01, + maxContacts: 1 + }) + + try { + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute02, + maxContacts: 1 + }) + throw new Error("Test failed - no error thrown") + } catch (error) { + expect(error.message).to.equal("exceeds maximum of 1 allowed contacts") + } + }) + + it("checks if maxContacts has been reached (combining routes)", async () => { + const locator = new Locator(new MemoryStore()) + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute01, + maxContacts: 2 + }) + + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute01, + maxContacts: 2 + }) + + // It should not throw an error since two of the routes are the same + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute02, + maxContacts: 2 + }) + + try { + await await locator.addRoute({ + aor: "sip:voice@sip.local", + route: Routes.voiceBackendRoute03, + maxContacts: 1 + }) + throw new Error("Test failed - no error thrown") + } catch (error) { + expect(error.message).to.equal("exceeds maximum of 1 allowed contacts") + } + }) + it("find next backend using deprecated 'backend:' schema", async () => { const locator = new Locator(new MemoryStore()) - locator.addRoute({ + await locator.addRoute({ aor: "backend:voice_ls", route: Routes.voiceBackendRoute01 }) diff --git a/mods/pgdata/schema.prisma b/mods/pgdata/schema.prisma index d4b42e4fe..257524301 100644 --- a/mods/pgdata/schema.prisma +++ b/mods/pgdata/schema.prisma @@ -25,6 +25,8 @@ model Agent { name String @db.VarChar(60) username String @unique @db.VarChar(60) privacy Privacy @default(NONE) + maxContacts Int @map("max_contacts") + expires Int enabled Boolean @default(true) createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(3) @@ -50,6 +52,8 @@ model Peer { contactAddr String? @map("contact_addr") @db.VarChar(20) balancingAlgorithm LoadBalancingAlgorithm? @map("balancing_algorithm") withSessionAffinity Boolean @default(false) @map("with_session_affinity") + maxContacts Int @map("max_contacts") + expires Int enabled Boolean @default(true) createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(3) diff --git a/mods/pgdata/src/mappers/agent.ts b/mods/pgdata/src/mappers/agent.ts index e255c2d46..0d0dc0354 100644 --- a/mods/pgdata/src/mappers/agent.ts +++ b/mods/pgdata/src/mappers/agent.ts @@ -87,6 +87,8 @@ export class AgentManager extends EntityManager { updatedAt: this.agent.updatedAt ? new Date(this.agent.updatedAt * 1000) : undefined, + maxContacts: this.agent.maxContacts, + expires: this.agent.expires, extended: this.agent.extended || {} } } @@ -104,6 +106,8 @@ export class AgentManager extends EntityManager { credentialsRef: agent.credentialsRef, domain: DomainManager.mapToDto(agent.domain), credentials: CredentialsManager.mapToDto(agent.credentials), + maxContacts: agent.maxContacts, + expires: agent.expires, extended: (agent.extended || {}) as JsonObject, createdAt: agent.createdAt.getTime() / 1000, updatedAt: agent.updatedAt.getTime() / 1000 diff --git a/mods/pgdata/src/mappers/peer.ts b/mods/pgdata/src/mappers/peer.ts index 50ca5a54d..adf3c11a2 100644 --- a/mods/pgdata/src/mappers/peer.ts +++ b/mods/pgdata/src/mappers/peer.ts @@ -87,6 +87,8 @@ export class PeerManager extends EntityManager { updatedAt: this.peer.updatedAt ? new Date(this.peer.updatedAt * 1000) : undefined, + maxContacts: this.peer.maxContacts, + expires: this.peer.expires, extended: this.peer.extended || {} } } @@ -110,6 +112,8 @@ export class PeerManager extends EntityManager { accessControlList: ACLManager.mapToDto(peer.accessControlList), createdAt: peer.createdAt.getTime() / 1000, updatedAt: peer.updatedAt.getTime() / 1000, + maxContacts: peer.maxContacts, + expires: peer.expires, extended: peer.extended as JsonObject } : undefined diff --git a/mods/pgdata/test/agent.mapper.unit.test.ts b/mods/pgdata/test/agent.mapper.unit.test.ts index e9ee87e2b..7d21c1995 100644 --- a/mods/pgdata/test/agent.mapper.unit.test.ts +++ b/mods/pgdata/test/agent.mapper.unit.test.ts @@ -46,6 +46,8 @@ describe("@routr/pgdata/mappers/agent", () => { extended: { test: "test" }, + maxContacts: 1, + expires: 3600, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000 } @@ -85,6 +87,8 @@ describe("@routr/pgdata/mappers/agent", () => { }, createdAt: new Date(), updatedAt: new Date(), + maxContacts: 1, + expires: 3600, domain: { apiVersion: "v2" as APIVersion, ref: "domain-01", diff --git a/mods/pgdata/test/peer.mapper.unit.test.ts b/mods/pgdata/test/peer.mapper.unit.test.ts index f475083df..186d04931 100644 --- a/mods/pgdata/test/peer.mapper.unit.test.ts +++ b/mods/pgdata/test/peer.mapper.unit.test.ts @@ -48,6 +48,8 @@ describe("@routr/pgdata/mappers/peer", () => { enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, + maxContacts: 1, + expires: 3600, extended: { test: "test" } @@ -92,6 +94,8 @@ describe("@routr/pgdata/mappers/peer", () => { test: "test" } }, + maxContacts: 1, + expires: 3600, accessControlListRef: "acl-01", accessControlList: { apiVersion: "v2" as APIVersion, From a7a9dd5c72b9c9cab06af7ed001d98f0b631ba1e Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Fri, 19 Jan 2024 15:51:19 -0400 Subject: [PATCH 13/18] chore: wip maxContact Peer support --- mods/common/src/auth.ts | 2 ++ mods/connect/src/handlers/register.ts | 20 +++++++++++++------- mods/location/src/client.ts | 2 ++ mods/location/src/utils.ts | 9 +++++---- mods/processor/src/response.ts | 15 +++++++++++++++ mods/registry/src/service.ts | 2 +- 6 files changed, 38 insertions(+), 12 deletions(-) diff --git a/mods/common/src/auth.ts b/mods/common/src/auth.ts index 6dd4ddaab..5385bb73b 100644 --- a/mods/common/src/auth.ts +++ b/mods/common/src/auth.ts @@ -91,6 +91,7 @@ export const createUnauthorizedResponseWithoutChallenge = ( } } +// FIXME: Doesn't belong in Auth module export const createServerInternalErrorResponse = ( metadata?: Record ) => { @@ -103,6 +104,7 @@ export const createServerInternalErrorResponse = ( } } +// FIXME: Doesn't belong in Auth module export const createForbideenResponse = (metadata?: Record) => { return { metadata, diff --git a/mods/connect/src/handlers/register.ts b/mods/connect/src/handlers/register.ts index 8957a20e3..8c57ea3b6 100644 --- a/mods/connect/src/handlers/register.ts +++ b/mods/connect/src/handlers/register.ts @@ -80,13 +80,19 @@ export const handleRegister = ( ) } - await location.addRoute({ - aor: "aor" in peerOrAgent ? peerOrAgent.aor : T.getTargetAOR(request), - route: H.createRoute(request), - maxContacts: peerOrAgent.maxContacts - }) - - res.sendRegisterOk(request) + try { + await location.addRoute({ + aor: "aor" in peerOrAgent ? peerOrAgent.aor : T.getTargetAOR(request), + route: H.createRoute(request), + maxContacts: peerOrAgent.maxContacts + }) + res.sendRegisterOk(request) + } catch (e) { + // TODO: If it is a bad request then we should downgrade to verbose + logger.error(e) + // TODO: Check if forbidden error + res.sendForbidden(e.details) + } } else if (hasXConnectObjectHeader(request)) { const connectToken = E.getHeaderValue( request, diff --git a/mods/location/src/client.ts b/mods/location/src/client.ts index 2e2f7ebe8..626d33fae 100644 --- a/mods/location/src/client.ts +++ b/mods/location/src/client.ts @@ -32,6 +32,8 @@ const container = (self: Location, request: RequestType, name: string) => { self.location[name](request, (err: { code: number }, response: unknown) => { if (err?.code === grpc.status.UNAVAILABLE) { return reject(new CE.ServiceUnavailableError(self.config.addr)) + } else if (err?.code) { + return reject(err) } resolve(response) }) diff --git a/mods/location/src/utils.ts b/mods/location/src/utils.ts index 2cf814c65..f0b0c5279 100644 --- a/mods/location/src/utils.ts +++ b/mods/location/src/utils.ts @@ -66,11 +66,12 @@ export const getServiceInfo = ( const routes = await locator.findRoutes( call.request as FindRoutesRequest ) - if (routes.length === 0) + + if (routes.length === 0) { throw new NotRoutesFoundForAOR(call.request.aor) - callback(null, { - routes: routes - }) + } + + callback(null, { routes }) } catch (e) { callback(e, null) } diff --git a/mods/processor/src/response.ts b/mods/processor/src/response.ts index dd08f1836..ae62f1419 100644 --- a/mods/processor/src/response.ts +++ b/mods/processor/src/response.ts @@ -142,6 +142,21 @@ export default class Response { ) } + /** + * Sends a forbidden response. + * + * @param {string} message - Optional message to be sent. + */ + sendForbidden(message?: string) { + this.callback( + null, + buildResponse({ + code: CT.ResponseType.FORBIDDEN, + reasonPhrase: message || "Forbidden" + }) + ) + } + /** * Sends a response with a SIP Message. * diff --git a/mods/registry/src/service.ts b/mods/registry/src/service.ts index 13ced8911..afd9683ca 100644 --- a/mods/registry/src/service.ts +++ b/mods/registry/src/service.ts @@ -85,7 +85,7 @@ export default function registryService(config: RegistryConfig) { const results = await Promise.allSettled(registryInvocations) results?.forEach(async (result) => { - logger.verbose("processing registration result", { result }) + logger.silly("processing registration result", { result }) if (result.status === "rejected") { logger.error("request rejected", result.reason) From af79ef1746d86594b1b23ca5d7ec4f4e13fa37c5 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Sun, 11 Feb 2024 13:23:51 -0500 Subject: [PATCH 14/18] chore: fix linting issues --- mods/common/src/connect/client.ts | 6 +++--- mods/common/src/helper.ts | 6 +++--- mods/connect/src/handlers/register.ts | 2 +- mods/connect/src/router.ts | 11 +++++++---- mods/pgdata/src/api/delete.ts | 3 +-- mods/pgdata/src/api/find.ts | 2 +- mods/pgdata/src/api/get.ts | 2 +- mods/pgdata/src/api/list.ts | 2 +- mods/pgdata/src/api/update.ts | 2 +- mods/pgdata/src/mappers/agent.ts | 2 +- mods/pgdata/src/mappers/manager.ts | 5 ++--- mods/pgdata/src/mappers/utils.ts | 2 +- package-lock.json | 9 ++++++--- 13 files changed, 29 insertions(+), 25 deletions(-) diff --git a/mods/common/src/connect/client.ts b/mods/common/src/connect/client.ts index 7d14b30bb..5cb460075 100644 --- a/mods/common/src/connect/client.ts +++ b/mods/common/src/connect/client.ts @@ -19,7 +19,7 @@ /* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import protoLoader = require("@grpc/proto-loader") -import { toPascaleCase } from "../helper" +import { toPascalCase } from "../helper" import { Kind, KindWithoutUnknown } from "./types" const protoOptions = { @@ -63,7 +63,7 @@ export function createConnectClient(options: { ) default: return new base[options.kind + "s"].v2beta1[ - toPascaleCase(options.kind) + "s" + toPascalCase(options.kind) + "s" ](options.apiAddr, options.credentials) } } @@ -79,6 +79,6 @@ export function createConnectService(kind: KindWithoutUnknown) { case Kind.CREDENTIALS: return base.credentials.v2beta1.CredentialsService.service default: - return base[kind + "s"].v2beta1[toPascaleCase(kind) + "s"].service + return base[kind + "s"].v2beta1[toPascalCase(kind) + "s"].service } } diff --git a/mods/common/src/helper.ts b/mods/common/src/helper.ts index 471b95b68..6f7d000ef 100644 --- a/mods/common/src/helper.ts +++ b/mods/common/src/helper.ts @@ -108,10 +108,10 @@ export const readConfigFile = (path: string): Record => { } } -export const toPascaleCase = (str: string) => { +export const toPascalCase = (str: string): string => { return str - .replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => { - return index === 0 ? word.toUpperCase() : word.toUpperCase() + .replace(/(?:^\w|[A-Z]|\b\w)/g, (word) => { + return word.toUpperCase() }) .replace(/\s+/g, "") } diff --git a/mods/connect/src/handlers/register.ts b/mods/connect/src/handlers/register.ts index 8c57ea3b6..579266d4d 100644 --- a/mods/connect/src/handlers/register.ts +++ b/mods/connect/src/handlers/register.ts @@ -55,7 +55,7 @@ export const handleRegister = ( apiClient, fromURI.host, fromURI.user - )) as any + )) as CC.Peer | CC.Agent if (!peerOrAgent) { return res.send(Auth.createForbideenResponse()) diff --git a/mods/connect/src/router.ts b/mods/connect/src/router.ts index d185c727d..1cef18a4f 100644 --- a/mods/connect/src/router.ts +++ b/mods/connect/src/router.ts @@ -40,11 +40,10 @@ import { hasXConnectObjectHeader } from "./utils" import { MessageRequest, Target as T, Extensions as E } from "@routr/processor" -import { ILocationService } from "@routr/location" +import { ILocationService, Backend } from "@routr/location" import { UnsuportedRoutingError } from "./errors" import { getLogger } from "@fonoster/logger" import { checkAccess } from "./access" -import { Backend } from "@routr/location" const logger = getLogger({ service: "connect", filePath: __filename }) const jwtVerifier = getVerifierImpl() @@ -84,7 +83,7 @@ export function router(location: ILocationService, apiClient: CC.APIClient) { caller = { apiVersion: CC.APIVersion.V2, - ref: payload.ref as string, + ref: payload.ref, name: request.message.from.address.displayName ?? CT.ANONYMOUS, domain: domain, domainRef: payload.domainRef, @@ -155,7 +154,11 @@ export function router(location: ILocationService, apiClient: CC.APIClient) { } } - const result = (direction: RoutingDirection, route: Route, extended: any) => + const result = ( + direction: RoutingDirection, + route: Route, + extended: Record + ) => route ? { direction, diff --git a/mods/pgdata/src/api/delete.ts b/mods/pgdata/src/api/delete.ts index c2ff4c6e1..f7a21eb70 100644 --- a/mods/pgdata/src/api/delete.ts +++ b/mods/pgdata/src/api/delete.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,13 +17,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { PrismaClientInitializationError } from "@prisma/client/runtime/library" import { CommonTypes as CT, CommonErrors as CE } from "@routr/common" import { PrismaOperation } from "../types" -// TODO: Fix the error handling. We should return the error export function del(operation: PrismaOperation) { return async (call: CT.GrpcCall, callback: CT.GrpcCallback) => { if (!call.request.ref) { diff --git a/mods/pgdata/src/api/find.ts b/mods/pgdata/src/api/find.ts index 14ea517b5..c7acf11db 100644 --- a/mods/pgdata/src/api/find.ts +++ b/mods/pgdata/src/api/find.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { JsonObject, struct } from "pb-util" import { CommonTypes as CT, CommonConnect as CC } from "@routr/common" diff --git a/mods/pgdata/src/api/get.ts b/mods/pgdata/src/api/get.ts index 988e51bd3..40464312b 100644 --- a/mods/pgdata/src/api/get.ts +++ b/mods/pgdata/src/api/get.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { JsonObject, struct } from "pb-util" import { diff --git a/mods/pgdata/src/api/list.ts b/mods/pgdata/src/api/list.ts index 5a4ca31a6..e6d25e0f3 100644 --- a/mods/pgdata/src/api/list.ts +++ b/mods/pgdata/src/api/list.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { JsonObject, struct } from "pb-util" import { CommonTypes as CT, CommonConnect as CC } from "@routr/common" diff --git a/mods/pgdata/src/api/update.ts b/mods/pgdata/src/api/update.ts index 6729e859c..8bbd07245 100644 --- a/mods/pgdata/src/api/update.ts +++ b/mods/pgdata/src/api/update.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import { JsonObject, struct } from "pb-util" import { CommonTypes as CT, diff --git a/mods/pgdata/src/mappers/agent.ts b/mods/pgdata/src/mappers/agent.ts index 0d0dc0354..0072ca237 100644 --- a/mods/pgdata/src/mappers/agent.ts +++ b/mods/pgdata/src/mappers/agent.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import { Agent as AgentPrismaModel, APIVersion, diff --git a/mods/pgdata/src/mappers/manager.ts b/mods/pgdata/src/mappers/manager.ts index 1cf647673..7d0ef50ee 100644 --- a/mods/pgdata/src/mappers/manager.ts +++ b/mods/pgdata/src/mappers/manager.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -18,10 +19,8 @@ */ import { JsonObject } from "pb-util/build" -/* eslint-disable require-jsdoc */ export abstract class EntityManager { - static includeFields: () => JsonObject + static readonly includeFields: () => JsonObject abstract validOrThrowCreate(): void abstract validOrThrowUpdate(): void - // abstract mapToPrisma(): T } diff --git a/mods/pgdata/src/mappers/utils.ts b/mods/pgdata/src/mappers/utils.ts index 04e964a63..267afd70d 100644 --- a/mods/pgdata/src/mappers/utils.ts +++ b/mods/pgdata/src/mappers/utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable require-jsdoc */ /* * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { ACLManager } from "./acl" import { AgentManager } from "./agent" diff --git a/package-lock.json b/package-lock.json index 33fc9922e..e87cd74e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9805,9 +9805,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -11908,6 +11908,9 @@ } }, "node_modules/jsdoc-parse": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-6.2.1.tgz", + "integrity": "sha512-9viGRUUtWOk/G4V0+nQ6rfLucz5plxh5I74WbNSNm9h9NWugCDVX4jbG8hZP9QqKGpdTPDE+qJXzaYNos3wqTA==", "version": "6.2.1", "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-6.2.1.tgz", "integrity": "sha512-9viGRUUtWOk/G4V0+nQ6rfLucz5plxh5I74WbNSNm9h9NWugCDVX4jbG8hZP9QqKGpdTPDE+qJXzaYNos3wqTA==", From 0404f6b64a388ffc067790f314d340a6ce020b69 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Sun, 11 Feb 2024 13:44:41 -0500 Subject: [PATCH 15/18] chore: update copyright year to 2024 --- .scripts/tag-changelog-config.js | 2 +- docs/docusaurus.config.js | 2 +- mods/common/src/assertions.ts | 2 +- mods/common/src/auth.ts | 2 +- mods/common/src/connect/api/client.ts | 2 +- mods/common/src/connect/api/index.ts | 2 +- mods/common/src/connect/api/types.ts | 2 +- mods/common/src/connect/assertions.ts | 2 +- mods/common/src/connect/client.ts | 4 ++-- mods/common/src/connect/config.ts | 2 +- mods/common/src/connect/connect_error.ts | 2 +- mods/common/src/connect/index.ts | 2 +- mods/common/src/connect/mappers/acl.ts | 2 +- mods/common/src/connect/mappers/agent.ts | 2 +- mods/common/src/connect/mappers/assertions.ts | 2 +- mods/common/src/connect/mappers/credentials.ts | 2 +- mods/common/src/connect/mappers/domain.ts | 2 +- mods/common/src/connect/mappers/index.ts | 2 +- mods/common/src/connect/mappers/number.ts | 2 +- mods/common/src/connect/mappers/peer.ts | 2 +- mods/common/src/connect/mappers/trunk.ts | 2 +- mods/common/src/connect/protos/acl.proto | 2 +- mods/common/src/connect/protos/agents.proto | 2 +- mods/common/src/connect/protos/credentials.proto | 2 +- mods/common/src/connect/protos/domains.proto | 2 +- mods/common/src/connect/protos/numbers.proto | 2 +- mods/common/src/connect/protos/peers.proto | 2 +- mods/common/src/connect/protos/trunks.proto | 2 +- mods/common/src/connect/schemas/acl.ts | 2 +- mods/common/src/connect/schemas/agent.ts | 2 +- mods/common/src/connect/schemas/crendentials.ts | 2 +- mods/common/src/connect/schemas/domain.ts | 2 +- mods/common/src/connect/schemas/index.ts | 2 +- mods/common/src/connect/schemas/number.ts | 2 +- mods/common/src/connect/schemas/peer.ts | 2 +- mods/common/src/connect/schemas/trunk.ts | 2 +- mods/common/src/connect/schemas/validators.ts | 2 +- mods/common/src/connect/types.ts | 2 +- mods/common/src/connect/validations.ts | 2 +- mods/common/src/envs.ts | 2 +- mods/common/src/errors.ts | 2 +- mods/common/src/helper.ts | 2 +- mods/common/src/index.ts | 2 +- mods/common/src/ip_utils.ts | 2 +- mods/common/src/protos/common.proto | 2 +- mods/common/src/protos/location.proto | 2 +- mods/common/src/protos/processor.proto | 2 +- mods/common/src/protos/requester.proto | 2 +- mods/common/src/protos/sipmessage.proto | 2 +- mods/common/src/protos/verifier.proto | 2 +- mods/common/src/redis.ts | 2 +- mods/common/src/requester/grpc_client.ts | 2 +- mods/common/src/requester/index.ts | 2 +- mods/common/src/service.ts | 2 +- mods/common/src/tracer.ts | 2 +- mods/common/src/types.ts | 2 +- mods/common/src/verifier/grpc_client.ts | 2 +- mods/common/src/verifier/index.ts | 2 +- mods/common/src/verifier/types.ts | 2 +- mods/common/src/verifier/verifier.ts | 2 +- mods/common/test/common.unit.test.ts | 2 +- mods/common/test/mappers.unit.test.ts | 2 +- mods/connect/src/access.ts | 2 +- mods/connect/src/assertions.ts | 2 +- mods/connect/src/envs.ts | 2 +- mods/connect/src/errors.ts | 2 +- mods/connect/src/handlers/register.ts | 2 +- mods/connect/src/handlers/registry.ts | 2 +- mods/connect/src/handlers/request.ts | 2 +- mods/connect/src/index.ts | 2 +- mods/connect/src/router.ts | 2 +- mods/connect/src/runner.ts | 2 +- mods/connect/src/service.ts | 2 +- mods/connect/src/tailor.ts | 2 +- mods/connect/src/tracer.ts | 2 +- mods/connect/src/types.ts | 2 +- mods/connect/src/utils.ts | 2 +- mods/connect/test/access.unit.test.ts | 2 +- mods/connect/test/connect.unit.test.ts | 2 +- mods/connect/test/examples.ts | 2 +- mods/connect/test/mock_apis.ts | 2 +- mods/connect/test/utils.unit.test.ts | 2 +- mods/ctl/src/base.ts | 4 ++-- mods/ctl/src/commands/acl/create.ts | 6 +++--- mods/ctl/src/commands/acl/delete.ts | 2 +- mods/ctl/src/commands/acl/describe.ts | 2 +- mods/ctl/src/commands/acl/get.ts | 2 +- mods/ctl/src/commands/acl/update.ts | 6 +++--- mods/ctl/src/commands/agents/create.ts | 2 +- mods/ctl/src/commands/agents/delete.ts | 6 +++--- mods/ctl/src/commands/agents/describe.ts | 6 +++--- mods/ctl/src/commands/agents/get.ts | 8 ++++---- mods/ctl/src/commands/agents/update.ts | 8 ++++---- mods/ctl/src/commands/credentials/create.ts | 6 +++--- mods/ctl/src/commands/credentials/delete.ts | 2 +- mods/ctl/src/commands/credentials/describe.ts | 6 +++--- mods/ctl/src/commands/credentials/get.ts | 6 +++--- mods/ctl/src/commands/credentials/update.ts | 8 ++++---- mods/ctl/src/commands/domains/create.ts | 6 +++--- mods/ctl/src/commands/domains/delete.ts | 6 +++--- mods/ctl/src/commands/domains/describe.ts | 6 +++--- mods/ctl/src/commands/domains/get.ts | 8 ++++---- mods/ctl/src/commands/domains/update.ts | 8 ++++---- mods/ctl/src/commands/numbers/create.ts | 6 +++--- mods/ctl/src/commands/numbers/delete.ts | 6 +++--- mods/ctl/src/commands/numbers/describe.ts | 6 +++--- mods/ctl/src/commands/numbers/get.ts | 8 ++++---- mods/ctl/src/commands/numbers/update.ts | 8 ++++---- mods/ctl/src/commands/peers/create.ts | 6 +++--- mods/ctl/src/commands/peers/delete.ts | 6 +++--- mods/ctl/src/commands/peers/describe.ts | 6 +++--- mods/ctl/src/commands/peers/get.ts | 8 ++++---- mods/ctl/src/commands/peers/update.ts | 8 ++++---- mods/ctl/src/commands/trunks/create.ts | 6 +++--- mods/ctl/src/commands/trunks/delete.ts | 2 +- mods/ctl/src/commands/trunks/describe.ts | 2 +- mods/ctl/src/commands/trunks/get.ts | 8 ++++---- mods/ctl/src/commands/trunks/update.ts | 8 ++++---- mods/ctl/src/countries.ts | 2 +- mods/ctl/src/delete.ts | 4 ++-- mods/ctl/src/help.ts | 6 ++---- mods/ctl/src/index.ts | 2 +- mods/ctl/src/utils.ts | 2 +- mods/ctl/src/validators.ts | 2 +- mods/ctl/test/commands/acl/get.test.ts | 2 +- mods/dispatcher/src/config/get_config.ts | 2 +- mods/dispatcher/src/config/schema.ts | 2 +- mods/dispatcher/src/connections.ts | 2 +- mods/dispatcher/src/envs.ts | 2 +- mods/dispatcher/src/errors.ts | 2 +- mods/dispatcher/src/find_processor.ts | 2 +- mods/dispatcher/src/index.ts | 2 +- mods/dispatcher/src/processor.ts | 2 +- mods/dispatcher/src/run_middlewares.ts | 2 +- mods/dispatcher/src/run_processor.ts | 2 +- mods/dispatcher/src/runner.ts | 2 +- mods/dispatcher/src/service.ts | 2 +- mods/dispatcher/src/tracer.ts | 2 +- mods/dispatcher/src/types.ts | 2 +- mods/dispatcher/src/util.ts | 2 +- mods/dispatcher/test/dispatcher.unit.test.ts | 2 +- mods/echo/src/envs.ts | 2 +- mods/echo/src/runner.ts | 2 +- mods/echo/src/tracer.ts | 2 +- mods/echo/test/echo.unit.test.ts | 2 +- mods/edgeport/graaljstest/config.ts | 2 +- mods/edgeport/graaljstest/config.unit.test.ts | 2 +- mods/edgeport/graaljstest/edgeport.unit.test.ts | 2 +- mods/edgeport/src/assertions.ts | 2 +- mods/edgeport/src/config/fs.ts | 2 +- mods/edgeport/src/config/get_config.ts | 2 +- mods/edgeport/src/config/schema.ts | 2 +- mods/edgeport/src/create_listening_points.ts | 2 +- mods/edgeport/src/create_sip_provider.ts | 2 +- mods/edgeport/src/create_sip_stack.ts | 2 +- mods/edgeport/src/edgeport.ts | 2 +- mods/edgeport/src/envs.ts | 2 +- .../src/main/java/io/routr/GRPCSipListener.java | 2 +- .../src/main/java/io/routr/HangupCauses.java | 2 +- .../edgeport/src/main/java/io/routr/HealthCheck.java | 2 +- mods/edgeport/src/main/java/io/routr/Launcher.java | 2 +- .../src/main/java/io/routr/MapProxyObject.java | 2 +- .../main/java/io/routr/events/ConsolePublisher.java | 2 +- .../src/main/java/io/routr/events/EventTypes.java | 2 +- .../main/java/io/routr/events/EventsPublisher.java | 2 +- .../src/main/java/io/routr/events/NATSPublisher.java | 2 +- .../main/java/io/routr/headers/AddressConverter.java | 2 +- .../io/routr/headers/AuthorizationConverter.java | 2 +- .../main/java/io/routr/headers/CallIDConverter.java | 2 +- .../main/java/io/routr/headers/ContactConverter.java | 2 +- .../io/routr/headers/ContentLengthConverter.java | 2 +- .../src/main/java/io/routr/headers/Converter.java | 2 +- .../main/java/io/routr/headers/ExpiresConverter.java | 2 +- .../java/io/routr/headers/ExtensionConverter.java | 2 +- .../main/java/io/routr/headers/FromConverter.java | 2 +- .../java/io/routr/headers/MaxForwardsConverter.java | 2 +- .../main/java/io/routr/headers/MessageConverter.java | 2 +- .../src/main/java/io/routr/headers/ProtoMapping.java | 2 +- .../java/io/routr/headers/RecordRouteConverter.java | 2 +- .../src/main/java/io/routr/headers/ResponseCode.java | 2 +- .../main/java/io/routr/headers/RouteConverter.java | 2 +- .../main/java/io/routr/headers/SipURIConverter.java | 2 +- .../src/main/java/io/routr/headers/ToConverter.java | 2 +- .../src/main/java/io/routr/headers/ViaConverter.java | 2 +- .../io/routr/headers/WWWAuthenticateConverter.java | 2 +- .../main/java/io/routr/utils/AccountManagerImpl.java | 2 +- .../java/io/routr/utils/UserCredentialsImpl.java | 2 +- mods/edgeport/src/runner.ts | 2 +- mods/edgeport/src/server_properties.ts | 2 +- .../src/test/java/io/routr/ConverterTests.java | 2 +- .../src/test/java/io/routr/ResponseCodeTests.java | 2 +- mods/edgeport/src/test/java/io/routr/UtilsTests.java | 2 +- mods/edgeport/src/tracer.ts | 2 +- mods/edgeport/src/types.ts | 2 +- mods/location/src/client.ts | 2 +- mods/location/src/config/get_config.ts | 2 +- mods/location/src/config/schema.ts | 2 +- mods/location/src/envs.ts | 2 +- mods/location/src/errors.ts | 2 +- mods/location/src/helper.ts | 12 ++++++++---- mods/location/src/index.ts | 2 +- mods/location/src/location.ts | 7 +++---- mods/location/src/memory_store.ts | 2 +- mods/location/src/redis_store.ts | 2 +- mods/location/src/runner.ts | 2 +- mods/location/src/service.ts | 2 +- mods/location/src/tracer.ts | 2 +- mods/location/src/types.ts | 2 +- mods/location/src/utils.ts | 2 +- mods/location/test/location.unit.test.ts | 2 +- mods/location/test/memory_store.unit.test.ts | 2 +- mods/location/test/redis_store.int.test.ts | 2 +- mods/location/test/route_examples.ts | 2 +- mods/location/test/utils.unit.test.ts | 2 +- mods/one/src/configs.ts | 2 +- mods/one/src/envs.ts | 2 +- mods/one/src/runner.ts | 2 +- mods/one/src/tracer.ts | 2 +- mods/one/test/one.unit.test.ts | 2 +- mods/pgdata/src/api/create.ts | 2 +- mods/pgdata/src/api/delete.ts | 4 ++-- mods/pgdata/src/api/find.ts | 4 ++-- mods/pgdata/src/api/get.ts | 4 ++-- mods/pgdata/src/api/index.ts | 2 +- mods/pgdata/src/api/list.ts | 4 ++-- mods/pgdata/src/api/update.ts | 4 ++-- mods/pgdata/src/envs.ts | 2 +- mods/pgdata/src/index.ts | 2 +- mods/pgdata/src/mappers/acl.ts | 2 +- mods/pgdata/src/mappers/agent.ts | 4 ++-- mods/pgdata/src/mappers/credentials.ts | 2 +- mods/pgdata/src/mappers/domain.ts | 2 +- mods/pgdata/src/mappers/manager.ts | 4 ++-- mods/pgdata/src/mappers/number.ts | 2 +- mods/pgdata/src/mappers/peer.ts | 2 +- mods/pgdata/src/mappers/trunk.ts | 2 +- mods/pgdata/src/mappers/utils.ts | 4 ++-- mods/pgdata/src/runner.ts | 2 +- mods/pgdata/src/service.ts | 2 +- mods/pgdata/src/tracer.ts | 2 +- mods/pgdata/src/types.ts | 2 +- mods/pgdata/test/acl.mapper.unit.test.ts | 2 +- mods/pgdata/test/agent.mapper.unit.test.ts | 2 +- mods/pgdata/test/credentials.mapper.unit.test.ts | 2 +- mods/pgdata/test/domain.mapper.unit.test.ts | 2 +- mods/pgdata/test/number.mapper.unit.test.ts | 2 +- mods/pgdata/test/peer.mapper.unit.test.ts | 2 +- mods/pgdata/test/trunk.mapper.unit.test.ts | 2 +- mods/processor/src/alterations.ts | 2 +- mods/processor/src/extensions.ts | 2 +- mods/processor/src/helper.ts | 2 +- mods/processor/src/index.ts | 2 +- mods/processor/src/processor.ts | 2 +- mods/processor/src/response.ts | 2 +- mods/processor/src/target.ts | 2 +- mods/processor/src/tracer.ts | 2 +- mods/processor/src/types.ts | 2 +- mods/processor/test/alterations.unit.test.ts | 2 +- mods/processor/test/examples.ts | 2 +- mods/processor/test/extensions.unit.test.ts | 2 +- mods/processor/test/helper.unit.test.ts | 2 +- mods/processor/test/processor.unit.test.ts | 2 +- mods/processor/test/target.unit.test.ts | 2 +- mods/registry/src/config/get_config.ts | 2 +- mods/registry/src/config/schema.ts | 2 +- mods/registry/src/envs.ts | 2 +- mods/registry/src/errors.ts | 2 +- mods/registry/src/memory_store.ts | 2 +- mods/registry/src/redis_store.ts | 2 +- mods/registry/src/request.ts | 2 +- mods/registry/src/runner.ts | 2 +- mods/registry/src/sender.ts | 2 +- mods/registry/src/service.ts | 2 +- mods/registry/src/tracer.ts | 2 +- mods/registry/src/types.ts | 2 +- mods/registry/src/utils.ts | 4 ++-- mods/registry/test/memory_store.unit.test.ts | 2 +- mods/registry/test/redis_store.int.test.ts | 2 +- mods/registry/test/registry.unit.test.ts | 2 +- .../main/java/io/routr/requester/AddressUtil.java | 2 +- .../src/main/java/io/routr/requester/Launcher.java | 2 +- .../main/java/io/routr/requester/RequestSender.java | 2 +- .../src/main/java/io/routr/requester/Requester.java | 2 +- .../java/io/routr/requester/RequesterService.java | 2 +- .../java/io/routr/requester/ResponseCallable.java | 2 +- .../java/io/routr/requester/SIPProviderBuilder.java | 2 +- .../java/io/routr/requester/SIPStackProperties.java | 2 +- .../src/main/java/io/routr/requester/Utils.java | 2 +- mods/requester/src/runner.ts | 2 +- .../java/io/routr/requester/AddressUtilTests.java | 2 +- .../io/routr/requester/SIPProviderBuilderTests.java | 2 +- .../io/routr/requester/SIPStackPropertiesTests.java | 2 +- .../src/test/java/io/routr/requester/UtilsTests.java | 2 +- mods/requester/src/tracer.ts | 2 +- mods/rtprelay/src/client.ts | 2 +- mods/rtprelay/src/envs.ts | 2 +- mods/rtprelay/src/index.ts | 2 +- mods/rtprelay/src/runner.ts | 2 +- mods/rtprelay/src/service.ts | 2 +- mods/rtprelay/src/tracer.ts | 2 +- mods/rtprelay/src/types.ts | 2 +- mods/rtprelay/src/utils.ts | 2 +- mods/rtprelay/test/examples.ts | 2 +- mods/rtprelay/test/rtpengine.unit.test.ts | 2 +- mods/sdk/src/acl/acl.ts | 2 +- mods/sdk/src/acl/index.ts | 2 +- mods/sdk/src/acl/types.ts | 2 +- mods/sdk/src/agents/agents.ts | 2 +- mods/sdk/src/agents/index.ts | 2 +- mods/sdk/src/agents/types.ts | 2 +- mods/sdk/src/client.ts | 2 +- mods/sdk/src/credentials/credentials.ts | 2 +- mods/sdk/src/credentials/index.ts | 2 +- mods/sdk/src/credentials/types.ts | 2 +- mods/sdk/src/domains/domains.ts | 2 +- mods/sdk/src/domains/index.ts | 2 +- mods/sdk/src/domains/types.ts | 2 +- mods/sdk/src/index.ts | 2 +- mods/sdk/src/numbers/index.ts | 2 +- mods/sdk/src/numbers/numbers.ts | 2 +- mods/sdk/src/numbers/types.ts | 2 +- mods/sdk/src/peers/index.ts | 2 +- mods/sdk/src/peers/peers.ts | 2 +- mods/sdk/src/peers/types.ts | 2 +- mods/sdk/src/trunks/index.ts | 2 +- mods/sdk/src/trunks/trunks.ts | 2 +- mods/sdk/src/trunks/types.ts | 2 +- mods/sdk/src/types.ts | 2 +- mods/sdk/test/acl.unit.test.ts | 2 +- mods/simpleauth/src/envs.ts | 2 +- mods/simpleauth/src/runner.ts | 2 +- mods/simpleauth/src/service.ts | 2 +- mods/simpleauth/src/tracer.ts | 2 +- mods/simpleauth/src/types.ts | 2 +- mods/simpleauth/test/simpleauth.unit.test.ts | 2 +- mods/simpledata/src/api.ts | 2 +- mods/simpledata/src/envs.ts | 2 +- mods/simpledata/src/loaders/acl.ts | 5 ++--- mods/simpledata/src/loaders/agents.ts | 4 ++-- mods/simpledata/src/loaders/credentials.ts | 4 ++-- mods/simpledata/src/loaders/domains.ts | 4 ++-- mods/simpledata/src/loaders/find.ts | 2 +- mods/simpledata/src/loaders/index.ts | 2 +- mods/simpledata/src/loaders/loader.ts | 2 +- mods/simpledata/src/loaders/numbers.ts | 4 ++-- mods/simpledata/src/loaders/peers.ts | 4 ++-- mods/simpledata/src/loaders/trunks.ts | 4 ++-- mods/simpledata/src/runner.ts | 2 +- mods/simpledata/src/service.ts | 2 +- mods/simpledata/src/tracer.ts | 2 +- mods/simpledata/src/types.ts | 2 +- mods/simpledata/src/utils.ts | 2 +- mods/simpledata/test/api.unit.test.ts | 2 +- mods/simpledata/test/examples.ts | 2 +- mods/simpledata/test/resources.unit.test.ts | 2 +- webpack.config.js | 2 +- 356 files changed, 452 insertions(+), 452 deletions(-) diff --git a/.scripts/tag-changelog-config.js b/.scripts/tag-changelog-config.js index 0c933cde2..c0ba4c08b 100644 --- a/.scripts/tag-changelog-config.js +++ b/.scripts/tag-changelog-config.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index e951d847c..e54c88e20 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/assertions.ts b/mods/common/src/assertions.ts index a57edb175..a0aef54d8 100644 --- a/mods/common/src/assertions.ts +++ b/mods/common/src/assertions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/auth.ts b/mods/common/src/auth.ts index 5385bb73b..882a869a9 100644 --- a/mods/common/src/auth.ts +++ b/mods/common/src/auth.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/api/client.ts b/mods/common/src/connect/api/client.ts index e401f3d5c..26ec5c55a 100644 --- a/mods/common/src/connect/api/client.ts +++ b/mods/common/src/connect/api/client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/api/index.ts b/mods/common/src/connect/api/index.ts index d4450ddd1..80bc0f7a4 100644 --- a/mods/common/src/connect/api/index.ts +++ b/mods/common/src/connect/api/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/api/types.ts b/mods/common/src/connect/api/types.ts index 94b96f1e6..4f28a5036 100644 --- a/mods/common/src/connect/api/types.ts +++ b/mods/common/src/connect/api/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/assertions.ts b/mods/common/src/connect/assertions.ts index 312a50c1d..86edc4267 100644 --- a/mods/common/src/connect/assertions.ts +++ b/mods/common/src/connect/assertions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/client.ts b/mods/common/src/connect/client.ts index 5cb460075..4c6cb419d 100644 --- a/mods/common/src/connect/client.ts +++ b/mods/common/src/connect/client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -18,9 +18,9 @@ */ /* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" -import protoLoader = require("@grpc/proto-loader") import { toPascalCase } from "../helper" import { Kind, KindWithoutUnknown } from "./types" +import protoLoader = require("@grpc/proto-loader") const protoOptions = { keepCase: false, diff --git a/mods/common/src/connect/config.ts b/mods/common/src/connect/config.ts index b8dfe25bb..beb65ebf0 100644 --- a/mods/common/src/connect/config.ts +++ b/mods/common/src/connect/config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/connect_error.ts b/mods/common/src/connect/connect_error.ts index 85ce03c5d..eb9020fbf 100644 --- a/mods/common/src/connect/connect_error.ts +++ b/mods/common/src/connect/connect_error.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/index.ts b/mods/common/src/connect/index.ts index a804999f5..c65625d8e 100644 --- a/mods/common/src/connect/index.ts +++ b/mods/common/src/connect/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/acl.ts b/mods/common/src/connect/mappers/acl.ts index bf335f10a..b324684e1 100644 --- a/mods/common/src/connect/mappers/acl.ts +++ b/mods/common/src/connect/mappers/acl.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/agent.ts b/mods/common/src/connect/mappers/agent.ts index 497df5822..7f0708508 100644 --- a/mods/common/src/connect/mappers/agent.ts +++ b/mods/common/src/connect/mappers/agent.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/assertions.ts b/mods/common/src/connect/mappers/assertions.ts index dfaff2538..78552359b 100644 --- a/mods/common/src/connect/mappers/assertions.ts +++ b/mods/common/src/connect/mappers/assertions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/credentials.ts b/mods/common/src/connect/mappers/credentials.ts index bf4d3b25d..36a1ff097 100644 --- a/mods/common/src/connect/mappers/credentials.ts +++ b/mods/common/src/connect/mappers/credentials.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/domain.ts b/mods/common/src/connect/mappers/domain.ts index 2ebfa06d9..dfaf4958b 100644 --- a/mods/common/src/connect/mappers/domain.ts +++ b/mods/common/src/connect/mappers/domain.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/index.ts b/mods/common/src/connect/mappers/index.ts index a06dbc0be..d34bc764d 100644 --- a/mods/common/src/connect/mappers/index.ts +++ b/mods/common/src/connect/mappers/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/number.ts b/mods/common/src/connect/mappers/number.ts index fcfe87fea..9322f149b 100644 --- a/mods/common/src/connect/mappers/number.ts +++ b/mods/common/src/connect/mappers/number.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/peer.ts b/mods/common/src/connect/mappers/peer.ts index dc7383874..428efa5ef 100644 --- a/mods/common/src/connect/mappers/peer.ts +++ b/mods/common/src/connect/mappers/peer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/mappers/trunk.ts b/mods/common/src/connect/mappers/trunk.ts index 964608205..6299f9282 100644 --- a/mods/common/src/connect/mappers/trunk.ts +++ b/mods/common/src/connect/mappers/trunk.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/protos/acl.proto b/mods/common/src/connect/protos/acl.proto index 0129be15e..470986fa0 100644 --- a/mods/common/src/connect/protos/acl.proto +++ b/mods/common/src/connect/protos/acl.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/protos/agents.proto b/mods/common/src/connect/protos/agents.proto index aba4c2ced..a0bc495a7 100644 --- a/mods/common/src/connect/protos/agents.proto +++ b/mods/common/src/connect/protos/agents.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/protos/credentials.proto b/mods/common/src/connect/protos/credentials.proto index 9df6f7db7..a9cf62c39 100644 --- a/mods/common/src/connect/protos/credentials.proto +++ b/mods/common/src/connect/protos/credentials.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/protos/domains.proto b/mods/common/src/connect/protos/domains.proto index e380d4311..5799e2c8f 100644 --- a/mods/common/src/connect/protos/domains.proto +++ b/mods/common/src/connect/protos/domains.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/protos/numbers.proto b/mods/common/src/connect/protos/numbers.proto index 5f0c1c4ea..87f526357 100644 --- a/mods/common/src/connect/protos/numbers.proto +++ b/mods/common/src/connect/protos/numbers.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/protos/peers.proto b/mods/common/src/connect/protos/peers.proto index 556b61991..a5ca9fea1 100644 --- a/mods/common/src/connect/protos/peers.proto +++ b/mods/common/src/connect/protos/peers.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/protos/trunks.proto b/mods/common/src/connect/protos/trunks.proto index cc6ddd96a..a360d57c1 100644 --- a/mods/common/src/connect/protos/trunks.proto +++ b/mods/common/src/connect/protos/trunks.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/connect/schemas/acl.ts b/mods/common/src/connect/schemas/acl.ts index 9f087222e..6e744d0cb 100644 --- a/mods/common/src/connect/schemas/acl.ts +++ b/mods/common/src/connect/schemas/acl.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/agent.ts b/mods/common/src/connect/schemas/agent.ts index cb653a5c0..139990344 100644 --- a/mods/common/src/connect/schemas/agent.ts +++ b/mods/common/src/connect/schemas/agent.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/crendentials.ts b/mods/common/src/connect/schemas/crendentials.ts index 0642cf3a1..bb4bffa77 100644 --- a/mods/common/src/connect/schemas/crendentials.ts +++ b/mods/common/src/connect/schemas/crendentials.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/domain.ts b/mods/common/src/connect/schemas/domain.ts index aae7ff5d5..64cb4cbda 100644 --- a/mods/common/src/connect/schemas/domain.ts +++ b/mods/common/src/connect/schemas/domain.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/index.ts b/mods/common/src/connect/schemas/index.ts index 7a532d587..805a2213f 100644 --- a/mods/common/src/connect/schemas/index.ts +++ b/mods/common/src/connect/schemas/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/number.ts b/mods/common/src/connect/schemas/number.ts index dca690d68..5eccbc4da 100644 --- a/mods/common/src/connect/schemas/number.ts +++ b/mods/common/src/connect/schemas/number.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/peer.ts b/mods/common/src/connect/schemas/peer.ts index e9a253f49..a87e2f3ac 100644 --- a/mods/common/src/connect/schemas/peer.ts +++ b/mods/common/src/connect/schemas/peer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/trunk.ts b/mods/common/src/connect/schemas/trunk.ts index 346829712..debb650d0 100644 --- a/mods/common/src/connect/schemas/trunk.ts +++ b/mods/common/src/connect/schemas/trunk.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/schemas/validators.ts b/mods/common/src/connect/schemas/validators.ts index a784c700b..15f5d36af 100644 --- a/mods/common/src/connect/schemas/validators.ts +++ b/mods/common/src/connect/schemas/validators.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/types.ts b/mods/common/src/connect/types.ts index 4d5bed4f0..fbb80890f 100644 --- a/mods/common/src/connect/types.ts +++ b/mods/common/src/connect/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/connect/validations.ts b/mods/common/src/connect/validations.ts index 4ed3d47a5..033801fb7 100644 --- a/mods/common/src/connect/validations.ts +++ b/mods/common/src/connect/validations.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/envs.ts b/mods/common/src/envs.ts index 37c27a026..a9e8e874d 100644 --- a/mods/common/src/envs.ts +++ b/mods/common/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/errors.ts b/mods/common/src/errors.ts index a7a2cfb1d..716506774 100644 --- a/mods/common/src/errors.ts +++ b/mods/common/src/errors.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/helper.ts b/mods/common/src/helper.ts index 6f7d000ef..4856bd9e9 100644 --- a/mods/common/src/helper.ts +++ b/mods/common/src/helper.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/index.ts b/mods/common/src/index.ts index 6bc6d3a26..00c48a047 100644 --- a/mods/common/src/index.ts +++ b/mods/common/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/ip_utils.ts b/mods/common/src/ip_utils.ts index 3670191e5..0cf4ca944 100644 --- a/mods/common/src/ip_utils.ts +++ b/mods/common/src/ip_utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/protos/common.proto b/mods/common/src/protos/common.proto index a52032289..0f93010b2 100644 --- a/mods/common/src/protos/common.proto +++ b/mods/common/src/protos/common.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/protos/location.proto b/mods/common/src/protos/location.proto index 05865f5b6..1a0765eb3 100644 --- a/mods/common/src/protos/location.proto +++ b/mods/common/src/protos/location.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/protos/processor.proto b/mods/common/src/protos/processor.proto index 351aa2873..3ef7930e8 100644 --- a/mods/common/src/protos/processor.proto +++ b/mods/common/src/protos/processor.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/protos/requester.proto b/mods/common/src/protos/requester.proto index 84abad19e..069d05686 100644 --- a/mods/common/src/protos/requester.proto +++ b/mods/common/src/protos/requester.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/protos/sipmessage.proto b/mods/common/src/protos/sipmessage.proto index 1c7d36bf1..3eb39324b 100644 --- a/mods/common/src/protos/sipmessage.proto +++ b/mods/common/src/protos/sipmessage.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/protos/verifier.proto b/mods/common/src/protos/verifier.proto index a5c8bcedf..e05a19312 100644 --- a/mods/common/src/protos/verifier.proto +++ b/mods/common/src/protos/verifier.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/redis.ts b/mods/common/src/redis.ts index 2636c181e..920b292e2 100644 --- a/mods/common/src/redis.ts +++ b/mods/common/src/redis.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/requester/grpc_client.ts b/mods/common/src/requester/grpc_client.ts index 5ec5c75ba..da1870c12 100644 --- a/mods/common/src/requester/grpc_client.ts +++ b/mods/common/src/requester/grpc_client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/requester/index.ts b/mods/common/src/requester/index.ts index e3fefcb1d..4c2d51e77 100644 --- a/mods/common/src/requester/index.ts +++ b/mods/common/src/requester/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/service.ts b/mods/common/src/service.ts index 6bc182005..b81c270d3 100644 --- a/mods/common/src/service.ts +++ b/mods/common/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/tracer.ts b/mods/common/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/common/src/tracer.ts +++ b/mods/common/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/types.ts b/mods/common/src/types.ts index bd4cc9a8a..ac3ff1b57 100644 --- a/mods/common/src/types.ts +++ b/mods/common/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/verifier/grpc_client.ts b/mods/common/src/verifier/grpc_client.ts index b3ff19385..07a89c6b2 100644 --- a/mods/common/src/verifier/grpc_client.ts +++ b/mods/common/src/verifier/grpc_client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/src/verifier/index.ts b/mods/common/src/verifier/index.ts index 850d9f060..19687b5ce 100644 --- a/mods/common/src/verifier/index.ts +++ b/mods/common/src/verifier/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/verifier/types.ts b/mods/common/src/verifier/types.ts index 005bb4af7..2e1eff12c 100644 --- a/mods/common/src/verifier/types.ts +++ b/mods/common/src/verifier/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/common/src/verifier/verifier.ts b/mods/common/src/verifier/verifier.ts index 3e5f4be67..0b5111603 100644 --- a/mods/common/src/verifier/verifier.ts +++ b/mods/common/src/verifier/verifier.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/test/common.unit.test.ts b/mods/common/test/common.unit.test.ts index 7cc6e3d9a..46a6b0a2b 100644 --- a/mods/common/test/common.unit.test.ts +++ b/mods/common/test/common.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/common/test/mappers.unit.test.ts b/mods/common/test/mappers.unit.test.ts index 4ade4f13b..971aa4b88 100644 --- a/mods/common/test/mappers.unit.test.ts +++ b/mods/common/test/mappers.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/access.ts b/mods/connect/src/access.ts index 20b42fff3..f5f2a73a1 100644 --- a/mods/connect/src/access.ts +++ b/mods/connect/src/access.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/connect/src/assertions.ts b/mods/connect/src/assertions.ts index a5ca72827..7fd6dfd5f 100644 --- a/mods/connect/src/assertions.ts +++ b/mods/connect/src/assertions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/envs.ts b/mods/connect/src/envs.ts index 7a0df9882..fe267fda5 100644 --- a/mods/connect/src/envs.ts +++ b/mods/connect/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/connect/src/errors.ts b/mods/connect/src/errors.ts index 05a245da9..9344089b3 100644 --- a/mods/connect/src/errors.ts +++ b/mods/connect/src/errors.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/handlers/register.ts b/mods/connect/src/handlers/register.ts index 579266d4d..ccb154f36 100644 --- a/mods/connect/src/handlers/register.ts +++ b/mods/connect/src/handlers/register.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/handlers/registry.ts b/mods/connect/src/handlers/registry.ts index a36342657..9b32d3430 100644 --- a/mods/connect/src/handlers/registry.ts +++ b/mods/connect/src/handlers/registry.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/handlers/request.ts b/mods/connect/src/handlers/request.ts index 89f3bb63d..f7283e3a8 100644 --- a/mods/connect/src/handlers/request.ts +++ b/mods/connect/src/handlers/request.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/index.ts b/mods/connect/src/index.ts index 40f313db1..a1639e3c0 100644 --- a/mods/connect/src/index.ts +++ b/mods/connect/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/connect/src/router.ts b/mods/connect/src/router.ts index 1cef18a4f..3211a6221 100644 --- a/mods/connect/src/router.ts +++ b/mods/connect/src/router.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/connect/src/runner.ts b/mods/connect/src/runner.ts index 1bbd942c3..d01181765 100644 --- a/mods/connect/src/runner.ts +++ b/mods/connect/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/service.ts b/mods/connect/src/service.ts index 38d8dc40c..9033ad528 100644 --- a/mods/connect/src/service.ts +++ b/mods/connect/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/tailor.ts b/mods/connect/src/tailor.ts index 9cf8933c0..5222cb8d9 100644 --- a/mods/connect/src/tailor.ts +++ b/mods/connect/src/tailor.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/tracer.ts b/mods/connect/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/connect/src/tracer.ts +++ b/mods/connect/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/types.ts b/mods/connect/src/types.ts index 4bb4a2a31..a8e3df9c6 100644 --- a/mods/connect/src/types.ts +++ b/mods/connect/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/src/utils.ts b/mods/connect/src/utils.ts index fd4d891c5..aabf4fc9d 100644 --- a/mods/connect/src/utils.ts +++ b/mods/connect/src/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/test/access.unit.test.ts b/mods/connect/test/access.unit.test.ts index f7b14ee17..5a181f82c 100644 --- a/mods/connect/test/access.unit.test.ts +++ b/mods/connect/test/access.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/test/connect.unit.test.ts b/mods/connect/test/connect.unit.test.ts index 696a36e4f..6a284108e 100644 --- a/mods/connect/test/connect.unit.test.ts +++ b/mods/connect/test/connect.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/test/examples.ts b/mods/connect/test/examples.ts index 3f9214033..59135a806 100644 --- a/mods/connect/test/examples.ts +++ b/mods/connect/test/examples.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/test/mock_apis.ts b/mods/connect/test/mock_apis.ts index cae3a583b..d1b836df9 100644 --- a/mods/connect/test/mock_apis.ts +++ b/mods/connect/test/mock_apis.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/connect/test/utils.unit.test.ts b/mods/connect/test/utils.unit.test.ts index 69d34f60b..f29b524c1 100644 --- a/mods/connect/test/utils.unit.test.ts +++ b/mods/connect/test/utils.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/ctl/src/base.ts b/mods/ctl/src/base.ts index 7fca3f21f..b943dea6a 100644 --- a/mods/ctl/src/base.ts +++ b/mods/ctl/src/base.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -20,7 +20,7 @@ import { Command, Flags } from "@oclif/core" export abstract class BaseCommand extends Command { - static globalFlags = { + static readonly globalFlags = { insecure: Flags.boolean({ char: "i", description: "allow insecure connections to the routr server", diff --git a/mods/ctl/src/commands/acl/create.ts b/mods/ctl/src/commands/acl/create.ts index aa971fc8c..218a0a827 100644 --- a/mods/ctl/src/commands/acl/create.ts +++ b/mods/ctl/src/commands/acl/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -30,9 +30,9 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class CreateCommand extends BaseCommand { - static description = "Creates a new ACL" + static readonly description = "Creates a new ACL" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Creating ACL US Eeast... b148b4b4-6884-4c06-bb7e-bd098f5fe793 ` diff --git a/mods/ctl/src/commands/acl/delete.ts b/mods/ctl/src/commands/acl/delete.ts index a43fd697e..8caf3a840 100644 --- a/mods/ctl/src/commands/acl/delete.ts +++ b/mods/ctl/src/commands/acl/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/acl/describe.ts b/mods/ctl/src/commands/acl/describe.ts index ca7b8e08f..d0c63c663 100644 --- a/mods/ctl/src/commands/acl/describe.ts +++ b/mods/ctl/src/commands/acl/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/acl/get.ts b/mods/ctl/src/commands/acl/get.ts index 8c24b3349..6bbcc61e0 100644 --- a/mods/ctl/src/commands/acl/get.ts +++ b/mods/ctl/src/commands/acl/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/acl/update.ts b/mods/ctl/src/commands/acl/update.ts index 84405ec85..3cbcb8787 100644 --- a/mods/ctl/src/commands/acl/update.ts +++ b/mods/ctl/src/commands/acl/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -29,9 +29,9 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class UpdateCommand extends BaseCommand { - static description = "Updates an existing ACL" + static readonly description = "Updates an existing ACL" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating ACL US East... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` diff --git a/mods/ctl/src/commands/agents/create.ts b/mods/ctl/src/commands/agents/create.ts index 04fde6c89..32f18ebc9 100644 --- a/mods/ctl/src/commands/agents/create.ts +++ b/mods/ctl/src/commands/agents/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/agents/delete.ts b/mods/ctl/src/commands/agents/delete.ts index 23b2c87b3..0fdf171b3 100644 --- a/mods/ctl/src/commands/agents/delete.ts +++ b/mods/ctl/src/commands/agents/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -21,9 +21,9 @@ import DeleteCommand from "../../delete" import SDK from "@routr/sdk" export default class DeleteAgentCommand extends DeleteCommand { - static description = "Deletes an Agent" + static readonly description = "Deletes an Agent" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Deleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done ` diff --git a/mods/ctl/src/commands/agents/describe.ts b/mods/ctl/src/commands/agents/describe.ts index 243228b59..637d34b72 100644 --- a/mods/ctl/src/commands/agents/describe.ts +++ b/mods/ctl/src/commands/agents/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -25,8 +25,8 @@ import SDK from "@routr/sdk" import moment from "moment" export default class DescribeCommand extends BaseCommand { - static description = "shows details of an Agent" - static args = [ + static readonly description = "shows details of an Agent" + static readonly args = [ { name: "ref", required: false, diff --git a/mods/ctl/src/commands/agents/get.ts b/mods/ctl/src/commands/agents/get.ts index 72d39243f..7d3aae19c 100644 --- a/mods/ctl/src/commands/agents/get.ts +++ b/mods/ctl/src/commands/agents/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -27,17 +27,17 @@ import { CommandError } from "@oclif/core/lib/interfaces" import { CommonTypes as CT } from "@routr/common" export default class GetAgentsCommand extends BaseCommand { - static description = + static readonly description = "Shows a list of paginated Agents or a single Agent if ref is provided" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Ref Name Username Domain Privacy Enabled d31f5fb8-e367-42f7-9884-1a7999f53fe8 John Doe jdoe sip.local PRIVATE Yes ` ] - static flags = { + static readonly flags = { size: Flags.integer({ char: "s", description: "The number of items to return", diff --git a/mods/ctl/src/commands/agents/update.ts b/mods/ctl/src/commands/agents/update.ts index 1de30ca36..e771ac929 100644 --- a/mods/ctl/src/commands/agents/update.ts +++ b/mods/ctl/src/commands/agents/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -29,15 +29,15 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class UpdateCommand extends BaseCommand { - static description = "Updates an existing Agent" + static readonly description = "Updates an existing Agent" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating Agent John Doe... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` ] - static args = [ + static readonly args = [ { name: "ref", required: true, diff --git a/mods/ctl/src/commands/credentials/create.ts b/mods/ctl/src/commands/credentials/create.ts index f96d413ac..0547e27bd 100644 --- a/mods/ctl/src/commands/credentials/create.ts +++ b/mods/ctl/src/commands/credentials/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -29,9 +29,9 @@ import inquirer from "inquirer" import { nameValidator, usernameValidator } from "../../validators" export default class CreateCommand extends BaseCommand { - static description = "Creates a new set of Credentials" + static readonly description = "Creates a new set of Credentials" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Creating Credentials JDoe Access... b148b4b4-6884-4c06-bb7e-bd098f5fe793 ` diff --git a/mods/ctl/src/commands/credentials/delete.ts b/mods/ctl/src/commands/credentials/delete.ts index 8346d3abe..19c79cacd 100644 --- a/mods/ctl/src/commands/credentials/delete.ts +++ b/mods/ctl/src/commands/credentials/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/credentials/describe.ts b/mods/ctl/src/commands/credentials/describe.ts index 5ef6d809f..abc4db5f4 100644 --- a/mods/ctl/src/commands/credentials/describe.ts +++ b/mods/ctl/src/commands/credentials/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -24,8 +24,8 @@ import SDK from "@routr/sdk" import moment from "moment" export default class DescribeCommand extends BaseCommand { - static description = "shows details for a set of Credentials" - static args = [ + static readonly description = "shows details for a set of Credentials" + static readonly args = [ { name: "ref", required: false, diff --git a/mods/ctl/src/commands/credentials/get.ts b/mods/ctl/src/commands/credentials/get.ts index aa6c40411..1f6fad8c2 100644 --- a/mods/ctl/src/commands/credentials/get.ts +++ b/mods/ctl/src/commands/credentials/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -26,10 +26,10 @@ import { CLIError } from "@oclif/core/lib/errors" import { CommandError } from "@oclif/core/lib/interfaces" export default class GetCommand extends BaseCommand { - static description = + static readonly description = "Shows a list of paginated Credentials or a single set if ref is provided" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Ref Name Deny List Allow List 80181ca6-d4aa-4575-9375-8f72b07d6666 Europe ACL 0.0.0.0/0 10.0.0.25 diff --git a/mods/ctl/src/commands/credentials/update.ts b/mods/ctl/src/commands/credentials/update.ts index 0112febfc..f0d88af5e 100644 --- a/mods/ctl/src/commands/credentials/update.ts +++ b/mods/ctl/src/commands/credentials/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -28,15 +28,15 @@ import inquirer from "inquirer" import { nameValidator, usernameValidator } from "../../validators" export default class UpdateCommand extends BaseCommand { - static description = "Updates an existing set of Credentials" + static readonly description = "Updates an existing set of Credentials" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating Credentials JDoe Credentials... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` ] - static args = [ + static readonly args = [ { name: "ref", required: true, diff --git a/mods/ctl/src/commands/domains/create.ts b/mods/ctl/src/commands/domains/create.ts index 3f35e5dc1..1d3be0963 100644 --- a/mods/ctl/src/commands/domains/create.ts +++ b/mods/ctl/src/commands/domains/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -30,9 +30,9 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class CreateCommand extends BaseCommand { - static description = "Creates a new set Domain" + static readonly description = "Creates a new set Domain" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Creating Domain Local Domain... b148b4b4-6884-4c06-bb7e-bd098f5fe793 ` diff --git a/mods/ctl/src/commands/domains/delete.ts b/mods/ctl/src/commands/domains/delete.ts index 1b1b84b48..622122051 100644 --- a/mods/ctl/src/commands/domains/delete.ts +++ b/mods/ctl/src/commands/domains/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -21,9 +21,9 @@ import DeleteCommand from "../../delete" import SDK from "@routr/sdk" export default class DeleteDomainCommand extends DeleteCommand { - static description = "Deletes a Domain" + static readonly description = "Deletes a Domain" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Deleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done ` diff --git a/mods/ctl/src/commands/domains/describe.ts b/mods/ctl/src/commands/domains/describe.ts index bbc9611e1..2cf319625 100644 --- a/mods/ctl/src/commands/domains/describe.ts +++ b/mods/ctl/src/commands/domains/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -24,8 +24,8 @@ import SDK from "@routr/sdk" import moment from "moment" export default class DescribeCommand extends BaseCommand { - static description = "show details of a Domain" - static args = [ + static readonly description = "show details of a Domain" + static readonly args = [ { name: "ref", required: false, diff --git a/mods/ctl/src/commands/domains/get.ts b/mods/ctl/src/commands/domains/get.ts index 0dbc73adb..261f3ebf6 100644 --- a/mods/ctl/src/commands/domains/get.ts +++ b/mods/ctl/src/commands/domains/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -26,17 +26,17 @@ import { CLIError } from "@oclif/core/lib/errors" import { CommandError } from "@oclif/core/lib/interfaces" export default class GetDomainsCommand extends BaseCommand { - static description = + static readonly description = "Shows a list of paginated Domains or a single Domain if ref is provided" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Ref Name URI ab2b6959-f497-4b14-903b-85a7c464b564 Local Domain sip.local ` ] - static flags = { + static readonly flags = { size: Flags.integer({ char: "s", description: "the number of items to return", diff --git a/mods/ctl/src/commands/domains/update.ts b/mods/ctl/src/commands/domains/update.ts index 98f78bd55..bc7f57942 100644 --- a/mods/ctl/src/commands/domains/update.ts +++ b/mods/ctl/src/commands/domains/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -29,15 +29,15 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class UpdateCommand extends BaseCommand { - static description = "Updates an existing Domain" + static readonly description = "Updates an existing Domain" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating Domain Local... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` ] - static args = [ + static readonly args = [ { name: "ref", required: true, diff --git a/mods/ctl/src/commands/numbers/create.ts b/mods/ctl/src/commands/numbers/create.ts index 3ead46740..063286e86 100644 --- a/mods/ctl/src/commands/numbers/create.ts +++ b/mods/ctl/src/commands/numbers/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -39,9 +39,9 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class CreateNumberCommand extends BaseCommand { - static description = "Creates a new Number" + static readonly description = "Creates a new Number" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Creating Number (784) 317-8170... a134487f-a668-4509-9ddd-dcbc98175468 ` diff --git a/mods/ctl/src/commands/numbers/delete.ts b/mods/ctl/src/commands/numbers/delete.ts index 7f66cae29..08717b3fb 100644 --- a/mods/ctl/src/commands/numbers/delete.ts +++ b/mods/ctl/src/commands/numbers/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -21,9 +21,9 @@ import DeleteCommand from "../../delete" import SDK from "@routr/sdk" export default class DeleteNumberCommand extends DeleteCommand { - static description = "Deletes a Number" + static readonly description = "Deletes a Number" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Deleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done ` diff --git a/mods/ctl/src/commands/numbers/describe.ts b/mods/ctl/src/commands/numbers/describe.ts index 41d18d726..d1d8fb05b 100644 --- a/mods/ctl/src/commands/numbers/describe.ts +++ b/mods/ctl/src/commands/numbers/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -24,8 +24,8 @@ import SDK from "@routr/sdk" import moment from "moment" export default class DescribeCommand extends BaseCommand { - static description = "shows details for a Number" - static args = [ + static readonly description = "shows details for a Number" + static readonly args = [ { name: "ref", required: false, diff --git a/mods/ctl/src/commands/numbers/get.ts b/mods/ctl/src/commands/numbers/get.ts index 15876c172..3d35d3307 100644 --- a/mods/ctl/src/commands/numbers/get.ts +++ b/mods/ctl/src/commands/numbers/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -27,17 +27,17 @@ import { CommandError } from "@oclif/core/lib/interfaces" import { JsonObject } from "pb-util/build" export default class GetNumbersCommand extends BaseCommand { - static description = + static readonly description = "Shows a list of paginated Numbers or a single Number if ref is provided" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Ref Name Telephony URL AOR Link Geo a134487f-a668-4509-9ddd-dcbc98175468 (785) 317-8070 +17853178070 sip:1001@sip.local Cameron, USA (US) ` ] - static flags = { + static readonly flags = { size: Flags.integer({ char: "s", description: "the number of items to return", diff --git a/mods/ctl/src/commands/numbers/update.ts b/mods/ctl/src/commands/numbers/update.ts index 52bca3a5e..b6145b45e 100644 --- a/mods/ctl/src/commands/numbers/update.ts +++ b/mods/ctl/src/commands/numbers/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -35,15 +35,15 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class UpdateCommand extends BaseCommand { - static description = "Updates an existing set of Credentials" + static readonly description = "Updates an existing set of Credentials" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating Number (785) 317-8070... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` ] - static args = [ + static readonly args = [ { name: "ref", required: true, diff --git a/mods/ctl/src/commands/peers/create.ts b/mods/ctl/src/commands/peers/create.ts index 74ca72641..5cfa2265b 100644 --- a/mods/ctl/src/commands/peers/create.ts +++ b/mods/ctl/src/commands/peers/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -35,9 +35,9 @@ import { } from "../../validators" export default class CreateCommand extends BaseCommand { - static description = "Creates a new Peer" + static readonly description = "Creates a new Peer" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Creating Peer Asterisk Conference... b148b4b4-6884-4c06-bb7e-bd098f5fe793 ` diff --git a/mods/ctl/src/commands/peers/delete.ts b/mods/ctl/src/commands/peers/delete.ts index 9cd278111..d286f6f08 100644 --- a/mods/ctl/src/commands/peers/delete.ts +++ b/mods/ctl/src/commands/peers/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -21,9 +21,9 @@ import DeleteCommand from "../../delete" import SDK from "@routr/sdk" export default class DeletePeerCommand extends DeleteCommand { - static description = "Deletes a Peer" + static readonly description = "Deletes a Peer" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Deleting item 80181ca6-d4aa-4575-9375-8f72b071111... Done ` diff --git a/mods/ctl/src/commands/peers/describe.ts b/mods/ctl/src/commands/peers/describe.ts index 8dac902d1..bd1b1db72 100644 --- a/mods/ctl/src/commands/peers/describe.ts +++ b/mods/ctl/src/commands/peers/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -24,8 +24,8 @@ import SDK from "@routr/sdk" import moment from "moment" export default class DescribeCommand extends BaseCommand { - static description = "shows details for a Peer" - static args = [ + static readonly description = "shows details for a Peer" + static readonly args = [ { name: "ref", required: false, diff --git a/mods/ctl/src/commands/peers/get.ts b/mods/ctl/src/commands/peers/get.ts index 63db0daf4..40d691397 100644 --- a/mods/ctl/src/commands/peers/get.ts +++ b/mods/ctl/src/commands/peers/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -26,17 +26,17 @@ import { CLIError } from "@oclif/core/lib/errors" import { CommandError } from "@oclif/core/lib/interfaces" export default class GetCommand extends BaseCommand { - static description = + static readonly description = "Shows a list of paginated Peers or a single Peer if ref is provided" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Ref Name Username AOR Balancing Algorithm Session Affinity 6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference sip:conference@sip.local ROUND_ROBIN Yes ` ] - static flags = { + static readonly flags = { size: Flags.integer({ char: "s", description: "the number of items to return", diff --git a/mods/ctl/src/commands/peers/update.ts b/mods/ctl/src/commands/peers/update.ts index 783dd1943..e20e288b7 100644 --- a/mods/ctl/src/commands/peers/update.ts +++ b/mods/ctl/src/commands/peers/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -33,15 +33,15 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class UpdatePeerCommand extends BaseCommand { - static description = "Updates an existing Peer" + static readonly description = "Updates an existing Peer" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating Peer Asterisk Conf... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` ] - static args = [ + static readonly args = [ { name: "ref", required: true, diff --git a/mods/ctl/src/commands/trunks/create.ts b/mods/ctl/src/commands/trunks/create.ts index d05896759..9ca5a0068 100644 --- a/mods/ctl/src/commands/trunks/create.ts +++ b/mods/ctl/src/commands/trunks/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -38,9 +38,9 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class CreateTrunkCommand extends BaseCommand { - static description = "Creates a new Trunk" + static readonly description = "Creates a new Trunk" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Creating Trunk T01... b148b4b4-6884-4c06-bb7e-bd098f5fe793 ` diff --git a/mods/ctl/src/commands/trunks/delete.ts b/mods/ctl/src/commands/trunks/delete.ts index c2f9e2ecd..aa509d018 100644 --- a/mods/ctl/src/commands/trunks/delete.ts +++ b/mods/ctl/src/commands/trunks/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/trunks/describe.ts b/mods/ctl/src/commands/trunks/describe.ts index 243e1747d..8a8ae01e6 100644 --- a/mods/ctl/src/commands/trunks/describe.ts +++ b/mods/ctl/src/commands/trunks/describe.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/commands/trunks/get.ts b/mods/ctl/src/commands/trunks/get.ts index 27aa81129..acf36b6d9 100644 --- a/mods/ctl/src/commands/trunks/get.ts +++ b/mods/ctl/src/commands/trunks/get.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -26,17 +26,17 @@ import { CLIError } from "@oclif/core/lib/errors" import { CommandError } from "@oclif/core/lib/interfaces" export default class GetTrunksCommand extends BaseCommand { - static description = + static readonly description = "Shows a list of paginated Trunks or a single Trunk if ref is provided" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Ref Name Inbound SIP URI 8cde8ea9-3c58-4dbe-b2cf-23c4413dd4cc Local sip.t01.provider.net ` ] - static flags = { + static readonly flags = { size: Flags.integer({ char: "s", description: "the number of items to return", diff --git a/mods/ctl/src/commands/trunks/update.ts b/mods/ctl/src/commands/trunks/update.ts index f2a017efc..ae641a49e 100644 --- a/mods/ctl/src/commands/trunks/update.ts +++ b/mods/ctl/src/commands/trunks/update.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -37,15 +37,15 @@ import SDK from "@routr/sdk" import inquirer from "inquirer" export default class UpdateCommand extends BaseCommand { - static description = "Updates an existing Trunk" + static readonly description = "Updates an existing Trunk" - static examples = [ + static readonly examples = [ `<%= config.bin %> <%= command.id %> Updating Trunk T01... 80181ca6-d4aa-4575-9375-8f72b07d5555 ` ] - static args = [ + static readonly args = [ { name: "ref", required: true, diff --git a/mods/ctl/src/countries.ts b/mods/ctl/src/countries.ts index 37c3e2c5c..f1e2c8454 100644 --- a/mods/ctl/src/countries.ts +++ b/mods/ctl/src/countries.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/delete.ts b/mods/ctl/src/delete.ts index e8494afc7..7d5754a2e 100644 --- a/mods/ctl/src/delete.ts +++ b/mods/ctl/src/delete.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/fonoster * * This file is part of Fonoster @@ -22,7 +22,7 @@ import { BaseCommand } from "./base" import { CLIError } from "@oclif/core/lib/errors" export default abstract class DeleteCommand extends BaseCommand { - static args = [{ name: "ref" }] + static readonly args = [{ name: "ref" }] // eslint-disable-next-line @typescript-eslint/no-explicit-any async deleteResource(API: any, funcName: string) { diff --git a/mods/ctl/src/help.ts b/mods/ctl/src/help.ts index 2f16e0641..b90a1871b 100644 --- a/mods/ctl/src/help.ts +++ b/mods/ctl/src/help.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. @@ -17,10 +17,8 @@ * limitations under the License. */ /* eslint-disable require-jsdoc */ -// import { Help } from "@oclif/plugin-help" - -import { Help } from "@oclif/core" import * as figlet from "figlet" +import { Help } from "@oclif/core" export default class MyHelpClass extends Help { protected async showRootHelp() { diff --git a/mods/ctl/src/index.ts b/mods/ctl/src/index.ts index 38404b7d0..ea8baeacd 100644 --- a/mods/ctl/src/index.ts +++ b/mods/ctl/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/utils.ts b/mods/ctl/src/utils.ts index a71354608..e7ac22bf6 100644 --- a/mods/ctl/src/utils.ts +++ b/mods/ctl/src/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/src/validators.ts b/mods/ctl/src/validators.ts index 39db507ef..eeff999ad 100644 --- a/mods/ctl/src/validators.ts +++ b/mods/ctl/src/validators.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/ctl/test/commands/acl/get.test.ts b/mods/ctl/test/commands/acl/get.test.ts index 66f899159..0cc151a76 100644 --- a/mods/ctl/test/commands/acl/get.test.ts +++ b/mods/ctl/test/commands/acl/get.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. diff --git a/mods/dispatcher/src/config/get_config.ts b/mods/dispatcher/src/config/get_config.ts index bb852fcd8..9247fda8d 100644 --- a/mods/dispatcher/src/config/get_config.ts +++ b/mods/dispatcher/src/config/get_config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/config/schema.ts b/mods/dispatcher/src/config/schema.ts index b776a8041..806e3295f 100644 --- a/mods/dispatcher/src/config/schema.ts +++ b/mods/dispatcher/src/config/schema.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/connections.ts b/mods/dispatcher/src/connections.ts index 594209677..dd403cd7b 100644 --- a/mods/dispatcher/src/connections.ts +++ b/mods/dispatcher/src/connections.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/envs.ts b/mods/dispatcher/src/envs.ts index 8b14d4e3e..198293780 100644 --- a/mods/dispatcher/src/envs.ts +++ b/mods/dispatcher/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/dispatcher/src/errors.ts b/mods/dispatcher/src/errors.ts index 061b214e1..fde613483 100644 --- a/mods/dispatcher/src/errors.ts +++ b/mods/dispatcher/src/errors.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/find_processor.ts b/mods/dispatcher/src/find_processor.ts index b3b73003b..8e48ee3e9 100644 --- a/mods/dispatcher/src/find_processor.ts +++ b/mods/dispatcher/src/find_processor.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/index.ts b/mods/dispatcher/src/index.ts index f112b2259..3b1e280cd 100644 --- a/mods/dispatcher/src/index.ts +++ b/mods/dispatcher/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/dispatcher/src/processor.ts b/mods/dispatcher/src/processor.ts index e2e62df14..a02b7dbdf 100644 --- a/mods/dispatcher/src/processor.ts +++ b/mods/dispatcher/src/processor.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/run_middlewares.ts b/mods/dispatcher/src/run_middlewares.ts index 8a8fb7c51..0121bbbff 100644 --- a/mods/dispatcher/src/run_middlewares.ts +++ b/mods/dispatcher/src/run_middlewares.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/run_processor.ts b/mods/dispatcher/src/run_processor.ts index 840e2fceb..b9a310eed 100644 --- a/mods/dispatcher/src/run_processor.ts +++ b/mods/dispatcher/src/run_processor.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/runner.ts b/mods/dispatcher/src/runner.ts index d4173b09e..5e2125867 100644 --- a/mods/dispatcher/src/runner.ts +++ b/mods/dispatcher/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/service.ts b/mods/dispatcher/src/service.ts index 151eddec1..f4318adc6 100644 --- a/mods/dispatcher/src/service.ts +++ b/mods/dispatcher/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/tracer.ts b/mods/dispatcher/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/dispatcher/src/tracer.ts +++ b/mods/dispatcher/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/types.ts b/mods/dispatcher/src/types.ts index 2de4f8b62..e4c94c867 100644 --- a/mods/dispatcher/src/types.ts +++ b/mods/dispatcher/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/src/util.ts b/mods/dispatcher/src/util.ts index ab20cd99e..b1473b593 100644 --- a/mods/dispatcher/src/util.ts +++ b/mods/dispatcher/src/util.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/dispatcher/test/dispatcher.unit.test.ts b/mods/dispatcher/test/dispatcher.unit.test.ts index 35cb897a7..d8ae496aa 100644 --- a/mods/dispatcher/test/dispatcher.unit.test.ts +++ b/mods/dispatcher/test/dispatcher.unit.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/echo/src/envs.ts b/mods/echo/src/envs.ts index 65977b4a8..f026a314a 100644 --- a/mods/echo/src/envs.ts +++ b/mods/echo/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/echo/src/runner.ts b/mods/echo/src/runner.ts index 1fe8e0b9b..94e348510 100644 --- a/mods/echo/src/runner.ts +++ b/mods/echo/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/echo/src/tracer.ts b/mods/echo/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/echo/src/tracer.ts +++ b/mods/echo/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/echo/test/echo.unit.test.ts b/mods/echo/test/echo.unit.test.ts index b0f1e2129..60b55fe3b 100644 --- a/mods/echo/test/echo.unit.test.ts +++ b/mods/echo/test/echo.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/graaljstest/config.ts b/mods/edgeport/graaljstest/config.ts index baf0f7395..299dd5a27 100644 --- a/mods/edgeport/graaljstest/config.ts +++ b/mods/edgeport/graaljstest/config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/graaljstest/config.unit.test.ts b/mods/edgeport/graaljstest/config.unit.test.ts index df6281a73..af1975268 100644 --- a/mods/edgeport/graaljstest/config.unit.test.ts +++ b/mods/edgeport/graaljstest/config.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/graaljstest/edgeport.unit.test.ts b/mods/edgeport/graaljstest/edgeport.unit.test.ts index 3fe1d9961..329347adb 100644 --- a/mods/edgeport/graaljstest/edgeport.unit.test.ts +++ b/mods/edgeport/graaljstest/edgeport.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/assertions.ts b/mods/edgeport/src/assertions.ts index 52cd8d112..ae797c9ed 100644 --- a/mods/edgeport/src/assertions.ts +++ b/mods/edgeport/src/assertions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/config/fs.ts b/mods/edgeport/src/config/fs.ts index aeebabadf..69d178224 100644 --- a/mods/edgeport/src/config/fs.ts +++ b/mods/edgeport/src/config/fs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/config/get_config.ts b/mods/edgeport/src/config/get_config.ts index 5ef941a14..6b25f90d5 100644 --- a/mods/edgeport/src/config/get_config.ts +++ b/mods/edgeport/src/config/get_config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/config/schema.ts b/mods/edgeport/src/config/schema.ts index 85da8eb72..5490cf10a 100644 --- a/mods/edgeport/src/config/schema.ts +++ b/mods/edgeport/src/config/schema.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/create_listening_points.ts b/mods/edgeport/src/create_listening_points.ts index 93aaca359..22911eebe 100644 --- a/mods/edgeport/src/create_listening_points.ts +++ b/mods/edgeport/src/create_listening_points.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/create_sip_provider.ts b/mods/edgeport/src/create_sip_provider.ts index 10b799427..e456a1a91 100644 --- a/mods/edgeport/src/create_sip_provider.ts +++ b/mods/edgeport/src/create_sip_provider.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/create_sip_stack.ts b/mods/edgeport/src/create_sip_stack.ts index 6ee3d3f57..4f4c9369f 100644 --- a/mods/edgeport/src/create_sip_stack.ts +++ b/mods/edgeport/src/create_sip_stack.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/edgeport.ts b/mods/edgeport/src/edgeport.ts index b56dff81a..7b2dbf337 100644 --- a/mods/edgeport/src/edgeport.ts +++ b/mods/edgeport/src/edgeport.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/envs.ts b/mods/edgeport/src/envs.ts index ef9497f3a..5ba160aa9 100644 --- a/mods/edgeport/src/envs.ts +++ b/mods/edgeport/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java b/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java index 6146a1d0b..8c79d2633 100644 --- a/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java +++ b/mods/edgeport/src/main/java/io/routr/GRPCSipListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/HangupCauses.java b/mods/edgeport/src/main/java/io/routr/HangupCauses.java index f28fb2e52..d6f31563c 100644 --- a/mods/edgeport/src/main/java/io/routr/HangupCauses.java +++ b/mods/edgeport/src/main/java/io/routr/HangupCauses.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/HealthCheck.java b/mods/edgeport/src/main/java/io/routr/HealthCheck.java index 5afb5fccd..a256b6deb 100644 --- a/mods/edgeport/src/main/java/io/routr/HealthCheck.java +++ b/mods/edgeport/src/main/java/io/routr/HealthCheck.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/Launcher.java b/mods/edgeport/src/main/java/io/routr/Launcher.java index 7d89a8ba8..e4a15d7b3 100644 --- a/mods/edgeport/src/main/java/io/routr/Launcher.java +++ b/mods/edgeport/src/main/java/io/routr/Launcher.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/MapProxyObject.java b/mods/edgeport/src/main/java/io/routr/MapProxyObject.java index b770d1312..92f773a8e 100644 --- a/mods/edgeport/src/main/java/io/routr/MapProxyObject.java +++ b/mods/edgeport/src/main/java/io/routr/MapProxyObject.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/events/ConsolePublisher.java b/mods/edgeport/src/main/java/io/routr/events/ConsolePublisher.java index be4162939..ebd20b87f 100644 --- a/mods/edgeport/src/main/java/io/routr/events/ConsolePublisher.java +++ b/mods/edgeport/src/main/java/io/routr/events/ConsolePublisher.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/events/EventTypes.java b/mods/edgeport/src/main/java/io/routr/events/EventTypes.java index 08fd85e9a..be3a7c3fe 100644 --- a/mods/edgeport/src/main/java/io/routr/events/EventTypes.java +++ b/mods/edgeport/src/main/java/io/routr/events/EventTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/events/EventsPublisher.java b/mods/edgeport/src/main/java/io/routr/events/EventsPublisher.java index cb1e64793..f25f0d579 100644 --- a/mods/edgeport/src/main/java/io/routr/events/EventsPublisher.java +++ b/mods/edgeport/src/main/java/io/routr/events/EventsPublisher.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java b/mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java index 526245ac4..1d4cf9340 100644 --- a/mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java +++ b/mods/edgeport/src/main/java/io/routr/events/NATSPublisher.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/AddressConverter.java b/mods/edgeport/src/main/java/io/routr/headers/AddressConverter.java index 6ce6d411e..4e52d3931 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/AddressConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/AddressConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/AuthorizationConverter.java b/mods/edgeport/src/main/java/io/routr/headers/AuthorizationConverter.java index 3eecacce0..968d8b8aa 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/AuthorizationConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/AuthorizationConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/CallIDConverter.java b/mods/edgeport/src/main/java/io/routr/headers/CallIDConverter.java index 94312f094..f3dfef13e 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/CallIDConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/CallIDConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ContactConverter.java b/mods/edgeport/src/main/java/io/routr/headers/ContactConverter.java index a8c849944..af6e0831f 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ContactConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ContactConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ContentLengthConverter.java b/mods/edgeport/src/main/java/io/routr/headers/ContentLengthConverter.java index 72d6cec61..90461a837 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ContentLengthConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ContentLengthConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/Converter.java b/mods/edgeport/src/main/java/io/routr/headers/Converter.java index e61dd9c64..ace9fd30c 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/Converter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/Converter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ExpiresConverter.java b/mods/edgeport/src/main/java/io/routr/headers/ExpiresConverter.java index d8185df76..b25600c4a 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ExpiresConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ExpiresConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ExtensionConverter.java b/mods/edgeport/src/main/java/io/routr/headers/ExtensionConverter.java index e8578e49e..69bcc5836 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ExtensionConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ExtensionConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/FromConverter.java b/mods/edgeport/src/main/java/io/routr/headers/FromConverter.java index 93d4473bc..036bf6784 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/FromConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/FromConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/MaxForwardsConverter.java b/mods/edgeport/src/main/java/io/routr/headers/MaxForwardsConverter.java index dc18895e8..1a43a07a5 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/MaxForwardsConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/MaxForwardsConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/MessageConverter.java b/mods/edgeport/src/main/java/io/routr/headers/MessageConverter.java index 9f916c8cc..80c5cc209 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/MessageConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/MessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ProtoMapping.java b/mods/edgeport/src/main/java/io/routr/headers/ProtoMapping.java index fb7dc7421..8b3884535 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ProtoMapping.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ProtoMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/RecordRouteConverter.java b/mods/edgeport/src/main/java/io/routr/headers/RecordRouteConverter.java index 502a86205..2ba03714a 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/RecordRouteConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/RecordRouteConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ResponseCode.java b/mods/edgeport/src/main/java/io/routr/headers/ResponseCode.java index 21f020401..585ff8e76 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ResponseCode.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ResponseCode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/RouteConverter.java b/mods/edgeport/src/main/java/io/routr/headers/RouteConverter.java index 2e57cd687..d0dd9b348 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/RouteConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/RouteConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/SipURIConverter.java b/mods/edgeport/src/main/java/io/routr/headers/SipURIConverter.java index fdc0e17d0..eff75db73 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/SipURIConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/SipURIConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ToConverter.java b/mods/edgeport/src/main/java/io/routr/headers/ToConverter.java index 7682748ea..4b18d07a1 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ToConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ToConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/ViaConverter.java b/mods/edgeport/src/main/java/io/routr/headers/ViaConverter.java index 2bd4cf7b5..126d0ac35 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/ViaConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/ViaConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/headers/WWWAuthenticateConverter.java b/mods/edgeport/src/main/java/io/routr/headers/WWWAuthenticateConverter.java index b7926f678..a99aa0e47 100644 --- a/mods/edgeport/src/main/java/io/routr/headers/WWWAuthenticateConverter.java +++ b/mods/edgeport/src/main/java/io/routr/headers/WWWAuthenticateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/utils/AccountManagerImpl.java b/mods/edgeport/src/main/java/io/routr/utils/AccountManagerImpl.java index 9e699c6b9..8a711b8b7 100644 --- a/mods/edgeport/src/main/java/io/routr/utils/AccountManagerImpl.java +++ b/mods/edgeport/src/main/java/io/routr/utils/AccountManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/main/java/io/routr/utils/UserCredentialsImpl.java b/mods/edgeport/src/main/java/io/routr/utils/UserCredentialsImpl.java index 54bb5d3b8..c6d1cde78 100644 --- a/mods/edgeport/src/main/java/io/routr/utils/UserCredentialsImpl.java +++ b/mods/edgeport/src/main/java/io/routr/utils/UserCredentialsImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/runner.ts b/mods/edgeport/src/runner.ts index ef0a1ed60..2d38f211b 100644 --- a/mods/edgeport/src/runner.ts +++ b/mods/edgeport/src/runner.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/server_properties.ts b/mods/edgeport/src/server_properties.ts index 2c5959851..657c1135e 100644 --- a/mods/edgeport/src/server_properties.ts +++ b/mods/edgeport/src/server_properties.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/test/java/io/routr/ConverterTests.java b/mods/edgeport/src/test/java/io/routr/ConverterTests.java index cfeaa542d..295caf109 100644 --- a/mods/edgeport/src/test/java/io/routr/ConverterTests.java +++ b/mods/edgeport/src/test/java/io/routr/ConverterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/test/java/io/routr/ResponseCodeTests.java b/mods/edgeport/src/test/java/io/routr/ResponseCodeTests.java index dd049058f..6b08269cb 100644 --- a/mods/edgeport/src/test/java/io/routr/ResponseCodeTests.java +++ b/mods/edgeport/src/test/java/io/routr/ResponseCodeTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/test/java/io/routr/UtilsTests.java b/mods/edgeport/src/test/java/io/routr/UtilsTests.java index 1bbf101f1..fe09fb001 100644 --- a/mods/edgeport/src/test/java/io/routr/UtilsTests.java +++ b/mods/edgeport/src/test/java/io/routr/UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/tracer.ts b/mods/edgeport/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/edgeport/src/tracer.ts +++ b/mods/edgeport/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/edgeport/src/types.ts b/mods/edgeport/src/types.ts index 719a57847..d52d90d7c 100644 --- a/mods/edgeport/src/types.ts +++ b/mods/edgeport/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/client.ts b/mods/location/src/client.ts index 626d33fae..4e80e0afb 100644 --- a/mods/location/src/client.ts +++ b/mods/location/src/client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/config/get_config.ts b/mods/location/src/config/get_config.ts index 10cc27094..7ad47d39a 100644 --- a/mods/location/src/config/get_config.ts +++ b/mods/location/src/config/get_config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/config/schema.ts b/mods/location/src/config/schema.ts index 3a9731cd3..5a2f0d5bd 100644 --- a/mods/location/src/config/schema.ts +++ b/mods/location/src/config/schema.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/envs.ts b/mods/location/src/envs.ts index 8b14d4e3e..198293780 100644 --- a/mods/location/src/envs.ts +++ b/mods/location/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/location/src/errors.ts b/mods/location/src/errors.ts index d6393294e..92414e029 100644 --- a/mods/location/src/errors.ts +++ b/mods/location/src/errors.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/helper.ts b/mods/location/src/helper.ts index 893504a61..1c546c121 100644 --- a/mods/location/src/helper.ts +++ b/mods/location/src/helper.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -16,10 +16,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { MessageRequest, Route, Transport } from "@routr/common" -import { CommonTypes as CT } from "@routr/common" -import { Extensions as E, Target as T } from "@routr/processor" /* eslint-disable require-jsdoc */ +import { + MessageRequest, + Route, + Transport, + CommonTypes as CT +} from "@routr/common" +import { Extensions as E, Target as T } from "@routr/processor" // TODO: Before finalizing this, consider using the old approach of saving the rport // and received values (like here: diff --git a/mods/location/src/index.ts b/mods/location/src/index.ts index 3b768e7f3..63fd72674 100644 --- a/mods/location/src/index.ts +++ b/mods/location/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/location.ts b/mods/location/src/location.ts index 2ad416dbc..c10d03c06 100644 --- a/mods/location/src/location.ts +++ b/mods/location/src/location.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -17,8 +16,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { UnsupportedSchema } from "./errors" -import { CommonErrors as CE } from "@routr/common" +import { Route, CommonTypes as CT, CommonErrors as CE } from "@routr/common" import { AddRouteRequest, FindRoutesRequest, @@ -26,7 +26,6 @@ import { ILocatorStore, RemoveRoutesRequest } from "./types" -import { Route, CommonTypes as CT } from "@routr/common" import { filterOnlyMatchingLabels } from "./utils" enum AOR_SCHEME { diff --git a/mods/location/src/memory_store.ts b/mods/location/src/memory_store.ts index 337cfc8e3..fc63b27d3 100644 --- a/mods/location/src/memory_store.ts +++ b/mods/location/src/memory_store.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/redis_store.ts b/mods/location/src/redis_store.ts index 8e688775b..209c38f25 100644 --- a/mods/location/src/redis_store.ts +++ b/mods/location/src/redis_store.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/runner.ts b/mods/location/src/runner.ts index 07ae7d57e..573242ef0 100644 --- a/mods/location/src/runner.ts +++ b/mods/location/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/service.ts b/mods/location/src/service.ts index fcba44904..878fc1500 100644 --- a/mods/location/src/service.ts +++ b/mods/location/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/tracer.ts b/mods/location/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/location/src/tracer.ts +++ b/mods/location/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/types.ts b/mods/location/src/types.ts index aab8eb209..704dbc0a9 100644 --- a/mods/location/src/types.ts +++ b/mods/location/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/src/utils.ts b/mods/location/src/utils.ts index f0b0c5279..9cd311378 100644 --- a/mods/location/src/utils.ts +++ b/mods/location/src/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/test/location.unit.test.ts b/mods/location/test/location.unit.test.ts index 8a1b865e0..6af67aa5d 100644 --- a/mods/location/test/location.unit.test.ts +++ b/mods/location/test/location.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/test/memory_store.unit.test.ts b/mods/location/test/memory_store.unit.test.ts index 4ad410873..fc91913d0 100644 --- a/mods/location/test/memory_store.unit.test.ts +++ b/mods/location/test/memory_store.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/test/redis_store.int.test.ts b/mods/location/test/redis_store.int.test.ts index a2d644c76..9c4aa8376 100644 --- a/mods/location/test/redis_store.int.test.ts +++ b/mods/location/test/redis_store.int.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/test/route_examples.ts b/mods/location/test/route_examples.ts index a3ed07eb5..6ef803125 100644 --- a/mods/location/test/route_examples.ts +++ b/mods/location/test/route_examples.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/location/test/utils.unit.test.ts b/mods/location/test/utils.unit.test.ts index c0a77d437..2b31de0ae 100644 --- a/mods/location/test/utils.unit.test.ts +++ b/mods/location/test/utils.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/one/src/configs.ts b/mods/one/src/configs.ts index abef4ab57..43d3b3dc7 100644 --- a/mods/one/src/configs.ts +++ b/mods/one/src/configs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/one/src/envs.ts b/mods/one/src/envs.ts index 13fa161e5..98f10d021 100644 --- a/mods/one/src/envs.ts +++ b/mods/one/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/one/src/runner.ts b/mods/one/src/runner.ts index eb759cf9b..222a63a70 100644 --- a/mods/one/src/runner.ts +++ b/mods/one/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/one/src/tracer.ts b/mods/one/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/one/src/tracer.ts +++ b/mods/one/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/one/test/one.unit.test.ts b/mods/one/test/one.unit.test.ts index 65b12cc35..a89d0fc8f 100644 --- a/mods/one/test/one.unit.test.ts +++ b/mods/one/test/one.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/src/api/create.ts b/mods/pgdata/src/api/create.ts index 20ba4a0d9..69d78c993 100644 --- a/mods/pgdata/src/api/create.ts +++ b/mods/pgdata/src/api/create.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/src/api/delete.ts b/mods/pgdata/src/api/delete.ts index f7a21eb70..c457c1452 100644 --- a/mods/pgdata/src/api/delete.ts +++ b/mods/pgdata/src/api/delete.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { PrismaClientInitializationError } from "@prisma/client/runtime/library" import { CommonTypes as CT, CommonErrors as CE } from "@routr/common" diff --git a/mods/pgdata/src/api/find.ts b/mods/pgdata/src/api/find.ts index c7acf11db..bd5dfa4c9 100644 --- a/mods/pgdata/src/api/find.ts +++ b/mods/pgdata/src/api/find.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { JsonObject, struct } from "pb-util" import { CommonTypes as CT, CommonConnect as CC } from "@routr/common" diff --git a/mods/pgdata/src/api/get.ts b/mods/pgdata/src/api/get.ts index 40464312b..c37cd649f 100644 --- a/mods/pgdata/src/api/get.ts +++ b/mods/pgdata/src/api/get.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { JsonObject, struct } from "pb-util" import { diff --git a/mods/pgdata/src/api/index.ts b/mods/pgdata/src/api/index.ts index 58abe04ca..e7bbf249c 100644 --- a/mods/pgdata/src/api/index.ts +++ b/mods/pgdata/src/api/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/api/list.ts b/mods/pgdata/src/api/list.ts index e6d25e0f3..5b10ff7b8 100644 --- a/mods/pgdata/src/api/list.ts +++ b/mods/pgdata/src/api/list.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import * as grpc from "@grpc/grpc-js" import { JsonObject, struct } from "pb-util" import { CommonTypes as CT, CommonConnect as CC } from "@routr/common" diff --git a/mods/pgdata/src/api/update.ts b/mods/pgdata/src/api/update.ts index 8bbd07245..25205e0c1 100644 --- a/mods/pgdata/src/api/update.ts +++ b/mods/pgdata/src/api/update.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { JsonObject, struct } from "pb-util" import { CommonTypes as CT, diff --git a/mods/pgdata/src/envs.ts b/mods/pgdata/src/envs.ts index 5394ae16a..872b1332b 100644 --- a/mods/pgdata/src/envs.ts +++ b/mods/pgdata/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/index.ts b/mods/pgdata/src/index.ts index d02883bc4..2c097233c 100644 --- a/mods/pgdata/src/index.ts +++ b/mods/pgdata/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/acl.ts b/mods/pgdata/src/mappers/acl.ts index 1e1ef89f1..20a988664 100644 --- a/mods/pgdata/src/mappers/acl.ts +++ b/mods/pgdata/src/mappers/acl.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/agent.ts b/mods/pgdata/src/mappers/agent.ts index 0072ca237..024978625 100644 --- a/mods/pgdata/src/mappers/agent.ts +++ b/mods/pgdata/src/mappers/agent.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { Agent as AgentPrismaModel, APIVersion, diff --git a/mods/pgdata/src/mappers/credentials.ts b/mods/pgdata/src/mappers/credentials.ts index 6daf9d17e..336d623f7 100644 --- a/mods/pgdata/src/mappers/credentials.ts +++ b/mods/pgdata/src/mappers/credentials.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/domain.ts b/mods/pgdata/src/mappers/domain.ts index 4c49971fa..eed0ee3fc 100644 --- a/mods/pgdata/src/mappers/domain.ts +++ b/mods/pgdata/src/mappers/domain.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/manager.ts b/mods/pgdata/src/mappers/manager.ts index 7d0ef50ee..479e64731 100644 --- a/mods/pgdata/src/mappers/manager.ts +++ b/mods/pgdata/src/mappers/manager.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { JsonObject } from "pb-util/build" export abstract class EntityManager { diff --git a/mods/pgdata/src/mappers/number.ts b/mods/pgdata/src/mappers/number.ts index 74396c01b..9cce42bff 100644 --- a/mods/pgdata/src/mappers/number.ts +++ b/mods/pgdata/src/mappers/number.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/peer.ts b/mods/pgdata/src/mappers/peer.ts index adf3c11a2..2f04b7a98 100644 --- a/mods/pgdata/src/mappers/peer.ts +++ b/mods/pgdata/src/mappers/peer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/trunk.ts b/mods/pgdata/src/mappers/trunk.ts index f36a1c9cf..a64fdcdca 100644 --- a/mods/pgdata/src/mappers/trunk.ts +++ b/mods/pgdata/src/mappers/trunk.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/pgdata/src/mappers/utils.ts b/mods/pgdata/src/mappers/utils.ts index 267afd70d..3d39ff1da 100644 --- a/mods/pgdata/src/mappers/utils.ts +++ b/mods/pgdata/src/mappers/utils.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { ACLManager } from "./acl" import { AgentManager } from "./agent" diff --git a/mods/pgdata/src/runner.ts b/mods/pgdata/src/runner.ts index d33832742..6c2e0f031 100644 --- a/mods/pgdata/src/runner.ts +++ b/mods/pgdata/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/src/service.ts b/mods/pgdata/src/service.ts index b61f9d036..9137d37af 100644 --- a/mods/pgdata/src/service.ts +++ b/mods/pgdata/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/src/tracer.ts b/mods/pgdata/src/tracer.ts index 9b7d7c976..178e7df23 100644 --- a/mods/pgdata/src/tracer.ts +++ b/mods/pgdata/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/src/types.ts b/mods/pgdata/src/types.ts index be51ede76..9c88bbff5 100644 --- a/mods/pgdata/src/types.ts +++ b/mods/pgdata/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/acl.mapper.unit.test.ts b/mods/pgdata/test/acl.mapper.unit.test.ts index 02c07237c..40e3c2184 100644 --- a/mods/pgdata/test/acl.mapper.unit.test.ts +++ b/mods/pgdata/test/acl.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/agent.mapper.unit.test.ts b/mods/pgdata/test/agent.mapper.unit.test.ts index 7d21c1995..f6a6d0bf8 100644 --- a/mods/pgdata/test/agent.mapper.unit.test.ts +++ b/mods/pgdata/test/agent.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/credentials.mapper.unit.test.ts b/mods/pgdata/test/credentials.mapper.unit.test.ts index c2072c3f1..720df7deb 100644 --- a/mods/pgdata/test/credentials.mapper.unit.test.ts +++ b/mods/pgdata/test/credentials.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/domain.mapper.unit.test.ts b/mods/pgdata/test/domain.mapper.unit.test.ts index fd831c12a..553375de8 100644 --- a/mods/pgdata/test/domain.mapper.unit.test.ts +++ b/mods/pgdata/test/domain.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/number.mapper.unit.test.ts b/mods/pgdata/test/number.mapper.unit.test.ts index b9c700d70..e380f0a44 100644 --- a/mods/pgdata/test/number.mapper.unit.test.ts +++ b/mods/pgdata/test/number.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/peer.mapper.unit.test.ts b/mods/pgdata/test/peer.mapper.unit.test.ts index 186d04931..1d6b73f5a 100644 --- a/mods/pgdata/test/peer.mapper.unit.test.ts +++ b/mods/pgdata/test/peer.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/pgdata/test/trunk.mapper.unit.test.ts b/mods/pgdata/test/trunk.mapper.unit.test.ts index 5b45d402b..29e0b1bc0 100644 --- a/mods/pgdata/test/trunk.mapper.unit.test.ts +++ b/mods/pgdata/test/trunk.mapper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/alterations.ts b/mods/processor/src/alterations.ts index 44da87c0b..69e34bcdc 100644 --- a/mods/processor/src/alterations.ts +++ b/mods/processor/src/alterations.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/extensions.ts b/mods/processor/src/extensions.ts index 6e318caa2..c6d64b7bb 100644 --- a/mods/processor/src/extensions.ts +++ b/mods/processor/src/extensions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/helper.ts b/mods/processor/src/helper.ts index d1b47b3ed..bf4f1ae0b 100644 --- a/mods/processor/src/helper.ts +++ b/mods/processor/src/helper.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/index.ts b/mods/processor/src/index.ts index ecd8fa094..f19c68345 100644 --- a/mods/processor/src/index.ts +++ b/mods/processor/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/processor.ts b/mods/processor/src/processor.ts index 2641cbdde..b1751b244 100644 --- a/mods/processor/src/processor.ts +++ b/mods/processor/src/processor.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/response.ts b/mods/processor/src/response.ts index ae62f1419..92ade29e8 100644 --- a/mods/processor/src/response.ts +++ b/mods/processor/src/response.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/target.ts b/mods/processor/src/target.ts index 79bcdc536..aed621232 100644 --- a/mods/processor/src/target.ts +++ b/mods/processor/src/target.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/tracer.ts b/mods/processor/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/processor/src/tracer.ts +++ b/mods/processor/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/src/types.ts b/mods/processor/src/types.ts index ce1622c45..93daeb980 100644 --- a/mods/processor/src/types.ts +++ b/mods/processor/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/test/alterations.unit.test.ts b/mods/processor/test/alterations.unit.test.ts index 856c16cd2..335a435bd 100644 --- a/mods/processor/test/alterations.unit.test.ts +++ b/mods/processor/test/alterations.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/test/examples.ts b/mods/processor/test/examples.ts index 271413e38..4f12684ab 100644 --- a/mods/processor/test/examples.ts +++ b/mods/processor/test/examples.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/test/extensions.unit.test.ts b/mods/processor/test/extensions.unit.test.ts index afb20437c..2770ca292 100644 --- a/mods/processor/test/extensions.unit.test.ts +++ b/mods/processor/test/extensions.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/test/helper.unit.test.ts b/mods/processor/test/helper.unit.test.ts index e4b8ec9d4..7f0e1377d 100644 --- a/mods/processor/test/helper.unit.test.ts +++ b/mods/processor/test/helper.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/test/processor.unit.test.ts b/mods/processor/test/processor.unit.test.ts index 75a14495d..e7c6874f5 100644 --- a/mods/processor/test/processor.unit.test.ts +++ b/mods/processor/test/processor.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/processor/test/target.unit.test.ts b/mods/processor/test/target.unit.test.ts index 3c3a870e4..fd0d5f015 100644 --- a/mods/processor/test/target.unit.test.ts +++ b/mods/processor/test/target.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/config/get_config.ts b/mods/registry/src/config/get_config.ts index 5cc8854d6..b38eaba3d 100644 --- a/mods/registry/src/config/get_config.ts +++ b/mods/registry/src/config/get_config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/config/schema.ts b/mods/registry/src/config/schema.ts index 9ac9d6ed2..05e0fcd82 100644 --- a/mods/registry/src/config/schema.ts +++ b/mods/registry/src/config/schema.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/envs.ts b/mods/registry/src/envs.ts index 9a34a8f78..9ae28cb38 100644 --- a/mods/registry/src/envs.ts +++ b/mods/registry/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/registry/src/errors.ts b/mods/registry/src/errors.ts index ed5c210e5..c720ea5be 100644 --- a/mods/registry/src/errors.ts +++ b/mods/registry/src/errors.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/memory_store.ts b/mods/registry/src/memory_store.ts index 4fafd6d5f..108fca5b0 100644 --- a/mods/registry/src/memory_store.ts +++ b/mods/registry/src/memory_store.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/redis_store.ts b/mods/registry/src/redis_store.ts index 6bb183a4f..71afec6fb 100644 --- a/mods/registry/src/redis_store.ts +++ b/mods/registry/src/redis_store.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/request.ts b/mods/registry/src/request.ts index a782b65fc..e2c55204f 100644 --- a/mods/registry/src/request.ts +++ b/mods/registry/src/request.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/runner.ts b/mods/registry/src/runner.ts index 2a132f9d2..b6e7fb3de 100644 --- a/mods/registry/src/runner.ts +++ b/mods/registry/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/sender.ts b/mods/registry/src/sender.ts index 7e998af6d..3c4b002cc 100644 --- a/mods/registry/src/sender.ts +++ b/mods/registry/src/sender.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/service.ts b/mods/registry/src/service.ts index afd9683ca..039a3569f 100644 --- a/mods/registry/src/service.ts +++ b/mods/registry/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/tracer.ts b/mods/registry/src/tracer.ts index 9b7d7c976..178e7df23 100644 --- a/mods/registry/src/tracer.ts +++ b/mods/registry/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/types.ts b/mods/registry/src/types.ts index 055aeee4a..d0bcabf0b 100644 --- a/mods/registry/src/types.ts +++ b/mods/registry/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/src/utils.ts b/mods/registry/src/utils.ts index b2c219b88..79caf7af4 100644 --- a/mods/registry/src/utils.ts +++ b/mods/registry/src/utils.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import MemoryStore from "./memory_store" import RedisStore from "./redis_store" diff --git a/mods/registry/test/memory_store.unit.test.ts b/mods/registry/test/memory_store.unit.test.ts index e5d7e5b43..b52fdf26d 100644 --- a/mods/registry/test/memory_store.unit.test.ts +++ b/mods/registry/test/memory_store.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/test/redis_store.int.test.ts b/mods/registry/test/redis_store.int.test.ts index ef22407e2..22f0432f8 100644 --- a/mods/registry/test/redis_store.int.test.ts +++ b/mods/registry/test/redis_store.int.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/registry/test/registry.unit.test.ts b/mods/registry/test/registry.unit.test.ts index 223b8ffe6..7474f32ae 100644 --- a/mods/registry/test/registry.unit.test.ts +++ b/mods/registry/test/registry.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/AddressUtil.java b/mods/requester/src/main/java/io/routr/requester/AddressUtil.java index 7a9bcf8d4..a9bab0029 100644 --- a/mods/requester/src/main/java/io/routr/requester/AddressUtil.java +++ b/mods/requester/src/main/java/io/routr/requester/AddressUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/Launcher.java b/mods/requester/src/main/java/io/routr/requester/Launcher.java index c07656e34..dd17f1e12 100644 --- a/mods/requester/src/main/java/io/routr/requester/Launcher.java +++ b/mods/requester/src/main/java/io/routr/requester/Launcher.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/RequestSender.java b/mods/requester/src/main/java/io/routr/requester/RequestSender.java index 9b859448d..4c8e35d70 100644 --- a/mods/requester/src/main/java/io/routr/requester/RequestSender.java +++ b/mods/requester/src/main/java/io/routr/requester/RequestSender.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/Requester.java b/mods/requester/src/main/java/io/routr/requester/Requester.java index 270c65dad..8ec2bdd2e 100644 --- a/mods/requester/src/main/java/io/routr/requester/Requester.java +++ b/mods/requester/src/main/java/io/routr/requester/Requester.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/RequesterService.java b/mods/requester/src/main/java/io/routr/requester/RequesterService.java index 10c9cc837..ebc3dcb4e 100644 --- a/mods/requester/src/main/java/io/routr/requester/RequesterService.java +++ b/mods/requester/src/main/java/io/routr/requester/RequesterService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/ResponseCallable.java b/mods/requester/src/main/java/io/routr/requester/ResponseCallable.java index f6a3f9bac..ea1567888 100644 --- a/mods/requester/src/main/java/io/routr/requester/ResponseCallable.java +++ b/mods/requester/src/main/java/io/routr/requester/ResponseCallable.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/SIPProviderBuilder.java b/mods/requester/src/main/java/io/routr/requester/SIPProviderBuilder.java index 114f1c8fe..5fb311ecf 100644 --- a/mods/requester/src/main/java/io/routr/requester/SIPProviderBuilder.java +++ b/mods/requester/src/main/java/io/routr/requester/SIPProviderBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/SIPStackProperties.java b/mods/requester/src/main/java/io/routr/requester/SIPStackProperties.java index aaeba6abe..b61a93a6f 100644 --- a/mods/requester/src/main/java/io/routr/requester/SIPStackProperties.java +++ b/mods/requester/src/main/java/io/routr/requester/SIPStackProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/main/java/io/routr/requester/Utils.java b/mods/requester/src/main/java/io/routr/requester/Utils.java index d9525156a..64eee01d8 100644 --- a/mods/requester/src/main/java/io/routr/requester/Utils.java +++ b/mods/requester/src/main/java/io/routr/requester/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/runner.ts b/mods/requester/src/runner.ts index 1ecb446a5..ff8e5a131 100644 --- a/mods/requester/src/runner.ts +++ b/mods/requester/src/runner.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/test/java/io/routr/requester/AddressUtilTests.java b/mods/requester/src/test/java/io/routr/requester/AddressUtilTests.java index 4df7994fa..e60b244fd 100644 --- a/mods/requester/src/test/java/io/routr/requester/AddressUtilTests.java +++ b/mods/requester/src/test/java/io/routr/requester/AddressUtilTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/test/java/io/routr/requester/SIPProviderBuilderTests.java b/mods/requester/src/test/java/io/routr/requester/SIPProviderBuilderTests.java index 946c9000a..6b6ed5601 100644 --- a/mods/requester/src/test/java/io/routr/requester/SIPProviderBuilderTests.java +++ b/mods/requester/src/test/java/io/routr/requester/SIPProviderBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/test/java/io/routr/requester/SIPStackPropertiesTests.java b/mods/requester/src/test/java/io/routr/requester/SIPStackPropertiesTests.java index 6e421983b..59035595c 100644 --- a/mods/requester/src/test/java/io/routr/requester/SIPStackPropertiesTests.java +++ b/mods/requester/src/test/java/io/routr/requester/SIPStackPropertiesTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/test/java/io/routr/requester/UtilsTests.java b/mods/requester/src/test/java/io/routr/requester/UtilsTests.java index d2ce63e12..c068aaab6 100644 --- a/mods/requester/src/test/java/io/routr/requester/UtilsTests.java +++ b/mods/requester/src/test/java/io/routr/requester/UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/requester/src/tracer.ts b/mods/requester/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/requester/src/tracer.ts +++ b/mods/requester/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/rtprelay/src/client.ts b/mods/rtprelay/src/client.ts index 8de38e6b4..a60bd3c52 100644 --- a/mods/rtprelay/src/client.ts +++ b/mods/rtprelay/src/client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/rtprelay/src/envs.ts b/mods/rtprelay/src/envs.ts index ef95641fc..4edfe9e47 100644 --- a/mods/rtprelay/src/envs.ts +++ b/mods/rtprelay/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/rtprelay/src/index.ts b/mods/rtprelay/src/index.ts index db23d3bb4..329ec8146 100644 --- a/mods/rtprelay/src/index.ts +++ b/mods/rtprelay/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/rtprelay/src/runner.ts b/mods/rtprelay/src/runner.ts index b1fd12ee2..ba8206f4d 100644 --- a/mods/rtprelay/src/runner.ts +++ b/mods/rtprelay/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/rtprelay/src/service.ts b/mods/rtprelay/src/service.ts index 7c04c878e..5357fa56c 100644 --- a/mods/rtprelay/src/service.ts +++ b/mods/rtprelay/src/service.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/rtprelay/src/tracer.ts b/mods/rtprelay/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/rtprelay/src/tracer.ts +++ b/mods/rtprelay/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/rtprelay/src/types.ts b/mods/rtprelay/src/types.ts index fdd093349..7eacb15c8 100644 --- a/mods/rtprelay/src/types.ts +++ b/mods/rtprelay/src/types.ts @@ -1,7 +1,7 @@ import { MessageRequest } from "@routr/common" /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/rtprelay/src/utils.ts b/mods/rtprelay/src/utils.ts index 9e2810a96..de749978e 100644 --- a/mods/rtprelay/src/utils.ts +++ b/mods/rtprelay/src/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/rtprelay/test/examples.ts b/mods/rtprelay/test/examples.ts index 0aa29e051..6a72461ba 100644 --- a/mods/rtprelay/test/examples.ts +++ b/mods/rtprelay/test/examples.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/rtprelay/test/rtpengine.unit.test.ts b/mods/rtprelay/test/rtpengine.unit.test.ts index a546b3a4b..5f27b1f5b 100644 --- a/mods/rtprelay/test/rtpengine.unit.test.ts +++ b/mods/rtprelay/test/rtpengine.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/sdk/src/acl/acl.ts b/mods/sdk/src/acl/acl.ts index f2685d676..6e025365c 100644 --- a/mods/sdk/src/acl/acl.ts +++ b/mods/sdk/src/acl/acl.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/acl/index.ts b/mods/sdk/src/acl/index.ts index 0efa8bcc6..b670f4a54 100644 --- a/mods/sdk/src/acl/index.ts +++ b/mods/sdk/src/acl/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/acl/types.ts b/mods/sdk/src/acl/types.ts index 0acdd33f8..8b30aac26 100644 --- a/mods/sdk/src/acl/types.ts +++ b/mods/sdk/src/acl/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/agents/agents.ts b/mods/sdk/src/agents/agents.ts index b00c31a67..ed78196c3 100644 --- a/mods/sdk/src/agents/agents.ts +++ b/mods/sdk/src/agents/agents.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/agents/index.ts b/mods/sdk/src/agents/index.ts index d43708174..67caf3ebf 100644 --- a/mods/sdk/src/agents/index.ts +++ b/mods/sdk/src/agents/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/agents/types.ts b/mods/sdk/src/agents/types.ts index 8d5141e88..e7a255485 100644 --- a/mods/sdk/src/agents/types.ts +++ b/mods/sdk/src/agents/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/client.ts b/mods/sdk/src/client.ts index 68ebadd12..1484d2313 100644 --- a/mods/sdk/src/client.ts +++ b/mods/sdk/src/client.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/credentials/credentials.ts b/mods/sdk/src/credentials/credentials.ts index fa6b7989b..9f48680cb 100644 --- a/mods/sdk/src/credentials/credentials.ts +++ b/mods/sdk/src/credentials/credentials.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/credentials/index.ts b/mods/sdk/src/credentials/index.ts index 6e9e7a4f2..8a3857666 100644 --- a/mods/sdk/src/credentials/index.ts +++ b/mods/sdk/src/credentials/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/credentials/types.ts b/mods/sdk/src/credentials/types.ts index a2c6c70e3..2c6e14e29 100644 --- a/mods/sdk/src/credentials/types.ts +++ b/mods/sdk/src/credentials/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/domains/domains.ts b/mods/sdk/src/domains/domains.ts index 560265426..fbb628d21 100644 --- a/mods/sdk/src/domains/domains.ts +++ b/mods/sdk/src/domains/domains.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/domains/index.ts b/mods/sdk/src/domains/index.ts index d561a9c46..49ec74bdb 100644 --- a/mods/sdk/src/domains/index.ts +++ b/mods/sdk/src/domains/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/domains/types.ts b/mods/sdk/src/domains/types.ts index 9cc36e1b6..4dc98d2b0 100644 --- a/mods/sdk/src/domains/types.ts +++ b/mods/sdk/src/domains/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/index.ts b/mods/sdk/src/index.ts index 9ea12b554..9584a621a 100644 --- a/mods/sdk/src/index.ts +++ b/mods/sdk/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/numbers/index.ts b/mods/sdk/src/numbers/index.ts index d14f7491a..71cf5dfa1 100644 --- a/mods/sdk/src/numbers/index.ts +++ b/mods/sdk/src/numbers/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/numbers/numbers.ts b/mods/sdk/src/numbers/numbers.ts index 854aac1e1..ba2b0bf19 100644 --- a/mods/sdk/src/numbers/numbers.ts +++ b/mods/sdk/src/numbers/numbers.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/numbers/types.ts b/mods/sdk/src/numbers/types.ts index 3d74873f6..54e0a0e1c 100644 --- a/mods/sdk/src/numbers/types.ts +++ b/mods/sdk/src/numbers/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/peers/index.ts b/mods/sdk/src/peers/index.ts index 85609f952..801040899 100644 --- a/mods/sdk/src/peers/index.ts +++ b/mods/sdk/src/peers/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/peers/peers.ts b/mods/sdk/src/peers/peers.ts index 6d97a4619..aa4f88461 100644 --- a/mods/sdk/src/peers/peers.ts +++ b/mods/sdk/src/peers/peers.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/peers/types.ts b/mods/sdk/src/peers/types.ts index 5fb624fb9..bfa135263 100644 --- a/mods/sdk/src/peers/types.ts +++ b/mods/sdk/src/peers/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/trunks/index.ts b/mods/sdk/src/trunks/index.ts index bc2937e74..257ef4877 100644 --- a/mods/sdk/src/trunks/index.ts +++ b/mods/sdk/src/trunks/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/trunks/trunks.ts b/mods/sdk/src/trunks/trunks.ts index 1b540b226..f5e6b5abb 100644 --- a/mods/sdk/src/trunks/trunks.ts +++ b/mods/sdk/src/trunks/trunks.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/trunks/types.ts b/mods/sdk/src/trunks/types.ts index 3885ba201..e3b770748 100644 --- a/mods/sdk/src/trunks/types.ts +++ b/mods/sdk/src/trunks/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/src/types.ts b/mods/sdk/src/types.ts index 900a58188..70e06edea 100644 --- a/mods/sdk/src/types.ts +++ b/mods/sdk/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/sdk/test/acl.unit.test.ts b/mods/sdk/test/acl.unit.test.ts index 1491fb34f..cffdb0bb3 100644 --- a/mods/sdk/test/acl.unit.test.ts +++ b/mods/sdk/test/acl.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpleauth/src/envs.ts b/mods/simpleauth/src/envs.ts index cbe680d46..37a1f0bce 100644 --- a/mods/simpleauth/src/envs.ts +++ b/mods/simpleauth/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/simpleauth/src/runner.ts b/mods/simpleauth/src/runner.ts index ff39134cf..859ca8bb1 100644 --- a/mods/simpleauth/src/runner.ts +++ b/mods/simpleauth/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpleauth/src/service.ts b/mods/simpleauth/src/service.ts index c1a90d082..1ca753564 100644 --- a/mods/simpleauth/src/service.ts +++ b/mods/simpleauth/src/service.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpleauth/src/tracer.ts b/mods/simpleauth/src/tracer.ts index ac83e12cb..b10cd8145 100644 --- a/mods/simpleauth/src/tracer.ts +++ b/mods/simpleauth/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpleauth/src/types.ts b/mods/simpleauth/src/types.ts index 8fe4f1c2a..a05984773 100644 --- a/mods/simpleauth/src/types.ts +++ b/mods/simpleauth/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpleauth/test/simpleauth.unit.test.ts b/mods/simpleauth/test/simpleauth.unit.test.ts index a71264e06..b68ea0dbf 100644 --- a/mods/simpleauth/test/simpleauth.unit.test.ts +++ b/mods/simpleauth/test/simpleauth.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/src/api.ts b/mods/simpledata/src/api.ts index 26f0ef657..17815fc25 100644 --- a/mods/simpledata/src/api.ts +++ b/mods/simpledata/src/api.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/src/envs.ts b/mods/simpledata/src/envs.ts index cc0af40b5..4d0354133 100644 --- a/mods/simpledata/src/envs.ts +++ b/mods/simpledata/src/envs.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/simpledata/src/loaders/acl.ts b/mods/simpledata/src/loaders/acl.ts index 3d11214f3..3d2c43649 100644 --- a/mods/simpledata/src/loaders/acl.ts +++ b/mods/simpledata/src/loaders/acl.ts @@ -1,6 +1,4 @@ -/* eslint-disable require-jsdoc */ -/* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) +/* * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" export function aclLoader(config: CC.UserConfig): CC.AccessControlList { diff --git a/mods/simpledata/src/loaders/agents.ts b/mods/simpledata/src/loaders/agents.ts index eb2f8dcc7..8a1e65944 100644 --- a/mods/simpledata/src/loaders/agents.ts +++ b/mods/simpledata/src/loaders/agents.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { findByRef } from "./find" diff --git a/mods/simpledata/src/loaders/credentials.ts b/mods/simpledata/src/loaders/credentials.ts index 090d8f6d8..f7ed1e80c 100644 --- a/mods/simpledata/src/loaders/credentials.ts +++ b/mods/simpledata/src/loaders/credentials.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" export function credentialsLoader(config: CC.UserConfig): CC.Credentials { diff --git a/mods/simpledata/src/loaders/domains.ts b/mods/simpledata/src/loaders/domains.ts index 9ec98e4a3..9bc829eea 100644 --- a/mods/simpledata/src/loaders/domains.ts +++ b/mods/simpledata/src/loaders/domains.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { findByRef } from "./find" diff --git a/mods/simpledata/src/loaders/find.ts b/mods/simpledata/src/loaders/find.ts index d2587b626..827fcc1b0 100644 --- a/mods/simpledata/src/loaders/find.ts +++ b/mods/simpledata/src/loaders/find.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/simpledata/src/loaders/index.ts b/mods/simpledata/src/loaders/index.ts index b542ec7f1..43fb595d4 100644 --- a/mods/simpledata/src/loaders/index.ts +++ b/mods/simpledata/src/loaders/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/simpledata/src/loaders/loader.ts b/mods/simpledata/src/loaders/loader.ts index 6092e6aab..3137adb54 100644 --- a/mods/simpledata/src/loaders/loader.ts +++ b/mods/simpledata/src/loaders/loader.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. diff --git a/mods/simpledata/src/loaders/numbers.ts b/mods/simpledata/src/loaders/numbers.ts index 1ae86c2d9..eb5c6d9ec 100644 --- a/mods/simpledata/src/loaders/numbers.ts +++ b/mods/simpledata/src/loaders/numbers.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { findByRef } from "./find" diff --git a/mods/simpledata/src/loaders/peers.ts b/mods/simpledata/src/loaders/peers.ts index 3eef4c17a..88ade9b8a 100644 --- a/mods/simpledata/src/loaders/peers.ts +++ b/mods/simpledata/src/loaders/peers.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { getLogger } from "@fonoster/logger" import { findByRef } from "./find" diff --git a/mods/simpledata/src/loaders/trunks.ts b/mods/simpledata/src/loaders/trunks.ts index 611ab44cc..541ce5518 100644 --- a/mods/simpledata/src/loaders/trunks.ts +++ b/mods/simpledata/src/loaders/trunks.ts @@ -1,6 +1,5 @@ -/* eslint-disable require-jsdoc */ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr. @@ -17,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable require-jsdoc */ import { CommonConnect as CC } from "@routr/common" import { findByRef } from "./find" diff --git a/mods/simpledata/src/runner.ts b/mods/simpledata/src/runner.ts index 302efdaf8..94ad6b484 100644 --- a/mods/simpledata/src/runner.ts +++ b/mods/simpledata/src/runner.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/src/service.ts b/mods/simpledata/src/service.ts index a1825526f..8e151a9f5 100644 --- a/mods/simpledata/src/service.ts +++ b/mods/simpledata/src/service.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/src/tracer.ts b/mods/simpledata/src/tracer.ts index 9b7d7c976..178e7df23 100644 --- a/mods/simpledata/src/tracer.ts +++ b/mods/simpledata/src/tracer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/src/types.ts b/mods/simpledata/src/types.ts index 3bf334634..83b5265d1 100644 --- a/mods/simpledata/src/types.ts +++ b/mods/simpledata/src/types.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/src/utils.ts b/mods/simpledata/src/utils.ts index 7cd08282f..5a6500152 100644 --- a/mods/simpledata/src/utils.ts +++ b/mods/simpledata/src/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/test/api.unit.test.ts b/mods/simpledata/test/api.unit.test.ts index c2a942339..26e1a6d11 100644 --- a/mods/simpledata/test/api.unit.test.ts +++ b/mods/simpledata/test/api.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/test/examples.ts b/mods/simpledata/test/examples.ts index 1c79c3d7d..784a4157b 100644 --- a/mods/simpledata/test/examples.ts +++ b/mods/simpledata/test/examples.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/mods/simpledata/test/resources.unit.test.ts b/mods/simpledata/test/resources.unit.test.ts index d1c776049..83b5aaf45 100644 --- a/mods/simpledata/test/resources.unit.test.ts +++ b/mods/simpledata/test/resources.unit.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster/routr * * This file is part of Routr diff --git a/webpack.config.js b/webpack.config.js index 0219d5642..4c8719d26 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com) + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) * http://github.com/fonoster * * This file is part of Routr. From 3dd26f5da045866a613d0ad38f235c2fab8984bb Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Sun, 11 Feb 2024 17:57:10 -0500 Subject: [PATCH 16/18] chore: ensure proper SIP error is returned when maxContacts is exceeded --- mods/common/src/connect/types.ts | 4 +- mods/common/src/verifier/types.ts | 1 + mods/connect/src/handlers/register.ts | 14 +++-- mods/location/src/location.ts | 8 +-- mods/location/src/types.ts | 2 +- mods/location/test/location.unit.test.ts | 66 ++++++++++++++-------- mods/pgdata/schema.prisma | 4 +- mods/pgdata/test/agent.mapper.unit.test.ts | 5 ++ mods/pgdata/test/peer.mapper.unit.test.ts | 7 +++ mods/rtprelay/src/service.ts | 2 +- mods/simpledata/src/loaders/agents.ts | 3 + mods/simpledata/src/loaders/peers.ts | 3 + 12 files changed, 80 insertions(+), 39 deletions(-) diff --git a/mods/common/src/connect/types.ts b/mods/common/src/connect/types.ts index fbb80890f..179942506 100644 --- a/mods/common/src/connect/types.ts +++ b/mods/common/src/connect/types.ts @@ -70,7 +70,7 @@ export interface Agent extends BaseConnectModel { enabled: boolean domainRef?: string domain?: Domain - maxContacts?: number + maxContacts: number expires?: number credentialsRef?: string credentials?: Credentials @@ -126,7 +126,7 @@ export interface Peer extends BaseConnectModel { accessControlList?: AccessControlList credentialsRef?: string credentials?: Credentials - maxContacts?: number + maxContacts: number expires?: number balancingAlgorithm?: LoadBalancingAlgorithm withSessionAffinity?: boolean diff --git a/mods/common/src/verifier/types.ts b/mods/common/src/verifier/types.ts index 2e1eff12c..d0d156733 100644 --- a/mods/common/src/verifier/types.ts +++ b/mods/common/src/verifier/types.ts @@ -25,5 +25,6 @@ export interface VerifyResponse { aor: string aorLink: string username: string + maxContacts: number allowedMethods: Method[] } diff --git a/mods/connect/src/handlers/register.ts b/mods/connect/src/handlers/register.ts index ccb154f36..a071c6ef2 100644 --- a/mods/connect/src/handlers/register.ts +++ b/mods/connect/src/handlers/register.ts @@ -16,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import * as grpc from "@grpc/grpc-js" import { Helper as H, ILocationService } from "@routr/location" import { Extensions as E, @@ -88,10 +89,14 @@ export const handleRegister = ( }) res.sendRegisterOk(request) } catch (e) { - // TODO: If it is a bad request then we should downgrade to verbose + if (e.code === grpc.status.INVALID_ARGUMENT) { + const details = (e as unknown as { details: string }).details + res.sendForbidden(details) + logger.verbose(details) + return + } logger.error(e) - // TODO: Check if forbidden error - res.sendForbidden(e.details) + res.sendInternalServerError() } } else if (hasXConnectObjectHeader(request)) { const connectToken = E.getHeaderValue( @@ -110,7 +115,8 @@ export const handleRegister = ( await location.addRoute({ aor: payload.aor, - route: H.createRoute(request) + route: H.createRoute(request), + maxContacts: payload.maxContacts || -1 }) res.sendRegisterOk(request) diff --git a/mods/location/src/location.ts b/mods/location/src/location.ts index c10d03c06..8fb4dd090 100644 --- a/mods/location/src/location.ts +++ b/mods/location/src/location.ts @@ -60,7 +60,7 @@ export default class Location implements ILocationService { } const existingRoutes = await this.store.get(request.aor) - const routeExists = existingRoutes.some( + const routeAlreadyExists = existingRoutes.some( (route) => route.user === request.route.user && route.host === request.route.host && @@ -69,15 +69,15 @@ export default class Location implements ILocationService { ) if ( - !routeExists && - request.maxContacts !== undefined && + !routeAlreadyExists && + request.maxContacts !== -1 && existingRoutes.length >= request.maxContacts ) { throw new CE.BadRequestError( `exceeds maximum of ${request.maxContacts} allowed contacts` ) } - return await this.store.put(request.aor, request.route) + return this.store.put(request.aor, request.route) } /** @inheritdoc */ diff --git a/mods/location/src/types.ts b/mods/location/src/types.ts index 704dbc0a9..288ce3c51 100644 --- a/mods/location/src/types.ts +++ b/mods/location/src/types.ts @@ -33,7 +33,7 @@ export interface ILocatorStore { export interface AddRouteRequest { aor: string route: Route - maxContacts?: number + maxContacts: number } export interface FindRoutesRequest { diff --git a/mods/location/test/location.unit.test.ts b/mods/location/test/location.unit.test.ts index 6af67aa5d..66874be85 100644 --- a/mods/location/test/location.unit.test.ts +++ b/mods/location/test/location.unit.test.ts @@ -43,11 +43,13 @@ describe("@routr/location", () => { await locator.addRoute({ aor: "sip:1001@sip.local", - route: Routes.simpleRoute01 + route: Routes.simpleRoute01, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:1001@sip.local", - route: Routes.simpleRoute02 + route: Routes.simpleRoute02, + maxContacts: -1 }) const findRoutesRequest1 = { @@ -80,23 +82,28 @@ describe("@routr/location", () => { const locator = new Locator(new MemoryStore()) await locator.addRoute({ aor: "sip:voice_ls@sip.local", - route: Routes.voiceBackendRoute01 + route: Routes.voiceBackendRoute01, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_ls@sip.local", - route: Routes.voiceBackendRoute02 + route: Routes.voiceBackendRoute02, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_ls@sip.local", - route: Routes.voiceBackendRoute03 + route: Routes.voiceBackendRoute03, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_ls@sip.local", - route: Routes.voiceBackendRoute04 + route: Routes.voiceBackendRoute04, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_ls@sip.local", - route: Routes.voiceBackendRoute05 + route: Routes.voiceBackendRoute05, + maxContacts: -1 }) const findRoutesRequest1: FindRoutesRequest = { @@ -117,23 +124,28 @@ describe("@routr/location", () => { const locator = new Locator(new MemoryStore()) await locator.addRoute({ aor: "sip:voice_rr@sip.local", - route: Routes.voiceBackendRoute05 + route: Routes.voiceBackendRoute05, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_rr@sip.local", - route: Routes.voiceBackendRoute04 + route: Routes.voiceBackendRoute04, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_rr@sip.local", - route: Routes.voiceBackendRoute03 + route: Routes.voiceBackendRoute03, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_rr@sip.local", - route: Routes.voiceBackendRoute02 + route: Routes.voiceBackendRoute02, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:voice_rr@sip.local", - route: Routes.voiceBackendRoute01 + route: Routes.voiceBackendRoute01, + maxContacts: -1 }) const findRoutesRequest1 = { @@ -225,15 +237,18 @@ describe("@routr/location", () => { const locator = new Locator(new MemoryStore()) await locator.addRoute({ aor: "sip:conference@sip.local", - route: Routes.conferenceWithExpiredRoute + route: Routes.conferenceWithExpiredRoute, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:conference@sip.local", - route: Routes.conferenceBackendRoute02 + route: Routes.conferenceBackendRoute02, + maxContacts: -1 }) await locator.addRoute({ aor: "sip:conference@sip.local", - route: Routes.conferenceBackendRoute01 + route: Routes.conferenceBackendRoute01, + maxContacts: -1 }) const findRoutesRequest1 = { @@ -266,14 +281,14 @@ describe("@routr/location", () => { it("checks if maxContacts has been reached (passing a different route)", async () => { const locator = new Locator(new MemoryStore()) - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute01, maxContacts: 1 }) try { - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute02, maxContacts: 1 @@ -286,21 +301,21 @@ describe("@routr/location", () => { it("checks if maxContacts has been reached (passing the same route)", async () => { const locator = new Locator(new MemoryStore()) - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute01, maxContacts: 1 }) // It should not throw an error since it is the same route - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute01, maxContacts: 1 }) try { - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute02, maxContacts: 1 @@ -313,27 +328,27 @@ describe("@routr/location", () => { it("checks if maxContacts has been reached (combining routes)", async () => { const locator = new Locator(new MemoryStore()) - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute01, maxContacts: 2 }) - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute01, maxContacts: 2 }) // It should not throw an error since two of the routes are the same - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute02, maxContacts: 2 }) try { - await await locator.addRoute({ + await locator.addRoute({ aor: "sip:voice@sip.local", route: Routes.voiceBackendRoute03, maxContacts: 1 @@ -348,7 +363,8 @@ describe("@routr/location", () => { const locator = new Locator(new MemoryStore()) await locator.addRoute({ aor: "backend:voice_ls", - route: Routes.voiceBackendRoute01 + route: Routes.voiceBackendRoute01, + maxContacts: 1 }) const findRoutesRequest1 = { diff --git a/mods/pgdata/schema.prisma b/mods/pgdata/schema.prisma index 257524301..a94c7acc8 100644 --- a/mods/pgdata/schema.prisma +++ b/mods/pgdata/schema.prisma @@ -25,7 +25,7 @@ model Agent { name String @db.VarChar(60) username String @unique @db.VarChar(60) privacy Privacy @default(NONE) - maxContacts Int @map("max_contacts") + maxContacts Int @map("max_contacts") @default(-1) expires Int enabled Boolean @default(true) createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) @@ -52,7 +52,7 @@ model Peer { contactAddr String? @map("contact_addr") @db.VarChar(20) balancingAlgorithm LoadBalancingAlgorithm? @map("balancing_algorithm") withSessionAffinity Boolean @default(false) @map("with_session_affinity") - maxContacts Int @map("max_contacts") + maxContacts Int @map("max_contacts") @default(-1) expires Int enabled Boolean @default(true) createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) diff --git a/mods/pgdata/test/agent.mapper.unit.test.ts b/mods/pgdata/test/agent.mapper.unit.test.ts index f6a6d0bf8..61516974b 100644 --- a/mods/pgdata/test/agent.mapper.unit.test.ts +++ b/mods/pgdata/test/agent.mapper.unit.test.ts @@ -149,6 +149,7 @@ describe("@routr/pgdata/mappers/agent", () => { enabled: true, domainRef: "domain-01", credentialsRef: "credentials-01", + maxContacts: -1, extended: { test: "test" }, @@ -176,6 +177,7 @@ describe("@routr/pgdata/mappers/agent", () => { enabled: true, domainRef: "domain-01", credentialsRef: "credentials-01", + maxContacts: -1, extended: { test: "test" }, @@ -207,6 +209,7 @@ describe("@routr/pgdata/mappers/agent", () => { enabled: true, domainRef: "domain-01", credentialsRef: "credentials-01", + maxContacts: -1, extended: { test: "test" }, @@ -232,6 +235,7 @@ describe("@routr/pgdata/mappers/agent", () => { enabled: true, domainRef: "domain-01", credentialsRef: "credentials-01", + maxContacts: -1, extended: { test: "test" }, @@ -257,6 +261,7 @@ describe("@routr/pgdata/mappers/agent", () => { enabled: true, domainRef: "domain-01", credentialsRef: "credentials-01", + maxContacts: -1, extended: { test: "test" }, diff --git a/mods/pgdata/test/peer.mapper.unit.test.ts b/mods/pgdata/test/peer.mapper.unit.test.ts index 1d6b73f5a..4e12ad4bf 100644 --- a/mods/pgdata/test/peer.mapper.unit.test.ts +++ b/mods/pgdata/test/peer.mapper.unit.test.ts @@ -138,6 +138,7 @@ describe("@routr/pgdata/mappers/peer", () => { aor: "sip:1001@sip.local", contactAddr: "192.168.1.12", enabled: true, + maxContacts: -1, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, extended: { @@ -168,6 +169,7 @@ describe("@routr/pgdata/mappers/peer", () => { enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, + maxContacts: -1, extended: { test: "test" } @@ -197,6 +199,7 @@ describe("@routr/pgdata/mappers/peer", () => { username: "asterisk", aor: "sip:1001@sip.local", contactAddr: "192.168.1.12", + maxContacts: -1, enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, @@ -223,6 +226,7 @@ describe("@routr/pgdata/mappers/peer", () => { username: "", aor: "sip:1001@sip.local", contactAddr: "192.168.1.12", + maxContacts: -1, enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, @@ -249,6 +253,7 @@ describe("@routr/pgdata/mappers/peer", () => { username: "asterisk space", aor: "sip:1001@sip.local", contactAddr: "192.168.1.12", + maxContacts: -1, enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, @@ -277,6 +282,7 @@ describe("@routr/pgdata/mappers/peer", () => { username: "asterisk", aor: "", contactAddr: "192.168.1.12", + maxContacts: -1, enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, @@ -303,6 +309,7 @@ describe("@routr/pgdata/mappers/peer", () => { username: "asterisk", aor: "backendx:aor-01", contactAddr: "192.168.1.12:5060", + maxContacts: -1, enabled: true, createdAt: new Date().getTime() / 1000, updatedAt: new Date().getTime() / 1000, diff --git a/mods/rtprelay/src/service.ts b/mods/rtprelay/src/service.ts index 5357fa56c..3ade84b95 100644 --- a/mods/rtprelay/src/service.ts +++ b/mods/rtprelay/src/service.ts @@ -74,7 +74,7 @@ export default function rtprelay( if (H.isInviteOrAckWithSDP(req)) { return await sendRequest(offer) } else if (H.isRinging(req) && direction === Direction.WEB_TO_PHONE) { - // Fixme: This was added to prevent the ringing message from being sent to the + // FIXME: This was added to prevent the ringing message from being sent to the // caller while the call is being established. This is a temporary fix req.message.body = "" return res.send(req) diff --git a/mods/simpledata/src/loaders/agents.ts b/mods/simpledata/src/loaders/agents.ts index 8a1e65944..0183479dd 100644 --- a/mods/simpledata/src/loaders/agents.ts +++ b/mods/simpledata/src/loaders/agents.ts @@ -34,5 +34,8 @@ export function agentsLoader( list ) as CC.Credentials + // maxContacts -1 means no limit + agent.maxContacts = agent.maxContacts || -1 + return agent } diff --git a/mods/simpledata/src/loaders/peers.ts b/mods/simpledata/src/loaders/peers.ts index 88ade9b8a..ff43bc143 100644 --- a/mods/simpledata/src/loaders/peers.ts +++ b/mods/simpledata/src/loaders/peers.ts @@ -43,5 +43,8 @@ export function peersLoader( list ) as CC.Credentials + // maxContacts -1 means no limit + peer.maxContacts = peer.maxContacts || -1 + return peer } From bf1f7705d31d709a27f4632cab4b29b79497f547 Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Sun, 11 Feb 2024 19:08:36 -0500 Subject: [PATCH 17/18] chore: cleanup code --- mods/common/src/auth.ts | 67 ++--------------------- mods/common/src/index.ts | 1 + mods/common/src/response.ts | 78 +++++++++++++++++++++++++++ mods/common/test/common.unit.test.ts | 3 +- mods/connect/src/access.ts | 21 ++++---- mods/connect/src/handlers/register.ts | 11 ++-- mods/connect/src/router.ts | 8 +-- mods/simpleauth/src/service.ts | 11 ++-- 8 files changed, 113 insertions(+), 87 deletions(-) create mode 100644 mods/common/src/response.ts diff --git a/mods/common/src/auth.ts b/mods/common/src/auth.ts index 882a869a9..1bb4da3b4 100644 --- a/mods/common/src/auth.ts +++ b/mods/common/src/auth.ts @@ -16,16 +16,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { AuthChallengeResponse, ResponseType } from "./types" +import { AuthChallengeResponse } from "./types" import crypto from "crypto" -const DEFAULT_ALGORITHM = "MD5" +export const DEFAULT_ALGORITHM = "MD5" const md5hex = (str: string, algorithm = DEFAULT_ALGORITHM) => crypto.createHash(algorithm).update(str).digest("hex") -const decToHex = (dec: number) => - (dec + Math.pow(16, 8)).toString(16).substr(-8) +const decToHex = (dec: number) => (dec + Math.pow(16, 8)).toString(16).slice(-8) export const generateNonce = (algorithm: string = DEFAULT_ALGORITHM) => md5hex(`${new Date().getTime()}${Math.random()}`, algorithm) @@ -54,63 +53,3 @@ export const getCredentials = ( username: string, users: { username: string; secret: string }[] ) => users.find((user) => user.username === username) - -export const createUnauthorizedResponse = ( - realm: string, - params: { - qop: string - algorithm: string - } = { qop: "auth", algorithm: DEFAULT_ALGORITHM } -) => { - return { - message: { - responseType: ResponseType.UNAUTHORIZED, - reasonPhrase: "Unauthorized", - wwwAuthenticate: { - scheme: "Digest", - realm: realm, - qop: params.qop, - opaque: "", - stale: false, - nonce: generateNonce(), - algorithm: params.algorithm - } - } - } -} - -export const createUnauthorizedResponseWithoutChallenge = ( - metadata?: Record -) => { - return { - metadata, - message: { - responseType: ResponseType.UNAUTHORIZED, - reasonPhrase: "Unauthorized" - } - } -} - -// FIXME: Doesn't belong in Auth module -export const createServerInternalErrorResponse = ( - metadata?: Record -) => { - return { - metadata, - message: { - responseType: ResponseType.SERVER_INTERNAL_ERROR, - reasonPhrase: "Server Internal Error" - } - } -} - -// FIXME: Doesn't belong in Auth module -export const createForbideenResponse = (metadata?: Record) => { - return { - metadata, - message: { - responseType: ResponseType.FORBIDDEN, - reasonPhrase: "Forbidden" - } - } -} diff --git a/mods/common/src/index.ts b/mods/common/src/index.ts index 00c48a047..54195b3c1 100644 --- a/mods/common/src/index.ts +++ b/mods/common/src/index.ts @@ -59,6 +59,7 @@ export * as Tracer from "./tracer" export * as Assertions from "./assertions" export * as CommonConnect from "./connect" export * as CommonRequester from "./requester" +export * as CommonResponse from "./response" export * as CommonTypes from "./types" export * as CommonErrors from "./errors" export * as ConnectSchemas from "./connect/schemas" diff --git a/mods/common/src/response.ts b/mods/common/src/response.ts new file mode 100644 index 000000000..653f3f39f --- /dev/null +++ b/mods/common/src/response.ts @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com) + * http://github.com/fonoster/routr + * + * This file is part of Routr. + * + * Licensed under the MIT License (the "License"); + * you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * https://opensource.org/licenses/MIT + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { DEFAULT_ALGORITHM, generateNonce } from "./auth" +import { ResponseType } from "./types" + +export const createUnauthorizedResponse = ( + realm: string, + params: { + qop: string + algorithm: string + } = { qop: "auth", algorithm: DEFAULT_ALGORITHM } +) => { + return { + message: { + responseType: ResponseType.UNAUTHORIZED, + reasonPhrase: "Unauthorized", + wwwAuthenticate: { + scheme: "Digest", + realm: realm, + qop: params.qop, + opaque: "", + stale: false, + nonce: generateNonce(), + algorithm: params.algorithm + } + } + } +} + +export const createUnauthorizedResponseWithoutChallenge = ( + metadata?: Record +) => { + return { + metadata, + message: { + responseType: ResponseType.UNAUTHORIZED, + reasonPhrase: "Unauthorized" + } + } +} + +export const createServerInternalErrorResponse = ( + metadata?: Record +) => { + return { + metadata, + message: { + responseType: ResponseType.SERVER_INTERNAL_ERROR, + reasonPhrase: "Server Internal Error" + } + } +} + +export const createForbideenResponse = (metadata?: Record) => { + return { + metadata, + message: { + responseType: ResponseType.FORBIDDEN, + reasonPhrase: "Forbidden" + } + } +} diff --git a/mods/common/test/common.unit.test.ts b/mods/common/test/common.unit.test.ts index 46a6b0a2b..db7b6bcf0 100644 --- a/mods/common/test/common.unit.test.ts +++ b/mods/common/test/common.unit.test.ts @@ -22,7 +22,8 @@ import sinonChai from "sinon-chai" import { getObjectProto } from "../src/service" import { addressCount, getLocalnetIp, isLocalnet } from "../src/ip_utils" import { getRedisUrlFromConfig } from "../src/redis" -import { createUnauthorizedResponse, getCredentials } from "../src/auth" +import { getCredentials } from "../src/auth" +import { createUnauthorizedResponse } from "../src/response" import { ResponseType } from "../src/types" const expect = chai.expect diff --git a/mods/connect/src/access.ts b/mods/connect/src/access.ts index f5f2a73a1..3454b1642 100644 --- a/mods/connect/src/access.ts +++ b/mods/connect/src/access.ts @@ -22,6 +22,7 @@ import { MessageRequest, CommonTypes as CT, CommonConnect as CC, + CommonResponse as CR, IpUtils } from "@routr/common" import { RoutingDirection } from "./types" @@ -40,11 +41,11 @@ export const checkAccess = async (accessRequest: { case RoutingDirection.PEER_TO_PSTN: case RoutingDirection.AGENT_TO_AGENT: case RoutingDirection.AGENT_TO_PSTN: - return checkAgentOrPeerAccess(request, caller as CC.RoutableResourceUnion) + return checkAgentOrPeerAccess(request, caller) case RoutingDirection.FROM_PSTN: return checkAccessFromPSTN(apiClient, request, callee as CC.INumber) case RoutingDirection.UNKNOWN: - return Auth.createForbideenResponse() + return CR.createForbideenResponse() } } @@ -68,10 +69,10 @@ export const checkAgentOrPeerAccess = async ( ) if (calcRes !== auth.response) { - return Auth.createUnauthorizedResponse(request.message.requestUri.host) + return CR.createUnauthorizedResponse(request.message.requestUri.host) } } else { - return Auth.createUnauthorizedResponse(request.message.requestUri.host) + return CR.createUnauthorizedResponse(request.message.requestUri.host) } } @@ -90,11 +91,11 @@ export const checkAccessFromPSTN = async ( // If the Trunk or Number doesn't exist reject the call if (!callee || !trunk) { - return Auth.createForbideenResponse() + return CR.createForbideenResponse() } if (callee.trunk.ref !== trunk.ref) { - return Auth.createForbideenResponse() + return CR.createForbideenResponse() } // Verify that the IP is allowlist which means getting the access control list for the trunk @@ -105,11 +106,11 @@ export const checkAccessFromPSTN = async ( })[0] if (!allow) { - return Auth.createUnauthorizedResponseWithoutChallenge() + return CR.createUnauthorizedResponseWithoutChallenge() } } catch (e) { logger.error(e) - return Auth.createServerInternalErrorResponse() + return CR.createServerInternalErrorResponse() } } @@ -130,10 +131,10 @@ export const checkAccessFromPSTN = async ( ) if (calcRes !== auth.response) { - return Auth.createUnauthorizedResponse(request.message.requestUri.host) + return CR.createUnauthorizedResponse(request.message.requestUri.host) } } else { - return Auth.createUnauthorizedResponse(request.message.requestUri.host) + return CR.createUnauthorizedResponse(request.message.requestUri.host) } } } diff --git a/mods/connect/src/handlers/register.ts b/mods/connect/src/handlers/register.ts index a071c6ef2..11c5aad0b 100644 --- a/mods/connect/src/handlers/register.ts +++ b/mods/connect/src/handlers/register.ts @@ -28,6 +28,7 @@ import { Auth, CommonConnect as CC, CommonTypes as CT, + CommonResponse as CR, Method, Verifier } from "@routr/common" @@ -59,7 +60,7 @@ export const handleRegister = ( )) as CC.Peer | CC.Agent if (!peerOrAgent) { - return res.send(Auth.createForbideenResponse()) + return res.send(CR.createForbideenResponse()) } const credentials = ( @@ -77,7 +78,7 @@ export const handleRegister = ( if (calcRes !== auth.response) { return res.send( - Auth.createUnauthorizedResponse(request.message.requestUri.host) + CR.createUnauthorizedResponse(request.message.requestUri.host) ) } @@ -110,7 +111,7 @@ export const handleRegister = ( )) as Verifier.VerifyResponse if (!payload.allowedMethods.includes(Method.REGISTER)) { - return res.send(Auth.createForbideenResponse()) + return res.send(CR.createForbideenResponse()) } await location.addRoute({ @@ -124,10 +125,10 @@ export const handleRegister = ( logger.verbose("unable to validate connect token", { originalError: e.message }) - res.send(Auth.createForbideenResponse()) + res.send(CR.createForbideenResponse()) } } else { - res.send(Auth.createUnauthorizedResponse(request.message.requestUri.host)) + res.send(CR.createUnauthorizedResponse(request.message.requestUri.host)) } } } diff --git a/mods/connect/src/router.ts b/mods/connect/src/router.ts index 3211a6221..6d37d3cf1 100644 --- a/mods/connect/src/router.ts +++ b/mods/connect/src/router.ts @@ -18,9 +18,9 @@ */ import { RoutingDirection } from "./types" import { - Auth, CommonConnect as CC, CommonTypes as CT, + CommonResponse as CR, HeaderModifier, Route, Method, @@ -69,7 +69,7 @@ export function router(location: ILocationService, apiClient: CC.APIClient) { try { if (!jwtVerifier) { - return Auth.createServerInternalErrorResponse() + return CR.createServerInternalErrorResponse() } const payload = (await jwtVerifier.verify( @@ -78,7 +78,7 @@ export function router(location: ILocationService, apiClient: CC.APIClient) { const domain = await findDomain(apiClient, payload.domain) if (!payload.allowedMethods.includes(Method.INVITE)) { - return Auth.createForbideenResponse() + return CR.createForbideenResponse() } caller = { @@ -116,7 +116,7 @@ export function router(location: ILocationService, apiClient: CC.APIClient) { logger.verbose("unable to validate connect token", { originalError: e.message }) - return Auth.createForbideenResponse() + return CR.createForbideenResponse() } } else { caller = await findResource(apiClient, fromURI.host, fromURI.user) diff --git a/mods/simpleauth/src/service.ts b/mods/simpleauth/src/service.ts index 1ca753564..03429ee00 100644 --- a/mods/simpleauth/src/service.ts +++ b/mods/simpleauth/src/service.ts @@ -19,7 +19,12 @@ */ import opentelemetry from "@opentelemetry/api" import Processor, { Response } from "@routr/processor" -import { MessageRequest, Auth, CommonTypes as CT } from "@routr/common" +import { + MessageRequest, + Auth, + CommonTypes as CT, + CommonResponse as CR +} from "@routr/common" import { User } from "./types" import { getLogger } from "@fonoster/logger" @@ -86,7 +91,7 @@ export default function simpleAuthMiddleware(config: { ) span.end() return res.send( - Auth.createUnauthorizedResponse(req.message.requestUri.host) + CR.createUnauthorizedResponse(req.message.requestUri.host) ) } } else { @@ -95,7 +100,7 @@ export default function simpleAuthMiddleware(config: { ) span.end() return res.send( - Auth.createUnauthorizedResponse(req.message.requestUri.host) + CR.createUnauthorizedResponse(req.message.requestUri.host) ) } // Forward request to next middleware From ac4122eed015ca9980245a6e32a384e275aff1ce Mon Sep 17 00:00:00 2001 From: Pedro Sanders Date: Sun, 11 Feb 2024 20:17:08 -0500 Subject: [PATCH 18/18] feat: allow configuration of maxContacts via CTL --- mods/ctl/src/commands/agents/create.ts | 5 +++++ mods/ctl/src/commands/agents/describe.ts | 1 + mods/ctl/src/commands/agents/get.ts | 9 +++++++-- mods/ctl/src/commands/agents/update.ts | 6 ++++++ mods/ctl/src/commands/peers/create.ts | 5 +++++ mods/ctl/src/commands/peers/describe.ts | 1 + mods/ctl/src/commands/peers/get.ts | 9 +++++++-- mods/ctl/src/commands/peers/update.ts | 6 ++++++ 8 files changed, 38 insertions(+), 4 deletions(-) diff --git a/mods/ctl/src/commands/agents/create.ts b/mods/ctl/src/commands/agents/create.ts index 32f18ebc9..cd86ebea1 100644 --- a/mods/ctl/src/commands/agents/create.ts +++ b/mods/ctl/src/commands/agents/create.ts @@ -108,6 +108,11 @@ Creating Agent Jhon Doe... b148b4b4-6884-4c06-bb7e-bd098f5fe793 type: "list", choices: [{ name: "None", value: undefined }, ...credentialsList] }, + { + name: "maxContacts", + message: "Max Contacts", + type: "input" + }, { name: "privacy", message: "Privacy", diff --git a/mods/ctl/src/commands/agents/describe.ts b/mods/ctl/src/commands/agents/describe.ts index 637d34b72..e9e670de2 100644 --- a/mods/ctl/src/commands/agents/describe.ts +++ b/mods/ctl/src/commands/agents/describe.ts @@ -49,6 +49,7 @@ export default class DescribeCommand extends BaseCommand { Name: agent.name, Username: agent.username, Domain: agent.domain?.domainUri || "None", + "Max Contacts": agent.maxContacts, Privacy: capitalize(agent.privacy), Credentials: agent.credentials ? { diff --git a/mods/ctl/src/commands/agents/get.ts b/mods/ctl/src/commands/agents/get.ts index 7d3aae19c..42acb9cbb 100644 --- a/mods/ctl/src/commands/agents/get.ts +++ b/mods/ctl/src/commands/agents/get.ts @@ -32,8 +32,8 @@ export default class GetAgentsCommand extends BaseCommand { static readonly examples = [ `<%= config.bin %> <%= command.id %> -Ref Name Username Domain Privacy Enabled -d31f5fb8-e367-42f7-9884-1a7999f53fe8 John Doe jdoe sip.local PRIVATE Yes +Ref Name Username Domain Max Contacts Privacy Enabled +d31f5fb8-e367-42f7-9884-1a7999f53fe8 John Doe jdoe sip.local 1 PRIVATE Yes ` ] @@ -84,6 +84,11 @@ d31f5fb8-e367-42f7-9884-1a7999f53fe8 John Doe jdoe sip.local PRIVATE Yes header: "Domain", get: (row: { domain: CC.Domain }) => row.domain?.domainUri || "None" }, + maxContacts: { + header: "Max Contacts", + get: (row: { maxContacts: number }) => + row.maxContacts === -1 ? "" : row.maxContacts + }, privacy: { header: "Privacy", get: (row: { privacy: CT.Privacy }) => capitalize(row.privacy) diff --git a/mods/ctl/src/commands/agents/update.ts b/mods/ctl/src/commands/agents/update.ts index e771ac929..1698fc2ec 100644 --- a/mods/ctl/src/commands/agents/update.ts +++ b/mods/ctl/src/commands/agents/update.ts @@ -107,6 +107,12 @@ Updating Agent John Doe... 80181ca6-d4aa-4575-9375-8f72b07d5555 choices: [{ name: "None", value: undefined }, ...credentialsList], default: agentFromDB.credentialsRef }, + { + name: "maxContacts", + message: "Max Contacts", + type: "input", + default: agentFromDB.maxContacts === -1 ? "" : agentFromDB.maxContacts + }, { name: "privacy", message: "Privacy", diff --git a/mods/ctl/src/commands/peers/create.ts b/mods/ctl/src/commands/peers/create.ts index 5cfa2265b..a80659af5 100644 --- a/mods/ctl/src/commands/peers/create.ts +++ b/mods/ctl/src/commands/peers/create.ts @@ -106,6 +106,11 @@ Creating Peer Asterisk Conference... b148b4b4-6884-4c06-bb7e-bd098f5fe793 type: "input", validate: contactAddrValidator }, + { + name: "maxContacts", + message: "Max Contacts", + type: "input" + }, { name: "accessControlListRef", message: "IP Access Control List", diff --git a/mods/ctl/src/commands/peers/describe.ts b/mods/ctl/src/commands/peers/describe.ts index bd1b1db72..400eba947 100644 --- a/mods/ctl/src/commands/peers/describe.ts +++ b/mods/ctl/src/commands/peers/describe.ts @@ -50,6 +50,7 @@ export default class DescribeCommand extends BaseCommand { "Balancing Algorithm": peer.balancingAlgorithm, "Session Affinity?": peer.withSessionAffinity ? "Yes" : "No", "Contact Address": peer.contactAddr, + "Max Contacts": peer.maxContacts, Enabled: peer.enabled ? "Yes" : "No", "Access Control List": peer.accessControlList ? { diff --git a/mods/ctl/src/commands/peers/get.ts b/mods/ctl/src/commands/peers/get.ts index 40d691397..e56ab22d2 100644 --- a/mods/ctl/src/commands/peers/get.ts +++ b/mods/ctl/src/commands/peers/get.ts @@ -31,8 +31,8 @@ export default class GetCommand extends BaseCommand { static readonly examples = [ `<%= config.bin %> <%= command.id %> -Ref Name Username AOR Balancing Algorithm Session Affinity -6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference sip:conference@sip.local ROUND_ROBIN Yes +Ref Name Username AOR Max Contacts Balancing Algorithm Session Affinity +6f941c63-880c-419a-a72a-4a107cbaf5c5 Asterisk Conference conference sip:conference@sip.local 1 ROUND_ROBIN Yes ` ] @@ -82,6 +82,11 @@ Ref Name Username AOR aor: { header: "AOR" }, + maxContacts: { + header: "Max Contacts", + get: (row: { maxContacts: number }) => + row.maxContacts === -1 ? "" : row.maxContacts + }, enabled: { header: "Enabled", get: (row: { enabled: boolean }) => (row.enabled ? "Yes" : "No") diff --git a/mods/ctl/src/commands/peers/update.ts b/mods/ctl/src/commands/peers/update.ts index e20e288b7..f0bd309c7 100644 --- a/mods/ctl/src/commands/peers/update.ts +++ b/mods/ctl/src/commands/peers/update.ts @@ -108,6 +108,12 @@ Updating Peer Asterisk Conf... 80181ca6-d4aa-4575-9375-8f72b07d5555 default: peerFromDB.contactAddr || undefined, validate: contactAddrValidator }, + { + name: "maxContacts", + message: "Max Contacts", + type: "input", + default: peerFromDB.maxContacts === -1 ? "" : peerFromDB.maxContacts + }, { name: "accessControlListRef", message: "IP Access Control List",