feat: add asterisk pjsip integration
- infrastructure/docker/asterisk.Dockerfile: Asterisk 22.10.1 LTS compilado do fonte oficial (Debian trixie nao distribui mais o pacote asterisk), com PJSIP, AMI, ARI, res_odbc/res_config_odbc, cdr_adaptive_odbc, cel_odbc, app_queue - infrastructure/asterisk/config: templates renderizados no entrypoint (secrets via envsubst, nunca versionados) + sorcery.conf/extconfig.conf para PJSIP realtime, dialplan de teste (extensao 600) - infrastructure/postgres/init/002-asterisk-realtime.sql: tabelas ps_endpoints/ps_auths/ps_aors/ps_contacts/ps_endpoint_id_ips/ ps_registrations/cdr/cel no schema 'asterisk' - infrastructure/nftables: protege AMI/ARI/SIP contra acesso pela LAN (interface ens18), trazido da Fase 9 do TODO para ja, sem afetar SSH nem a rede interna do Docker - docker-compose.yml: servico asterisk em network_mode: host (RTP); Postgres publicado em 127.0.0.1:5432 (nao 0.0.0.0) para o Asterisk alcanca-lo, ja que host network nao enxerga a rede Docker interna Testado: AMI login, ARI com auth (401 sem auth), pjsip realtime consultando Postgres sem erro, dialplan originate -> CDR e CEL gravados corretamente, healthcheck do compose passando.
This commit is contained in:
10
infrastructure/asterisk/config/http.conf
Normal file
10
infrastructure/asterisk/config/http.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
; Servidor HTTP embutido do Asterisk — necessário para ARI (res_ari) e para o
|
||||
; WebSocket usado por ARI. Mesma política de exposição do AMI/ARI: bind em
|
||||
; 0.0.0.0 pois o container roda em network_mode: host, mas o nftables bloqueia
|
||||
; acesso pela interface da LAN (ver infrastructure/nftables/b2bcall.nft).
|
||||
[general]
|
||||
enabled = yes
|
||||
bindaddr = 0.0.0.0
|
||||
bindport = 8088
|
||||
prefix =
|
||||
enablestatic = no
|
||||
Reference in New Issue
Block a user