From 336ee6371d7e74d545bf10953380eff87fee0cd9 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Thu, 30 Oct 2025 15:09:53 +0700 Subject: [PATCH] mob next [ci-skip] [ci skip] [skip ci] lastFile:modules/clan/phonebox/default.nix --- modules/clan/phonebox/default.nix | 58 ++++++++++++++++++------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/modules/clan/phonebox/default.nix b/modules/clan/phonebox/default.nix index 95ccbb9..80f0c92 100644 --- a/modules/clan/phonebox/default.nix +++ b/modules/clan/phonebox/default.nix @@ -250,37 +250,45 @@ rtpend=${rtpPortTo} ''; - "pjsip.conf" = '' - [transport-udp] - type=transport - protocol=udp - bind=0.0.0.0 - [transport-udp6] - type=transport - protocol=udp - bind=:: + "pjsip.conf" = + let + serverConf = builtins.foldl' ( + conf: node: conf ++ (genServerSIPEndpoint node.hostname node.address) + ) "" nodes; + in + '' + [transport-udp] + type=transport + protocol=udp + bind=0.0.0.0 + [transport-udp6] + type=transport + protocol=udp + bind=:: - [base_endpoint](!) - type=endpoint - disallow=all - allow=ulaw,alaw,g722,gsm - direct_media=no + [base_endpoint](!) + type=endpoint + disallow=all + allow=ulaw,alaw,g722,gsm + direct_media=no - [internal_endpoint](!,base_endpoint) - context=from-internal + [internal_endpoint](!,base_endpoint) + context=from-internal - [userpass_auth](!) - type=auth - auth_type=userpass + [userpass_auth](!) + type=auth + auth_type=userpass - [ip_auth](!) - type=identify - endpoint=external + [ip_auth](!) + type=identify + endpoint=external - [dynamiic_aor](!) - type=aor + [dynamiic_aor](!) + type=aor - ''; + '' + + (genLocalSIPEndpoint config.clan.core.vars.generators.phonebox.files.ata-local-number) + + serverConf; }; }; };