1
0

Compare commits

..

No commits in common. "03957afd7e4d74ada8d4b5a98da98facd054bd25" and "138bddf30bed6f171c8989d8ae153554817eeb57" have entirely different histories.

8 changed files with 5 additions and 57 deletions

View File

@ -2,7 +2,7 @@ keys:
- &admin_clerie DD2D88B9FCB74C81E6F63AAD5B5D448C88684BC3
- &admin_n0emis 6E10217E3187069E057DF5ABE0262A773B824745
- &host_nerd age1x69924s94z4k7s50utyuqrwshpt8p8yzwaxny2gle7yeyg4w3spqml95mu
- &host_yate age10pxa70g3ekxdrk788l52s93a6ftavdw3r8x6d23gmsluudmwq3asmu6ah9
- &host_yate age10pxa70g3ekxdrk788l52s93a6ftavdw3r8x6d23gmsluudmwq3asmu6ah9\
- &host_yate_dialup age14zsha5c5238v6hzchdfkjgjjwzc2qc79tl0ngmqrdquck5f945zs35vps4
- &host_pre_yate_n0emis age1lrujyz4d48yjelmh6eufxjffuvfm9pusen3uxskyhnyf27xyucdqq3jza5
creation_rules:

View File

@ -79,16 +79,8 @@
enable = true;
virtualHosts."nerd.bula22.de" = {
extraConfig = ''
@disallow_export {
not remote_ip 10.42.10.0/24 2a01:4f8:1c0c:8221::/64
path /export.json*
}
route {
file_server /static/*
respond @disallow_export 403 {
close
}
reverse_proxy * http://127.0.0.1:10510
}

View File

@ -1,30 +0,0 @@
import asyncio
import os
import re
import socket
from yate.ivr import YateIVR
SOUNDS_PATH = "/run/current-system/sw/share/sounds/yate"
async def main(ivr: YateIVR):
caller_id = ivr.call_params.get("caller", "")
caller_id = re.sub("[^\\d]", "", caller_id)
called_id = ivr.call_params.get("called", "")
called_id = re.sub("[^\\d]", "", called_id)
await ivr.play_soundfile(
os.path.join(SOUNDS_PATH, "yintro.slin"),
complete=True)
await asyncio.sleep(0.5)
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect(("localhost", 9437))
s.recv(1024)
s.sendall(f"claim {caller_id} {called_id}".encode('utf-8'))
s.recv(1024)
app = YateIVR()
app.run(main)

View File

@ -42,12 +42,4 @@
[dialin]
\${sip_x-called}^.*$=lateroute/\\1";
};
environment.systemPackages = with pkgs; [
(writers.makePythonWriter python39 python39.pkgs "/bin/dect_claim" { libraries = [ python39.pkgs.python-yate ]; } (builtins.readFile ./dect_claim.py))
(runCommand "yintro.slin" {} ''
mkdir -p $out/share/sounds/yate
ln -s ${./yintro.slin} $out/share/sounds/yate/yintro.slin
'')
];
}

Binary file not shown.

View File

@ -20,16 +20,12 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
python3.pkgs.fieldpoc
];
services.postgresql = {
enable = true;
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE fieldpoc WITH LOGIN PASSWORD 'fieldpoc' CREATEDB;
CREATE DATABASE fieldpoc;
GRANT ALL PRIVILEGES ON DATABASE fieldpoc TO fieldpoc;
CREATE ROLE nixcloud WITH LOGIN PASSWORD 'nixcloud' CREATEDB;
CREATE DATABASE nixcloud;
GRANT ALL PRIVILEGES ON DATABASE nixcloud TO nixcloud;
'';
};

View File

@ -6,8 +6,6 @@ self: super: {
python3 = let packageOverrides = final: prev: import ./python final prev;
in super.python3.override { inherit packageOverrides; };
python39 = let packageOverrides = final: prev: import ./python final prev;
in super.python39.override { inherit packageOverrides; };
yate = super.yate.overrideAttrs (old: {
configureFlags =

View File

@ -7,7 +7,7 @@ buildPythonApplication rec {
src = fetchGit {
url = "https://git.n0emis.eu/n0emis/fieldpoc.git";
ref = "main";
rev = "2f1347f3415249cb116501af1f5e3282afca24be";
rev = "d6d664b4690189a7ed54be65ceef8cb3d79a6bfb";
};
format = "pyproject";