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