chore: initialize go-sip repository
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Release packages
|
||||
|
||||
`../build-package.sh` writes the self-contained Linux package and checksum here:
|
||||
|
||||
```text
|
||||
sip-go-agent-<locked-version>-linux-amd64.tar.gz
|
||||
sip-go-agent-<locked-version>-linux-amd64.tar.gz.sha256
|
||||
```
|
||||
|
||||
The package contains only the SIP Agent/Dispatcher business binary, module
|
||||
checksums, manifest, systemd units, safe environment templates, endpoint
|
||||
template, version lock and `install.sh`. It contains no credentials,
|
||||
certificates, phone log key, audio, provider configuration, MQ/OSS/AI runtime or
|
||||
SaaS infrastructure.
|
||||
|
||||
Asterisk 22.10.1 source, its third-party dependency cache and a validated
|
||||
native stage are staged separately under `asterisk-22.10.1-*` and
|
||||
`asterisk-22.10.1-native/`, with SHA-256 files and a locked Git commit. A management-approved physical Cell release can
|
||||
use `deploys/cell/build-asterisk-native.sh` or the native stage, then must
|
||||
own its systemd unit/config;
|
||||
this Go package does not rewrite Asterisk. RabbitMQ, OSS and AI are SaaS
|
||||
infrastructure endpoints rather than packages here; this directory does not
|
||||
turn any of them into Docker services.
|
||||
@@ -0,0 +1,2 @@
|
||||
6077c52677206a84304979b226322283 jansson-2.15.0.tar.bz2
|
||||
baacc87418a95107657039269bc71538 pjproject-2.17.tar.bz2
|
||||
@@ -0,0 +1,2 @@
|
||||
a7eac7765000373165f9373eb748be039c10b2efc00be9af3467ec92357d8954 jansson-2.15.0.tar.bz2
|
||||
04b2eb1f0f01aa0ad1945b167171843448a51aa6b7c3e806496d434f13a112b7 pjproject-2.17.tar.bz2
|
||||
@@ -0,0 +1 @@
|
||||
68006a1a8efed288be4ca4a2ae3cb9554a31d733eac08eaacf4c646c95faf74d asterisk-22.10.1-native-stage.tar
|
||||
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=Asterisk SIP Cell 22.10.1 (physical host)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=asterisk
|
||||
Group=asterisk
|
||||
WorkingDirectory=/var/lib/asterisk
|
||||
ExecStart=/usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg
|
||||
ExecStop=/usr/sbin/asterisk -rx "core stop now"
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
UMask=0077
|
||||
LimitNOFILE=65536
|
||||
PrivateTmp=yes
|
||||
ProtectHome=yes
|
||||
ReadWritePaths=/etc/asterisk /var/lib/asterisk /var/log/asterisk /var/spool/asterisk /var/run/asterisk
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
[[ ${EUID} -eq 0 ]] || { echo 'install-asterisk-native.sh must run as root' >&2; exit 1; }
|
||||
START=false
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--start) START=true ;;
|
||||
*) echo "unknown option: $arg" >&2; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
PACKAGE_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||
cd -- "$PACKAGE_DIR"
|
||||
. /etc/os-release
|
||||
[[ ${ID:-} == debian && ${VERSION_ID:-} == 13 ]] || { echo 'Debian 13 is required' >&2; exit 1; }
|
||||
[[ $(uname -m) == x86_64 ]] || { echo 'amd64 host is required' >&2; exit 1; }
|
||||
STAGE=asterisk-22.10.1-native-stage.tar
|
||||
sha256sum -c "$STAGE.sha256"
|
||||
[[ -f asterisk.service ]] || { echo 'asterisk.service is missing' >&2; exit 1; }
|
||||
getent group asterisk >/dev/null || groupadd --system asterisk
|
||||
id -u asterisk >/dev/null 2>&1 || useradd --system --home-dir /var/lib/asterisk --shell /usr/sbin/nologin --gid asterisk asterisk
|
||||
# Keep management-owned /etc/asterisk configuration intact.
|
||||
tar --exclude='etc/asterisk/*' -xpf "$STAGE" -C /
|
||||
ldconfig
|
||||
install -d -o asterisk -g asterisk -m 0750 /var/lib/asterisk /var/log/asterisk /var/spool/asterisk /var/run/asterisk
|
||||
install -o root -g root -m 0644 asterisk.service /etc/systemd/system/asterisk.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable asterisk.service
|
||||
if [[ "$START" == true ]]; then
|
||||
systemctl restart asterisk.service
|
||||
fi
|
||||
/usr/sbin/asterisk -V
|
||||
printf 'installed asterisk=22.10.1 start=%s config_preserved=true\n' "$START"
|
||||
@@ -0,0 +1 @@
|
||||
373c98f4d4a1b923b42def0aee03f4e36aca9d1c244a8eeda646da8a97f89663 asterisk-22.10.1-source.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
fd38deece346f1f8ef820a465d41046ccf04ffa2a67c0791dba452a6234b00e5 deploys/packages/sip-go-agent-0.1.0-p1.20260919-linux-amd64.tar.gz
|
||||
Reference in New Issue
Block a user