TT#104401 config: add dummy interface rtp_tag

* in order to be able to select a different
  rtp_interface on some scenario and check
  our logic

Change-Id: I977dd87e6719ed3d2c1f8806cd56a8a285ee94ca
mr9.3.1
Victor Seva 5 years ago
parent 40d27f4a6d
commit 567a6c8817

@ -44,6 +44,7 @@ my $help = 0;
my $children = 0;
my $profile = "CE";
my $group;
if (exists $ENV{'GROUP'})
{
$group = $ENV{'GROUP'};
@ -120,8 +121,19 @@ else
$yaml->{mediator}{interval} = '1'; # Necessary to speedup the creation of the CDRs
$yaml->{rtpproxy}{delete_delay} = '2'; # Necessary to speedup the deletetion of the used ports in rtpengine
$yaml->{rtpproxy}{log_level} = '7';
$yaml->{modules}[0]->{enable} = 'yes'; # dummy module should be the first one
$net_yaml = LoadFile($file_net_yaml);
for my $host (keys %{$net_yaml->{hosts}}) {
$net_yaml->{hosts}->{$host}->{dummy0} = {
ip => '172.30.1.2',
netmask => '255.255.255.0',
type => ['rtp_tag']
};
push @{$net_yaml->{hosts}->{$host}->{interfaces}}, 'dummy0';
}
$net_yaml->{hosts_common}->{etc_hosts_global_extra_entries} //= ();
my $entries = $net_yaml->{hosts_common}->{etc_hosts_global_extra_entries};
push @{$entries}, "127.0.0.1 $domain";

@ -1,4 +1,5 @@
#!/bin/bash
set -e
RUN_DIR="$(dirname "$0")"
export BASE_DIR=${BASE_DIR:-$RUN_DIR}
# Set up the environment, to use local perl modules
@ -37,7 +38,10 @@ if ! ngcpcfg apply "config debug on via kamailio-config-tests" ; then
echo "$(date) - ngcpcfg apply returned $?"
error_flag=4
fi
echo "$(date) - Setting config[${GROUP}] debug on. Done[${error_flag}]"
echo "$(date) - start dummy0 interface"
ifup dummy0
echo "$(date) - Setting config[${GROUP}] debug on. Done[${error_flag}]"
exit ${error_flag}

Loading…
Cancel
Save