* 'Add new script'

* Update asterisk.json

* Update asterisk.json

* Update asterisk-install.sh

* Update asterisk.sh

* Update asterisk-install.sh

* Update asterisk-install.sh

* Update asterisk.sh

* noob STD service call

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
push-app-to-main[bot] 2025-05-14 14:28:37 +02:00 committed by GitHub
parent 7d0a964918
commit e24636133d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 130 additions and 0 deletions

35
ct/asterisk.sh Normal file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://asterisk.org/
APP="Asterisk"
var_tags="${var_tags:-telephone;pbx}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
msg_error "No Update function provided for ${APP} LXC"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

6
ct/headers/asterisk Normal file
View File

@ -0,0 +1,6 @@
___ __ _ __
/ | _____/ /____ _____(_)____/ /__
/ /| | / ___/ __/ _ \/ ___/ / ___/ //_/
/ ___ |(__ ) /_/ __/ / / (__ ) ,<
/_/ |_/____/\__/\___/_/ /_/____/_/|_|

View File

@ -0,0 +1,33 @@
{
"name": "Asterisk",
"slug": "asterisk",
"categories": [0],
"date_created": "2025-05-14",
"type": "ct",
"updateable": false,
"privileged": false,
"interface_port": null,
"documentation": "https://docs.asterisk.org/",
"config_path": "/etc/asterisk",
"website": "https://asterisk.org/",
"logo": "https://docs.asterisk.org/favicon.ico",
"description": "Asterisk is an open-source framework for building communications applications, most commonly used as a phone system (PBX). Developed by Digium (now part of Sangoma), it turns a standard computer into a powerful telephony server.",
"install_methods": [
{
"type": "default",
"script": "ct/asterisk.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 4,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

View File

@ -0,0 +1,56 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://asterisk.org
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
libsrtp2-dev \
build-essential \
libedit-dev \
uuid-dev \
libjansson-dev \
libxml2-dev \
libsqlite3-dev
msg_ok "Installed Dependencies"
msg_info "Downloading Asterisk"
RELEASE=$(curl -fsSL https://downloads.asterisk.org/pub/telephony/asterisk/ | grep -o 'asterisk-[0-9]\+-current\.tar\.gz' | sort -V | tail -n1)
temp_file=$(mktemp)
curl -fsSL "https://downloads.asterisk.org/pub/telephony/asterisk/${RELEASE}" -o "$temp_file"
mkdir -p /opt/asterisk
tar zxf "$temp_file" --strip-components=1 -C /opt/asterisk
cd /opt/asterisk
msg_ok "Downloaded Asterisk"
msg_info "Installing Asterisk"
$STD ./contrib/scripts/install_prereq install
$STD ./configure
$STD make -j$(nproc)
$STD make install
$STD make config
$STD make install-logrotate
$STD make samples
mkdir -p /etc/radiusclient-ng/
ln /etc/radcli/radiusclient.conf /etc/radiusclient-ng/radiusclient.conf
systemctl enable -q --now asterisk
msg_ok "Installed Asterisk"
motd_ssh
customize
msg_info "Cleaning up"
rm -f "$temp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"