2020-01-07 14:53:34 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
|
|
|
name = "freeswitch";
|
2021-01-10 19:08:30 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-01-07 14:53:34 +00:00
|
|
|
maintainers = [ misuzu ];
|
|
|
|
};
|
|
|
|
nodes = {
|
|
|
|
node0 = { config, lib, ... }: {
|
|
|
|
networking.useDHCP = false;
|
|
|
|
networking.interfaces.eth1 = {
|
|
|
|
ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "192.168.0.1";
|
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
services.freeswitch = {
|
|
|
|
enable = true;
|
|
|
|
enableReload = true;
|
|
|
|
configTemplate = "${config.services.freeswitch.package}/share/freeswitch/conf/minimal";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
testScript = ''
|
|
|
|
node0.wait_for_unit("freeswitch.service")
|
|
|
|
# Wait for SIP port to be open
|
2022-06-11 12:22:53 +00:00
|
|
|
node0.wait_for_open_port(5060)
|
2020-01-07 14:53:34 +00:00
|
|
|
'';
|
|
|
|
})
|