Compare commits
3 Commits
d4aee2bfff
...
mob/phoneb
| Author | SHA1 | Date | |
|---|---|---|---|
| f54cf1c60a | |||
| 1fa7da00c2 | |||
| 34e9774aa7 |
@@ -109,6 +109,12 @@
|
||||
roles.default.machines."adhil".settings = {
|
||||
ata-ethernet-iface = "end0";
|
||||
};
|
||||
roles.default.machines."rigel".settings = {
|
||||
extraClientNumbers = [
|
||||
"01"
|
||||
"02"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
pocket-id = {
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
description = "An Ethernet interface that connect to ATA box.";
|
||||
default = "enp2s0";
|
||||
};
|
||||
options.extraClientNumbers = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
description = "List of client suffix number.";
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
perInstance =
|
||||
{
|
||||
@@ -69,6 +74,22 @@
|
||||
max_contacts=1
|
||||
'';
|
||||
|
||||
genLocalSIPEndpointV6 =
|
||||
{ localNumber }:
|
||||
''
|
||||
[${localNumber}](internal_endpoint)
|
||||
transport=transport-udp6
|
||||
aors=${localNumber}
|
||||
auth=${localNumber}
|
||||
|
||||
[${localNumber}](userpass_auth)
|
||||
username=${localNumber}
|
||||
password=${localNumber}
|
||||
|
||||
[${localNumber}](dynamiic_aor)
|
||||
max_contacts=1
|
||||
'';
|
||||
|
||||
genLocalExtenConf =
|
||||
{ localNumber }:
|
||||
''
|
||||
@@ -284,6 +305,9 @@
|
||||
+ (genLocalExtenConf {
|
||||
localNumber = config.clan.core.vars.generators.phonebox.files.ata-local-number.value;
|
||||
})
|
||||
+ lib.concatStringsSep "\n" (
|
||||
builtins.map (number: genLocalExtenConf { localNumber = number; }) settings.extraClientNumbers
|
||||
)
|
||||
+ serverConf;
|
||||
|
||||
"rtp.conf" = ''
|
||||
@@ -315,6 +339,7 @@
|
||||
|
||||
[base_endpoint](!)
|
||||
type=endpoint
|
||||
transport=transport-udp
|
||||
disallow=all
|
||||
allow=ulaw,alaw,g722,gsm
|
||||
direct_media=no
|
||||
@@ -337,6 +362,9 @@
|
||||
+ (genLocalSIPEndpoint {
|
||||
localNumber = config.clan.core.vars.generators.phonebox.files.ata-local-number.value;
|
||||
})
|
||||
+ lib.concatStringsSep "\n" (
|
||||
builtins.map (number: genLocalSIPEndpointV6 { localNumber = number; }) settings.extraClientNumbers
|
||||
)
|
||||
+ serverConf;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user