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

@@ -11,6 +11,11 @@
lib,
...
}:
let
ata-interface = "";
rtpPortFrom = 10000;
rtpPortTo = 20000;
in
{
networking.interfaces = {
${ata-interface} = {
@@ -37,7 +42,6 @@
];
dhcp-option = [
"3,192.168.254.1"
"option6:information-refresh-time,3600"
];
interface = [ ata-interface ];
};
@@ -56,8 +60,8 @@
networking.firewall.allowedUDPPortRanges = [
{
from = 10000;
to = 20000;
from = rtpPortFrom;
to = rtpPortTo;
}
];
@@ -69,7 +73,6 @@
networking.firewall.allowedTCPPorts = [
53
80
443
];
services.asterisk = {
@@ -106,6 +109,12 @@
exten => 8001,1,Dial(PJSIP/8001@kurogeek,20)
'';
"rtp.conf" = ''
[general]
rtpstart=10000
rtpend=20000
'';
"pjsip.conf" = ''
[transport-udp]
type=transport
@@ -116,6 +125,28 @@
protocol=udp
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]
type=endpoint
context=from-kurogeek