Skip to content

Commit

Permalink
Merge pull request #263 from fonoster/feat/add-support-for-late-sdp-o…
Browse files Browse the repository at this point in the history
…ffer

Add support for late sdp offer
  • Loading branch information
psanders authored Mar 11, 2024
2 parents f1e1d36 + d94779a commit bd3fe13
Show file tree
Hide file tree
Showing 33 changed files with 251 additions and 220 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/charts-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ jobs:
persist-credentials: false
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4.1.0
with:
version: latest
token: ${{ secrets.DEPLOY_KEY }}
- name: Package charts
run: |
mv /tmp/charts charts
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/docker-hub-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- name: Login to GitHub Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Get the current version
Expand All @@ -35,11 +35,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the Routr One image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -57,11 +57,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the Edgeport image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -81,11 +81,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -104,11 +104,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -127,11 +127,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -150,11 +150,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -173,11 +173,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -196,11 +196,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -220,11 +220,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -243,11 +243,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -268,11 +268,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -293,11 +293,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand All @@ -316,11 +316,11 @@ jobs:
needs: [download_artifacts]
steps:
- name: Download build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: routr-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Publish the image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
cp -a routr/charts/* /tmp/charts
- name: Checkout current repo
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "20.x"
- name: Build and populate out directory
run: |
# Create out directories
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: Installing Node
uses: actions/setup-node@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "20.x"
- name: Build project
run: npm run make
- name: Check for next release
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
body: ${{ steps.changelog.outputs.changelog }}
draft: true
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: routr-build
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag-npm-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
node-version: "20.x"
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down
60 changes: 30 additions & 30 deletions .scripts/gen-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ const path = require("path");

// Function to recursively get all .js files from a directory and its subdirectories
function getJSFiles(dir) {
const files = fs.readdirSync(dir);
let jsFiles = [];
for (const file of files) {
const fullPath = path.join(dir, file);
if (fs.statSync(fullPath).isDirectory()) {
jsFiles = jsFiles.concat(getJSFiles(fullPath));
} else if (path.extname(fullPath) === '.js') {
jsFiles.push(fullPath);
}
const files = fs.readdirSync(dir);
let jsFiles = [];
for (const file of files) {
const fullPath = path.join(dir, file);
if (fs.statSync(fullPath).isDirectory()) {
jsFiles = jsFiles.concat(getJSFiles(fullPath));
} else if (path.extname(fullPath) === '.js') {
jsFiles.push(fullPath);
}
return jsFiles;
}
return jsFiles;
}

const outputFile = path.join(process.cwd(), 'README.md');
Expand All @@ -25,30 +25,30 @@ const allJSFiles = getJSFiles(path.join(process.cwd(), "dist"));
let fullDocumentation = ''; // Store the entire documentation here

for (const file of allJSFiles) {
const templateData = jsdoc2md.getTemplateDataSync({ files: file });

/* reduce templateData to an array of class names */
const classNames = templateData.reduce((names, identifier) => {
if (identifier.kind === "class") names.push(identifier.name);
return names;
}, []);

/* create a documentation section for each class */
for (const className of classNames) {
if (["Scanner", "Walker", "Parser", "Filter"].includes(className)) continue;
const template = `{{#class name="${className}"}}{{>docs}}{{/class}}\n`;
fullDocumentation += jsdoc2md.renderSync({
data: templateData,
template: template
});
}
const templateData = jsdoc2md.getTemplateDataSync({ files: file });

/* reduce templateData to an array of class names */
const classNames = templateData.reduce((names, identifier) => {
if (identifier.kind === "class") names.push(identifier.name);
return names;
}, []);

/* create a documentation section for each class */
for (const className of classNames) {
if (["Scanner", "Walker", "Parser", "Filter"].includes(className)) continue;
const template = `{{#class name="${className}"}}{{>docs}}{{/class}}\n`;
fullDocumentation += jsdoc2md.renderSync({
data: templateData,
template: template
});
}
}

const introFilePath = path.join(process.cwd(), ".intro.md");
if (fs.existsSync(introFilePath)) {
// If intro.md exists, prepend its content to the fullDocumentation
const introContent = fs.readFileSync(introFilePath, 'utf-8');
fullDocumentation = introContent + "\n\n" + fullDocumentation;
// If intro.md exists, prepend its content to the fullDocumentation
const introContent = fs.readFileSync(introFilePath, 'utf-8');
fullDocumentation = introContent + "\n\n" + fullDocumentation;
}

// Save the entire documentation to a single markdown file
Expand Down
1 change: 1 addition & 0 deletions etc/seet.json
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@
"transportMode": "u1",
"target": "sip01.edgeport.net:5060",
"domain": "sip.local",
"enabled": false,
"userAgents": [
{
"mode": "uas",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packages": ["mods/*"],
"version": "2.9.0"
"version": "2.9.1"
}
2 changes: 1 addition & 1 deletion mods/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@routr/common",
"version": "2.9.0",
"version": "2.9.1",
"description": "Common package",
"author": "Pedro Sanders <psanders@fonoster.com>",
"homepage": "https://github.com/fonoster/routr#readme",
Expand Down
8 changes: 4 additions & 4 deletions mods/connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@routr/connect",
"version": "2.9.0",
"version": "2.9.1",
"description": "Default processor",
"author": "Pedro Sanders <psanders@fonoster.com>",
"homepage": "https://github.com/fonoster/routr#readme",
Expand Down Expand Up @@ -28,9 +28,9 @@
"@opentelemetry/sdk-trace-base": "^1.0.4",
"@opentelemetry/sdk-trace-node": "^1.0.4",
"@opentelemetry/semantic-conventions": "^1.0.4",
"@routr/common": "^2.9.0",
"@routr/location": "^2.9.0",
"@routr/processor": "^2.9.0",
"@routr/common": "^2.9.1",
"@routr/location": "^2.9.1",
"@routr/processor": "^2.9.1",
"jsonwebtoken": "^9.0.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions mods/connect/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export const createRemotePartyId = (
}
}

// Q: Why is this a promise?
export const createTrunkAuthentication = async (
trunk: CC.Trunk
): Promise<HeaderModifier> => {
Expand Down
Loading

0 comments on commit bd3fe13

Please sign in to comment.