Compare commits
No commits in common. "de10828177e3d4bf5f91ef8e4a5e8487fba25040" and "7547a24e9c5212a46bef60472f0a3e3f0f260805" have entirely different histories.
de10828177
...
7547a24e9c
4 changed files with 0 additions and 103 deletions
|
@ -1,31 +0,0 @@
|
|||
{ inputs, config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.asterisk-phony;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
options.services.asterisk-phony = {
|
||||
enable = lib.mkOption {
|
||||
type = with lib.types; uniq bool;
|
||||
default = false;
|
||||
description = "Enable Asterisk Communication";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.asterisk = {
|
||||
# See Configuration Options: https://search.nixos.org/options?channel=unstable&type=options&query=asterisk
|
||||
enable = true;
|
||||
confFiles = {
|
||||
"pjsip.conf" = builtins.readFile ./pjsip.conf;
|
||||
"extensions.conf" = builtins.readFile ./extensions.conf;
|
||||
};
|
||||
};
|
||||
|
||||
# Firewall
|
||||
networking.firewall.allowedTCPPorts = [ 8088 8089 ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
[from-internal]
|
||||
; dial the lecture rooms & backoffice
|
||||
; the syntax is NUMBER,SEQUENCE,FUNCTION
|
||||
; to call someone do Dial(MODULE/account, timeout)
|
||||
exten => 1001,1,Dial(PJSIP/saal1,20)
|
||||
exten => 1002,1,Dial(PJSIP/saal2,20)
|
||||
exten => 1600,1,Dial(PJSIP/backoffice,20)
|
||||
|
||||
; Dial 100 for "hello, world"
|
||||
; this is useful when configuring/debugging clients (snoms)
|
||||
exten => 100,1,Answer()
|
||||
same => n,Wait(1)
|
||||
same => n,Playback(hello-world)
|
||||
same => n,Hangup()
|
||||
; note: "n" is a keyword meaning "the last line's value, plus 1"
|
||||
; "same" is a keyword referring to the last-defined extension
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
; we use UDP for transport
|
||||
[transport-udp]
|
||||
type=transport
|
||||
protocol=udp
|
||||
bind=0.0.0.0
|
||||
|
||||
; Note: this defines a macro, to shorten the config further down
|
||||
[endpoint_internal](!)
|
||||
type=endpoint
|
||||
context=from-internal
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
|
||||
[auth_userpass](!)
|
||||
type=auth
|
||||
auth_type=userpass
|
||||
|
||||
[aor_dynamic](!)
|
||||
type=aor
|
||||
max_contacts=1
|
||||
|
||||
|
||||
; here come the definitions for our phones, using the macros from above
|
||||
|
||||
; lecture hall 1
|
||||
[saal1](endpoint_internal)
|
||||
auth=saal1
|
||||
aors=saal1
|
||||
[saal1](auth_userpass)
|
||||
; well, maybe set a better password than this
|
||||
password=saal1
|
||||
username=saal1
|
||||
[saal1](aor_dynamic)
|
||||
|
||||
; lecture hall 2
|
||||
[saal2](endpoint_internal)
|
||||
auth=saal2
|
||||
aors=saal2
|
||||
[saal2](auth_userpass)
|
||||
password=saal2
|
||||
username=saal2
|
||||
[saal2](aor_dynamic)
|
||||
|
||||
[backoffice](endpoint_internal)
|
||||
auth=backoffice
|
||||
aors=backoffice
|
||||
[backoffice](auth_userpass)
|
||||
password=backoffice
|
||||
username=backoffice
|
||||
[backoffice](aor_dynamic)
|
||||
|
|
@ -41,9 +41,6 @@
|
|||
vim
|
||||
tree
|
||||
wget
|
||||
git
|
||||
fastfetch
|
||||
ripgrep
|
||||
];
|
||||
|
||||
# SSH and Mosh
|
||||
|
@ -56,7 +53,6 @@
|
|||
};
|
||||
programs.mosh.enable = true;
|
||||
|
||||
services.asterisk-phony.enable = true;
|
||||
|
||||
# Firewall
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
|
|
Loading…
Add table
Reference in a new issue