mob next [ci-skip] [ci skip] [skip ci]

lastFile:modules/clan/phonebox/default.nix
This commit is contained in:
2025-10-28 16:03:13 +07:00
parent fefaba2a55
commit 6d622c4937
2 changed files with 35 additions and 5 deletions

View File

@@ -47,7 +47,6 @@ in
domain = "localhost"; domain = "localhost";
dhcp-range = [ dhcp-range = [
"192.168.254.100,192.168.254.100,255.255.255.0,24h" "192.168.254.100,192.168.254.100,255.255.255.0,24h"
"${ipv6Subnet}10,${ipv6Subnet}240,slaac"
]; ];
dhcp-option = [ dhcp-option = [
"3,192.168.254.1" "3,192.168.254.1"

View File

@@ -11,6 +11,11 @@
lib, lib,
... ...
}: }:
let
ata-interface = "";
rtpPortFrom = 10000;
rtpPortTo = 20000;
in
{ {
networking.interfaces = { networking.interfaces = {
${ata-interface} = { ${ata-interface} = {
@@ -37,7 +42,6 @@
]; ];
dhcp-option = [ dhcp-option = [
"3,192.168.254.1" "3,192.168.254.1"
"option6:information-refresh-time,3600"
]; ];
interface = [ ata-interface ]; interface = [ ata-interface ];
}; };
@@ -56,8 +60,8 @@
networking.firewall.allowedUDPPortRanges = [ networking.firewall.allowedUDPPortRanges = [
{ {
from = 10000; from = rtpPortFrom;
to = 20000; to = rtpPortTo;
} }
]; ];
@@ -69,7 +73,6 @@
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
53 53
80 80
443
]; ];
services.asterisk = { services.asterisk = {
@@ -106,6 +109,12 @@
exten => 8001,1,Dial(PJSIP/8001@kurogeek,20) exten => 8001,1,Dial(PJSIP/8001@kurogeek,20)
''; '';
"rtp.conf" = ''
[general]
rtpstart=10000
rtpend=20000
'';
"pjsip.conf" = '' "pjsip.conf" = ''
[transport-udp] [transport-udp]
type=transport type=transport
@@ -116,6 +125,28 @@
protocol=udp protocol=udp
bind=:: bind=::
[base_endpoint](!)
type=endpoint
disallow=all
allow=ulaw,alaw,g722,gsm
direct_media=no
[internal_endpoint](!,base_endpoint)
context=from-internal
[external_endpoint](!,base_endpoint)
context=from-external
[userpass_auth](!)
type=auth
auth_type=userpass
[ip_auth](!)
type=identify
endpoint=external
[dynamiic_aor](!)
[kurogeek] [kurogeek]
type=endpoint type=endpoint
context=from-kurogeek context=from-kurogeek