Backed out changeset a532ddc33432

This commit is contained in:
Luke Granger-Brown 2022-06-19 21:02:02 +01:00
parent 855faad5a0
commit 679c040677
3 changed files with 3 additions and 118 deletions

View file

@ -1,14 +0,0 @@
{ asterisk, fetchFromGitHub, fetchpatch, ... }:
asterisk.overrideAttrs (old: {
#src = /home/lukegb/Projects/asterisk;
#patches = [ /home/lukegb/Projects/asterisk.patch ];
patches = [
#(fetchpatch {
# url = "https://p.lukegb.com/raw/MultiplyMagicalKoi.patch";
# sha256 = "056iy9415xyp9g69xs8ckyvccs8sskc7zp7frnwrvl7wlxnsf2va";
#})
/home/lukegb/Projects/asterisk.patch
];
enableParallelBuilding = true;
})

View file

@ -6,7 +6,6 @@
{ {
imports = [ imports = [
../lib/bvm.nix ../lib/bvm.nix
./eventphone-asterisk.nix
]; ];
# Networking! # Networking!
@ -59,6 +58,9 @@
services.prosody = { services.prosody = {
enable = true; enable = true;
admins = [ "admin@lukegb.com" "lukegb@lukegb.com" ]; admins = [ "admin@lukegb.com" "lukegb@lukegb.com" ];
package = pkgs.prosody.override {
withCommunityModules = [ "external_services" ];
};
virtualHosts."lukegb.com" = { virtualHosts."lukegb.com" = {
enabled = true; enabled = true;
@ -110,9 +112,6 @@
secret = turn_secret, secret = turn_secret,
} }
} }
Component "asterisk.lukegb.com"
component_secret = "thisisasampleofspeex"
''; '';
}; };

View file

@ -1,100 +0,0 @@
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ depot, lib, pkgs, config, ... }:
{
services.asterisk = {
enable = true;
confFiles = {
"pjsip.conf" = ''
[transport-udp]
type=transport
protocol=udp
bind=92.118.28.3
[transport-udp-v6]
type=transport
protocol=udp
bind=2a09:a441::3
[eventphone-registration]
type=registration
transport=transport-udp
outbound_auth=eventphone-auth
server_uri=sip:voip.eventphone.de
client_uri=sip:5422@voip.eventphone.de
contact_user=5422
retry_interval=60
forbidden_retry_interval=600
expiration=3600
line=yes
endpoint=eventphone
[eventphone-auth]
type=auth
auth_type=userpass
username=5422
password=BPun1r0l7JJZ
realm=voip.eventphone.de
[eventphone]
type=endpoint
allow=!all,ulaw,alaw
context=eventphone-incoming
outbound_auth=eventphone-auth
transport=transport-udp
aors=eventphone-aor
from_domain=voip.eventphone.de
[eventphone-aor]
type=aor
contact=sip:voip.eventphone.de
max_contacts=10
[eventphone-identify]
type=identify
endpoint=eventphone
match=45.15.105.12/32
'';
"motif.conf" = ''
[default](!)
disallow=all
allow=ulaw
allow=h264
context=incoming-motif
[prosody](default)
transport=ice-udp
connection=prosody
'';
"xmpp.conf" = ''
[general]
debug=yes
[prosody]
type=component
serverhost=localhost
username=asterisk.lukegb.com
secret=thisisasampleofspeex
port=5347
context=xmpp-incoming
debug=yes
usetls=no
usesasl=no
autoregister=yes
buddy=lukegb@lukegb.com
'';
"extensions.conf" = ''
[eventphone-incoming]
exten => _X.,1,Answer()
exten => _X.,n,Dial(Motif/prosody/lukegb@lukegb.com)
[xmpp-incoming]
exten => _X.,1,Dial(PJSIP/''${EXTEN:1}@eventphone)
'';
};
package = pkgs.callPackage ./asterisk-override.nix {};
};
}