Skip to content

Commit

Permalink
Merge branch 'main' into EA-41
Browse files Browse the repository at this point in the history
  • Loading branch information
Stell0 committed Jan 8, 2025
2 parents a7af86f + 140611c commit 962a025
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/create-testing-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: NS8 Release on PR Merge to Main

on:
pull_request:
types: [closed]
paths-ignore:
- '.github/**'
- 'tests/**'
- 'README.md'
- '.gitignore'
- 'LICENSE'
- 'renovate.json'
- 'test-module.sh'

env:
GH_TOKEN: ${{ secrets.NS8_MODULE_RELEASES_TOKEN }}

jobs:
release-module:
if: >
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest

steps:
- name: Install NS8 Release Module Extension
run: gh extension install NethServer/gh-ns8-release-module

- name: Create Testing Release
run: gh ns8-release-module create --repo ${{ github.repository }} --testing
25 changes: 25 additions & 0 deletions .github/workflows/label-pr-from-weblate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Label PR from Weblate"

on:
pull_request:
types: [opened]

jobs:
label-pr:
runs-on: ubuntu-latest
steps:
- name: Check if PR is from Weblate
id: check_weblate
run: |
if [[ "${{ github.event.pull_request.user.login }}" == "weblate" ]]; then
echo "from_weblate=true" >> $GITHUB_OUTPUT
else
echo "from_weblate=false" >> $GITHUB_OUTPUT
fi
- name: Assign label
if: steps.check_weblate.outputs.from_weblate == 'true'
uses: actions/labeler@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
labels: 'translation'
11 changes: 11 additions & 0 deletions imageroot/events/support-session-started/10enable_siptrace
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

exec 1>&2
set -e

podman exec kamailio kamcmd siptrace.status on
11 changes: 11 additions & 0 deletions imageroot/events/support-session-stopped/10disable_siptrace
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

exec 1>&2
set -e

podman exec kamailio kamcmd siptrace.status off
14 changes: 9 additions & 5 deletions modules/kamailio/config/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ loadmodule "http_async_client.so"
loadmodule "acc.so"
loadmodule "uac.so"
loadmodule "sdpops.so"
#!ifdef WITH_SIPTRACE
loadmodule "siptrace.so"
#!endif


# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -169,15 +167,13 @@ modparam("pv", "shvset", "fakeprack=i:0")
#!ifdef WITH_TLS
modparam("tls", "config", "/etc/kamailio/tls/")
#!endif
#!ifdef WITH_SIPTRACE
modparam("siptrace", "trace_mode", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_on", 0)
modparam("siptrace", "duplicate_uri", "sip:127.0.0.1:5065")
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 2)
modparam("siptrace", "hep_capture_id", 1)
#!endif

# -----------------------------------------------------------------------------
# Routing Logic
Expand Down Expand Up @@ -793,6 +789,14 @@ failure_route[MANAGE_FAILURE] {
# event_route[topos:msg-sending]
# -----------------------------------------------------------------------------
event_route[topos:msg-sending] {
if is_method("INVITE") {
if($hdr(topos) == "0") {
xlog('L_INFO', "(event_route[topos:msg-sending]) $ci $rm-$cs topos: $hdr(topos) ----- will not apply topos\n");
remove_hf("topos");
msg_apply_changes();
drop;
}
}
if ($rd!=$null) {
if is_method("OPTIONS|NOTIFY|SUBSCRIBE") {
drop;
Expand Down
1 change: 0 additions & 1 deletion modules/kamailio/config/template.kamailio-local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#!define WITH_TLS
#!define LOCALNETWORKS "${LOCALNETWORKS}"
#!define PRIVATE_IP "${PRIVATE_IP}"
##!define WITH_SIPTRACE

server_header="Server: ${KML_SERVER_HEADER}"
user_agent_header="User-Agent: ${KML_UA_HEADER}"
Expand Down

0 comments on commit 962a025

Please sign in to comment.