From 5f3a3707aaa66c97b98e60c3590882aff3a0d769 Mon Sep 17 00:00:00 2001 From: kevinnguyenai Date: Mon, 6 Sep 2021 15:15:22 +0700 Subject: [PATCH] dev dispatcher --- docker-compose.yml | 21 +++++++++++++++++---- kamailio/kamailio.cfg | 4 +++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 117b81d..0d4d5b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,24 @@ version: '2.3' services: asterisk: - image: andrius/asterisk:debian-15-current + image: fgst/asterisk:base + cap_add: + - sys_ptrace # Only here to help testing + - net_admin # Allow NFT, used by AutoBan + - net_raw # Allow NFT, used by AutoBan + environment: + - SYSLOG_LEVEL=${SYSLOG_LEVEL-4} # Logging + - HOSTNAME=${TELE_SRV-tele}.${DOMAIN-docker.localhost} + - PULSE_SERVER=unix:/run/pulse/socket # Use host audio + - PULSE_COOKIE=/run/pulse/cookie # Use host audio + - WEBSMSD_PORT=${WEBSMSD_PORT-80} # WEBSMSD internal port + volumes: + - tele_conf:/srv # Persistent storage + - ./pulse:/run/pulse:rshared # Use host audio + - /etc/localtime:/etc/localtime:ro # Use host timezone deploy: mode: replicated - replicas: 1 - ports: - - "5060:5060" + replicas: 3 networks: local: aliases: @@ -57,3 +69,4 @@ networks: volumes: asterisk_conf: asterisk_spool: + tele_conf: diff --git a/kamailio/kamailio.cfg b/kamailio/kamailio.cfg index 9eaa5fb..5fab240 100644 --- a/kamailio/kamailio.cfg +++ b/kamailio/kamailio.cfg @@ -171,13 +171,15 @@ request_route { route(PRESENCE); # handle registrations - route(REGISTRAR); + #route(REGISTRAR); + /* if ($rU==$null) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; } + */ # dispatch destinations route(DISPATCH);