diff --git a/src/basic-install.sh b/src/basic-install.sh index 7811af01..76c1f2da 100755 --- a/src/basic-install.sh +++ b/src/basic-install.sh @@ -13,7 +13,7 @@ export PATH+=':/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' readonly PKS_GIT_URL="https://raw.githubusercontent.com/mwolff44/pyfreebilling" readonly PKS_INSTALL_DIR="/srv/pks/scripts" readonly PKS_BIN_DIR="/usr/local/bin" -readonly VERSION="v4.0.1" +readonly VERSION="v4.1.2" # Install the PKS script from repository installScript() { diff --git a/src/pks b/src/pks index 36274f67..f3b8fdb2 100755 --- a/src/pks +++ b/src/pks @@ -10,7 +10,7 @@ export PATH+=':/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' # Variables -VERSION="v4.1.1" +VERSION="v4.1.2" readonly PKS_GIT_URL="https://raw.githubusercontent.com/mwolff44/pyfreebilling" readonly DATA_DIR="/srv" ENV_FILE="/srv/pks/.env" @@ -377,6 +377,9 @@ installFunc(){ # Create necessary directories install -d "${DATA_DIR}/pks/db" install -d "${DATA_DIR}/pks/redis" + install -d "${DATA_DIR}/pks/caddy" + install -d "${DATA_DIR}/pks/caddy/config" + install -d "${DATA_DIR}/pks/caddy/data" # Create files for configuration [[ -f "${DATA_DIR}/pks/.env" ]] || touch "${DATA_DIR}/pks/.env" @@ -390,7 +393,7 @@ installFunc(){ # [[ -f "${DATA_DIR}/pks/db/version" ]] || curl -fsSL -o "${DATA_DIR}/pks/db/version" "$PKS_GIT_URL/$VERSION/src/sip/db/version" ## Define env variables - if [ -f "${DATA_DIR}/pks/.install.lock" ]; then + if [[ -f "${DATA_DIR}/pks/.install.lock" ]]; then printf " %b %b Not a new install. Edit manually .env file for any changes! %b\\n" "${TICK}" "${COL_YELLOW}" "${COL_NC}" else # Set DBTEXT as DB diff --git a/src/sip/docker-compose.yml b/src/sip/docker-compose.yml index 4d4e1602..b6549ab5 100644 --- a/src/sip/docker-compose.yml +++ b/src/sip/docker-compose.yml @@ -8,7 +8,7 @@ services: pks-sip: container_name: pks-sip hostname: sip.pks.local - image: mwolff44w/pks-sipproxy:v4.1.1 + image: mwolff44w/pks-sipproxy:v4.1.2 restart: unless-stopped volumes: - pks-db-data:/etc/kamailio/db:ro @@ -116,8 +116,8 @@ services: restart: unless-stopped volumes: - $PWD/Caddyfile:/etc/caddy/Caddyfile - - caddy-config:/config - - caddy-data:/data + - pks-caddy-config:/config + - pks-caddy-data:/data logging: driver: "json-file" options: @@ -132,7 +132,7 @@ services: pks-admin: container_name: pks-admin hostname: admin.pks.local - image: mwolff44w/pks-admin:v1.3.0 + image: mwolff44w/pks-admin:v1.3.1 restart: unless-stopped depends_on: pks-db: @@ -165,3 +165,15 @@ volumes: type: 'none' o: 'bind' device: '/srv/pks/db' + pks-caddy-config: + driver: local + driver_opts: + type: 'none' + o: 'bind' + device: '/srv/pks/caddy/config' + pks-caddy-data: + driver: local + driver_opts: + type: 'none' + o: 'bind' + device: '/srv/pks/caddy/data' diff --git a/src/sip/kamailio.cfg b/src/sip/kamailio.cfg index c6127e9d..956232a1 100644 --- a/src/sip/kamailio.cfg +++ b/src/sip/kamailio.cfg @@ -504,14 +504,6 @@ route[REQINIT] { xlog("Malformed SIP request from $si:$sp\n"); exit; } - - if (is_method("INVITE")) { - if !($rU =~ "^[0-9]{1,15}$") { - # we expect the R-URI username to consist of up to 15 digits only - xlog("Malformed R-URI username: '$rU'\n"); - exit; - } - } } # Handle requests within SIP dialogs