mob next [ci-skip] [ci skip] [skip ci]
lastFile:modules/clan/phonebox/default.nix
This commit is contained in:
@@ -9,14 +9,40 @@
|
|||||||
perInstance.nixosModule =
|
perInstance.nixosModule =
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
ata-interface = "";
|
ata-interface = "";
|
||||||
rtpPortFrom = 10000;
|
rtpPortFrom = 10000;
|
||||||
rtpPortTo = 20000;
|
rtpPortTo = 20000;
|
||||||
|
|
||||||
|
genServerSIPEndpoint =
|
||||||
|
{ hostname, address }:
|
||||||
|
''
|
||||||
|
[${hostname}](internal_endpoint)
|
||||||
|
aors=${hostname}
|
||||||
|
|
||||||
|
[${hostname}](ip_auth)
|
||||||
|
endpoint=${hostname}
|
||||||
|
match=[${address}]
|
||||||
|
|
||||||
|
[${hostname}](dynamiic_aor)
|
||||||
|
contact=sip:[${address}]
|
||||||
|
'';
|
||||||
|
|
||||||
|
genLocalSIPEndpoint = {number
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
clan.core.vars.generators.phonebox = {
|
||||||
|
files = {
|
||||||
|
server-prefix.secret = false;
|
||||||
|
ata-number.secret = false;
|
||||||
|
ata-password.secret = true;
|
||||||
|
};
|
||||||
|
script = '''';
|
||||||
|
};
|
||||||
|
|
||||||
networking.interfaces = {
|
networking.interfaces = {
|
||||||
${ata-interface} = {
|
${ata-interface} = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
@@ -135,7 +161,7 @@
|
|||||||
context=from-internal
|
context=from-internal
|
||||||
|
|
||||||
[external_endpoint](!,base_endpoint)
|
[external_endpoint](!,base_endpoint)
|
||||||
context=from-external
|
context=from-internal
|
||||||
|
|
||||||
[userpass_auth](!)
|
[userpass_auth](!)
|
||||||
type=auth
|
type=auth
|
||||||
@@ -146,70 +172,10 @@
|
|||||||
endpoint=external
|
endpoint=external
|
||||||
|
|
||||||
[dynamiic_aor](!)
|
[dynamiic_aor](!)
|
||||||
|
|
||||||
[kurogeek]
|
|
||||||
type=endpoint
|
|
||||||
context=from-kurogeek
|
|
||||||
disallow=all
|
|
||||||
allow=ulaw
|
|
||||||
allow=alaw
|
|
||||||
allow=g722
|
|
||||||
allow=gsm
|
|
||||||
aors=kurogeek
|
|
||||||
direct_media=no
|
|
||||||
|
|
||||||
[kurogeek]
|
|
||||||
type=aor
|
type=aor
|
||||||
contact=sip:[fd79:fada:fbe9:8c5d:d899:932b:d36d:b8cc]
|
|
||||||
|
|
||||||
[kurogeek]
|
|
||||||
type=identify
|
|
||||||
endpoint=kurogeek
|
|
||||||
match=[fd79:fada:fbe9:8c5d:d899:932b:d36d:b8cc]
|
|
||||||
|
|
||||||
[6001]
|
|
||||||
type=endpoint
|
|
||||||
context=from-internal
|
|
||||||
disallow=all
|
|
||||||
allow=ulaw
|
|
||||||
allow=alaw
|
|
||||||
allow=g722
|
|
||||||
allow=gsm
|
|
||||||
auth=6001
|
|
||||||
aors=6001
|
|
||||||
direct_media=no
|
|
||||||
|
|
||||||
[6001]
|
|
||||||
type=auth
|
|
||||||
auth_type=userpass
|
|
||||||
password=unsecurepassword
|
|
||||||
username=6001
|
|
||||||
|
|
||||||
[6001]
|
|
||||||
type=aor
|
|
||||||
max_contacts=1
|
|
||||||
|
|
||||||
[6002]
|
|
||||||
type=endpoint
|
|
||||||
context=from-internal
|
|
||||||
disallow=all
|
|
||||||
allow=ulaw
|
|
||||||
allow=alaw
|
|
||||||
allow=g722
|
|
||||||
allow=gsm
|
|
||||||
auth=6002
|
|
||||||
aors=6002
|
|
||||||
direct_media=no
|
|
||||||
|
|
||||||
[6002]
|
|
||||||
type=auth
|
|
||||||
auth_type=userpass
|
|
||||||
password=unsecurepassword
|
|
||||||
username=6002
|
|
||||||
|
|
||||||
[6002]
|
|
||||||
type=aor
|
|
||||||
max_contacts=1
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user