MT#7571 use NGCP REST API instead of SOAP lib

- prefs.yml -> prefs.json
  solving true/1 problem
- disable non working scenarios:
  * incoming_foreign_dom
  * incoming_peer
  * invite_concurrent_max_out
  * invite_concurrent_max_out_per_account
  * invite_ignore_allowip
  * invite_peerout
  * invite_peerout_rewrite
  * invite_peerout_rewrite_pv_regex
  * register_allowip
  * register_ignore_allowip

missing API parts:
- peers settings
- add/modify/delete peers
  * bin/create_peers.pl
  * bin/update_peer_host.pl

TODO:
- bin/create_ncos.pl
- bin/create_rewrite_rules.pl
- bin/create_subscribers_rewrite_rules.pl
- bin/create_subscribers_speeddial_rules.pl

Change-Id: I6d47e24669f9da22b5b3ac4fb410c50d2c9dbf53
changes/66/2666/14
Victor Seva 11 years ago
parent fc685d65b0
commit 129397e6fc

1
.gitignore vendored

@ -1,6 +1,7 @@
*~
log
result
mem
*.pyc
*_test.yml
sipp_scenario_responder*_reg.xml

@ -92,10 +92,6 @@ function check_test
# $1 domain
function create_voip
{
if ! /usr/bin/ngcp-create_domain "$1" ; then
echo "$(date) - Cannot create domain"
exit 1
fi
if ! "${BIN_DIR}/create_subscribers.pl" "${SCEN_CHECK_DIR}/scenario.yml" ; then
echo "$(date) - Deleting domain:${DOMAIN}"
delete_voip "$1"
@ -132,9 +128,9 @@ function create_voip_prefs
"${BIN_DIR}/create_peers.pl" "${SCEN_CHECK_DIR}/peer.yml"
fi
if [ -f "${SCEN_CHECK_DIR}/prefs.yml" ]; then
if [ -f "${SCEN_CHECK_DIR}/prefs.json" ]; then
echo "$(date) - Setting preferences"
"${BIN_DIR}/set_preferences.pl" "${SCEN_CHECK_DIR}/prefs.yml"
"${BIN_DIR}/set_preferences.pl" "${SCEN_CHECK_DIR}/prefs.json"
fi
}

@ -21,6 +21,8 @@
use strict;
use warnings;
die("Not implemented in REST");
use English;
use Getopt::Std;
use Cwd 'abs_path';

@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# Copyright: 2013 Sipwise Development Team <support@sipwise.com>
# Copyright: 2013-2015 Sipwise Development Team <support@sipwise.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -24,88 +24,164 @@ use warnings;
use English;
use YAML;
use Getopt::Long;
use Sipwise::Provisioning::Billing;
use Sipwise::Provisioning::Config;
use List::MoreUtils qw{ none };
use Config::Tiny;
use Data::Dumper;
use Sipwise::API qw(all);
our %CONFIG = ( admin => 'cmd' );
my $config = Sipwise::Provisioning::Config->new()->get_config();
unless ($CONFIG{password} = $config->{acl}->{$CONFIG{admin}}->{password}) {
die "Error: No provisioning password found for user $CONFIG{admin}\n";
my $config = Config::Tiny->read('/etc/default/ngcp-api');
my $opts;
if ($config) {
$opts = {};
$opts->{host} = $config->{_}->{NGCP_API_IP};
$opts->{port} = $config->{_}->{NGCP_API_PORT};
$opts->{sslverify} = $config->{_}->{NGCP_API_SSLVERIFY};
}
our %BILLING = (
# product => 'handle',
billing_profile => 'default',
);
my $api = Sipwise::API->new($opts);
$opts = $api->opts;
sub usage {
die "Usage:\n$PROGRAM_NAME scenario.yml\n".
return "Usage:\n$PROGRAM_NAME scenario.yml\n".
"Options:\n".
" -d debug\n".
" -h this help\n";
}
my $help = 0;
my $debug = 0;
GetOptions ("h|help" => \$help, "d|debug" => \$debug)
GetOptions ("h|help" => \$help, "d|debug" => \$opts->{verbose})
or die("Error in command line arguments\n".usage());
die(usage()) unless (!$help);
die("Wrong number of arguments\n".usage()) unless ($#ARGV == 0);
sub main
sub get_data {
my $val = shift;
my $data = {
administrative => $val->{admin} || 0,
domain_id => $val->{domain_id},
customer_id => $val->{customer_id},
username => $val->{username},
password => $val->{password},
primary_number => {
cc => $val->{cc},
ac => $val->{ac},
sn => $val->{sn}
},
};
my @aliases = ();
foreach (@{$val->{alias_numbers}}) {
my $alias = {
cc => $_->{cc},
ac => $_->{ac},
sn => $_->{sn}
};
push(@aliases, $alias);
}
if(scalar(@aliases)>0) {
$data->{alias_numbers} = \@aliases;
}
return $data;
}
sub manage_contacts
{
my ($data, $bprov) = @_;
my @subs;
foreach my $domain (keys %{$data})
{
foreach my $username (keys %{$data->{$domain}})
{
my $s = $data->{$domain}->{$username};
$s->{username} = $username;
$s->{domain} = $domain;
push(@subs, $s);
if($debug) { print("$username@$domain read\n"); }
}
my $data = shift;
my $type = shift;
foreach my $contact (@{$data->{contacts}})
{
$data->{contact_id} = $api->check_contact_exists($contact, $type);
if(defined $data->{contact_id}) {
print "contact_$type [$contact->{email}] already there [$data->{contact_id}]\n";
} else {
$data->{contact_id} = $api->create_contact($contact, $type);
print "contact_$type [$contact->{email}]: created [$data->{contact_id}]\n";
}
if(@subs)
}
return;
}
sub manage_contracts
{
my $data = shift;
foreach my $contract (@{$data->{contracts}})
{
if(defined $data->{contact_id})
{
call_prov( $bprov, 'create_voip_account', { data => { %BILLING, subscribers => \@subs }});
if($debug) { print("created ".($#subs+1)." subscribers"); }
$contract->{contact_id} = $data->{contact_id};
$data->{contract_id} = $api->check_contract_exists($contract);
if(defined $data->{contract_id}) {
print "contract: already there [$data->{contract_id}]\n";
} else {
$data->{contract_id} = $api->create_contract($contract);
print "contract : created [$data->{contract_id}]\n";
}
}
return;
}
return;
}
sub call_prov {
# scalar, scalar, hash-ref
my ($bprov, $function, $parameter) = @_;
my $result;
eval {
$result = $bprov->handle_request( $function,
{
authentication => {
type => 'system',
username => $CONFIG{admin},
password => $CONFIG{password},
},
parameters => $parameter,
});
sub manage_domains
{
my $data = shift;
foreach my $domain (keys %{$data->{domains}})
{
my $domain_data = $data->{domains}->{$domain};
my $d_data = {
'domain' => $domain
};
$domain_data->{domain_id} = $api->check_domain_exists($d_data);
if(defined $domain_data->{domain_id}) {
print "domain [$domain] already there [$domain_data->{domain_id}]\n";
} else {
$d_data->{reseller_id} = $domain_data->{reseller_id};
if($EVAL_ERROR) {
if(ref $EVAL_ERROR eq 'SOAP::Fault') {
die "Billing\::$function failed: ". $EVAL_ERROR->faultstring;
} else {
die "Billing\::$function failed: $EVAL_ERROR";
}
$domain_data->{domain_id} = $api->create_domain($d_data);
print "domain [$domain]: created [$domain_data->{domain_id}]\n";
}
}
return;
}
return $result;
sub manage_customers
{
my $data = shift;
foreach my $customer (keys %{$data->{customers}})
{
my $customer_data = $data->{customers}->{$customer};
manage_contacts($customer_data, 'customer');
$customer_data->{details}->{contact_id} = $customer_data->{contact_id};
$customer_data->{customer_id} = $api->check_customer_exists($customer_data->{details});
if(defined $customer_data->{customer_id}) {
print "customer [$customer] already there [$customer_data->{customer_id}]\n";
} else {
$customer_data->{customer_id} = $api->create_customer($customer_data->{details});
print "customer [$customer]: created [$customer_data->{customer_id}]\n";
}
}
return;
}
my $cf = YAML::LoadFile($ARGV[0]);
my $bprov = Sipwise::Provisioning::Billing->new();
sub main
{
my $data = shift;
manage_customers($data);
manage_domains($data);
main($cf->{subscribers}, $bprov);
foreach my $domain (keys %{$data->{subscribers}})
{
my $d_data = $data->{subscribers}->{$domain};
foreach my $username (keys %{$d_data})
{
my $s = $d_data->{$username};
$s->{username} = $username;
$s->{domain_id} = $data->{domains}->{$domain}->{domain_id};
$s->{customer_id} = $data->{customers}->{$s->{customer}}->{customer_id};
$api->create_subscriber(get_data($s));
print("$username\@$domain created\n");
}
}
return;
}
my $cf = YAML::LoadFile($ARGV[0]);
main($cf);

@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# Copyright: 2013 Sipwise Development Team <support@sipwise.com>
# Copyright: 2013-2015 Sipwise Development Team <support@sipwise.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -22,130 +22,164 @@ use strict;
use warnings;
use English;
use Getopt::Std;
use Cwd 'abs_path';
use YAML;
use Sipwise::Provisioning::Voip;
use Sipwise::Provisioning::Config;
use JSON qw();
use Getopt::Long;
use List::MoreUtils qw{ none };
use Config::Tiny;
use Sipwise::API qw(all);
use Hash::Merge qw( merge );
use Data::Dumper;
our %CONFIG = ( admin => 'cmd' );
my $config = Sipwise::Provisioning::Config->new()->get_config();
unless ($CONFIG{password} = $config->{acl}->{$CONFIG{admin}}->{password}) {
die "Error: No provisioning password found for user $CONFIG{admin}\n";
my $config = Config::Tiny->read('/etc/default/ngcp-api');
my $opts;
if ($config) {
$opts = {};
$opts->{host} = $config->{_}->{NGCP_API_IP};
$opts->{port} = $config->{_}->{NGCP_API_PORT};
$opts->{sslverify} = $config->{_}->{NGCP_API_SSLVERIFY};
}
my $api = Sipwise::API->new($opts);
$opts = $api->opts;
sub main;
sub usage;
sub call_prov;
die usage() unless ($#ARGV == 0);
sub usage {
return "Usage:\n$PROGRAM_NAME prefs.json\n".
"Options:\n".
" -d debug\n".
" -h this help\n";
}
my $help = 0;
GetOptions ("h|help" => \$help, "d|debug" => \$opts->{verbose})
or die("Error in command line arguments\n".usage());
our $vprov = Sipwise::Provisioning::Voip->new();
die(usage()) unless (!$help);
die("Wrong number of arguments\n".usage()) unless ($#ARGV == 0);
main();
sub set_subscriber_preferences
{
my $subscriber = shift;
my $domain = shift;
my $prefs = shift;
my $subs_id = $api->check_subscriber_exists({
'domain'=>$domain,
'username'=>$subscriber});
if(defined $subs_id) {
my $subs_prefs = $api->get_subscriber_preferences($subs_id);
delete $subs_prefs->{_links};
my $subs_prefs_id = $subs_prefs->{id};
my $res = $api->set_subscriber_preferences($subs_prefs_id,
merge($prefs, $subs_prefs));
if($opts->{verbose}) {
print Dumper $res;
}
if(defined $res) {
print "prefs created for ${subscriber}\@${domain}\n";
}
}
else {
die("No subscriber ${subscriber}\@${domain} found");
}
return;
}
sub get_peers
sub set_domain_preferences
{
my $peers;
my $result = call_prov( $vprov, 'get_peer_groups');
foreach (@{$result})
{
my $res = call_prov( $vprov, 'get_peer_group_details', {id=>$_->{id}});
foreach (@{$res->{peers}})
{
$peers->{$_->{name}} = $_->{id};
}
}
return $peers;
my $domain = shift;
my $prefs = shift;
my $domain_id = $api->check_domain_exists({'domain' => $domain});
if(defined $domain_id) {
my $dom_prefs = $api->get_domain_preferences($domain_id);
my $links = delete $dom_prefs->{_links};
my $dom_prefs_id = $dom_prefs->{id};
my $res = $api->set_domain_preferences($dom_prefs_id,
merge($prefs, $dom_prefs));
if($opts->{verbose}) {
print Dumper $res;
}
if(defined $res) {
print "prefs created for ${domain}\n";
}
}
else {
die("No domain ${domain} found");
}
return;
}
sub get_rewrites
sub set_peer_preferences
{
my $rule_set;
my $result = call_prov( $vprov, 'get_rewrite_rule_sets');
foreach (@{$result})
{
$rule_set->{$_->{name}} = $_->{id};
}
return $rule_set;
my $id = shift;
my $prefs = shift;
my $peer_id = $api->check_peer_exists($id);
if(defined $peer_id) {
my $peer_prefs = $api->get_peer_preferences($peer_id);
delete $peer_prefs->{_links};
my $peer_prefs_id = $peer_prefs->{id};
return $api->set_peer_preferences($peer_prefs_id,
merge($prefs, $peer_prefs));
}
else {
die("No peer ${id} found");
}
return;
}
sub main {
my $filename = abs_path($ARGV[0]);
my $prefs = YAML::LoadFile($filename);
my $peers;
my $rule_set;
for my $key (keys $prefs)
{
if (exists($prefs->{$key}->{rewrite_rule_set}))
{
if(!$rule_set) { $rule_set = get_rewrites($vprov); }
if (exists($rule_set->{$prefs->{$key}->{rewrite_rule_set}}))
{
$prefs->{$key}->{rewrite_rule_set} = $rule_set->{$prefs->{$key}->{rewrite_rule_set}};
}
else
{
die("No rewrite_rule_set:$prefs->{$key}->{rewrite_rule_set} found");
}
}
if ( $key =~ /@/ )
{
my @fields = split /@/, $key;
if (!$fields[0])
{
my $pref = { domain => $fields[1], preferences => $prefs->{$key} };
call_prov( $vprov, 'set_domain_preferences', $pref);
}
else
{
my $pref = { username => $fields[0], domain => $fields[1], preferences => $prefs->{$key} };
call_prov( $vprov, 'set_subscriber_preferences', $pref);
}
}
else
{
if (!$peers) { $peers = get_peers($vprov); }
my $pref = { id => $peers->{$key}, preferences => $prefs->{$key} };
call_prov( $vprov, 'set_peer_preferences', $pref);
}
}
exit;
my $prefs = shift;
my $peers;
my $rule_set;
for my $key (keys %{$prefs})
{
if (exists($prefs->{$key}->{rewrite_rule_set}))
{
my $rule_set_id = $api->check_rewriterule_exists(
$prefs->{$key}->{rewrite_rule_set});
if (defined $rule_set_id)
{
$prefs->{$key}->{rewrite_rule_set} = $rule_set->{$prefs->{$key}->{rewrite_rule_set}};
}
else
{
die("No rewrite_rule_set:$prefs->{$key}->{rewrite_rule_set} found");
}
}
if ( $key =~ /@/ )
{
my @fields = split /@/, $key;
if (!$fields[0])
{
set_domain_preferences($fields[1], $prefs->{$key});
}
else
{
set_subscriber_preferences($fields[0], $fields[1], $prefs->{$key});
}
}
else
{
#set_peer_preferences($key, $prefs->{$key});
die "API peer preferences *Not* implemented";
}
}
exit;
}
sub call_prov {
# scalar, scalar, hash-ref
my ($prov, $function, $parameter) = @_;
my $result;
eval {
$result = $prov->handle_request( $function,
{
authentication => {
type => 'system',
username => $CONFIG{admin},
password => $CONFIG{password},
},
parameters => $parameter,
});
};
if($EVAL_ERROR) {
if(ref $EVAL_ERROR eq 'SOAP::Fault') {
die "Billing\::$function failed: ". $EVAL_ERROR->faultstring;
} else {
die "Billing\::$function failed: $EVAL_ERROR";
}
}
return $result;
sub get_json {
my $filename = shift;
my $json_text = do {
open(my $json_fh, "<:encoding(UTF-8)", $filename)
or die("Can't open \$filename\": $ERRNO\n");
undef $RS; # enable "slurp" mode
<$json_fh>
};
my $json = JSON->new;
return $json->decode($json_text);
}
sub usage {
die "Usage:\n$PROGRAM_NAME prefs.yml\n";
}
my $cf = get_json($ARGV[0]);
main($cf);

4
debian/control vendored

@ -10,6 +10,8 @@ Package: kamailio-config-tests
Architecture: all
Depends: curl,
libgraphviz-perl,
libhash-merge-perl,
libjson-perl,
libtemplate-perl,
libtext-csv-perl,
ngcp-ossbss-clients-perl,
@ -17,7 +19,7 @@ Depends: curl,
python,
python-pyinotify,
python-yaml,
sip-tester ( >= 1:3.2-1~ ),
sip-tester ( >= 1:3.3-1~ ),
tcpdump,
${misc:Depends}
Description: Kamailio configuration tests

1
debian/install vendored

@ -1,5 +1,6 @@
bench.sh /usr/share/kamailio-config-tests/
bin/ /usr/share/kamailio-config-tests/
get_results.sh /usr/share/kamailio-config-tests/
lib/ /usr/share/kamailio-config-tests/
run_tests.sh /usr/share/kamailio-config-tests/
scenarios/ /usr/share/kamailio-config-tests/

@ -1,5 +1,6 @@
#!/bin/bash
BASE_DIR="${BASE_DIR:-/usr/share/kamailio-config-tests}"
RUN_DIR="$(dirname "$0")"
export BASE_DIR=${BASE_DIR:-$RUN_DIR}
BIN_DIR="${BASE_DIR}/bin"
PROFILE="CE"
DOMAIN="spce.test"

@ -0,0 +1,377 @@
#
# Copyright: 2013-2015 Sipwise Development Team <support@sipwise.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# On Debian systems, the complete text of the GNU General
# Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
#
package Sipwise::API 0.001;
use strict;
use warnings;
use English;
use Hash::Merge qw( merge );
use JSON qw();
use LWP::UserAgent;
use IO::Socket::SSL;
use URI;
use Data::Dumper;
my $opts_default = {
host => '127.0.0.1',
port => 1443,
auth_user => 'administrator',
auth_pwd => 'administrator',
verbose => 0,
sslverify => 'no',
admin => 0
};
sub _get_id {
my $baseurl = shift;
my $location = shift;
my $id;
($id) = ($location =~ m/\Q$baseurl\E(\d+)/);
return $id;
}
sub new {
my $class = shift;
my $opts = shift;
my $self = {};
$self->{opts} = merge($opts, $opts_default);
bless $self, $class;
return $self;
}
sub opts {
my $self = shift;
if (@_) {
$self->{opts} = shift;
}
return $self->{opts};
}
sub do_request {
my $self = shift;
my $ua = shift;
my $url = shift;
my $data = shift;
my $req_type = shift || 'POST';
my $ct = 'application/json';
if($req_type =~ 'PATCH') {
$ct = 'application/json-patch+json';
}
my $req = HTTP::Request->new($req_type, $url);
$req->header('Content-Type' => $ct);
$req->header('Prefer' => 'return=representation');
$req->content(JSON::to_json($data));
my $res = $ua->request($req);
if(!$res->is_success) {
print "$url\n";
print Dumper $data unless $self->{opts}->{verbose};
}
return $res;
}
sub do_query {
my $self = shift;
my $ua = shift;
my $url = shift;
my $data = shift;
my $URL = URI->new($url);
$URL->query_form($data);
my $req = HTTP::Request->new('GET', $URL);
my $res = $ua->request($req);
if(!$res->is_success) {
print "$url\n";
print Dumper $data unless $self->{opts}->{verbose};
}
return $res;
}
sub create_ua {
my $self = shift;
my $ua = LWP::UserAgent->new();
if($self->{opts}->{sslverify} eq 'no') {
$ua->ssl_opts(
verify_hostname => 0,
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE,
);
}
$ua->credentials(
$self->{opts}->{host}.':'.$self->{opts}->{port},
'api_admin_http',
$self->{opts}->{auth_user},
$self->{opts}->{auth_pwd}
);
# debug!!
if($self->{opts}->{verbose}) {
$ua->show_progress(1);
$ua->add_handler("request_send", sub { shift->dump; return });
$ua->add_handler("response_done", sub { shift->dump; return });
}
return $ua;
}
sub _create {
my $self = shift;
my $data = shift;
my $urldata = shift;
my $urlbase = 'https://'.$self->{opts}->{host}.':'.$self->{opts}->{port};
my $ua = $self->create_ua();
my $res = $self->do_request($ua, $urlbase.$urldata, $data);
if($res->is_success) {
if($self->{opts}->{verbose}) {
print $res->status_line . ' ' . $res->header('Location') . "\n";
}
return _get_id($urldata, $res->header('Location'));
} else {
die $res->as_string;
}
return;
}
sub _get_content {
my $self = shift;
my $data = shift;
my $urldata = shift;
my $urlbase = 'https://'.$self->{opts}->{host}.':'.$self->{opts}->{port};
my $ua = $self->create_ua();
my $res = $self->do_query($ua, $urlbase.$urldata, $data);
if($res->is_success) {
return JSON::from_json( $res->decoded_content );
}
else {
die $res->as_string;
}
return;
}
sub _set_content {
my $self = shift;
my $data = shift;
my $urldata = shift;
my $urlbase = 'https://'.$self->{opts}->{host}.':'.$self->{opts}->{port};
my $ua = $self->create_ua();
my $res = $self->do_request($ua, $urlbase.$urldata, $data, 'PUT');
if($res->is_success) {
return JSON::from_json( $res->decoded_content );
}
else {
die $res->as_string;
}
return;
}
sub _exists {
my $self = shift;
my $data = shift;
my $urldata = shift;
my $collection_id = shift;
my $collection = $self->_get_content($data, $urldata);
if (defined $collection && $collection->{total_count} == 1) {
return $collection->{_embedded}->{$collection_id}->{id};
}
return;
}
sub check_contact_exists {
my $self = shift;
my $data = shift;
my $type = shift;
my $urldata = "/api/${type}contacts/";
my $collection_id = "ngcp:${type}contacts";
return $self->_exists($data, $urldata, $collection_id);
}
sub create_contact {
my $self = shift;
my $data = shift;
my $type = shift;
my $urldata = "/api/${type}contacts/";
return $self->_create($data, $urldata);
}
sub check_contract_exists {
my $self = shift;
my $data = shift;
my $urldata = '/api/contracts/';
my $collection_id = 'ngcp:contracts';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_contract {
my $self = shift;
my $data = shift;
my $urldata = '/api/contracts/';
return $self->_create($data, $urldata);
}
sub check_reseller_exists {
my $self = shift;
my $data = shift;
my $urldata = '/api/resellers/';
my $collection_id = 'ngcp:resellers';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_reseller {
my $self = shift;
my $data = shift;
my $urldata = '/api/resellers/';
return $self->_create($data, $urldata);
}
sub check_domain_exists {
my $self = shift;
my $data = shift;
my $urldata = "/api/domains/";
my $collection_id = 'ngcp:domains';
return $self->_exists($data, $urldata, $collection_id);
}
sub get_domain_preferences {
my $self = shift;
my $id = shift;
my $urldata = "/api/domains/${id}";
my $collection_id = 'ngcp:domainpreferences';
return $self->_get_content(undef, $urldata);
}
sub set_domain_preferences {
my $self = shift;
my $id = shift;
my $data = shift;
my $urldata = "/api/domainpreferences/${id}";
my $collection_id = 'ngcp:domainpreferences';
return $self->_set_content($data, $urldata);
}
sub create_domain {
my $self = shift;
my $data = shift;
my $urldata = '/api/domains/';
return $self->_create($data, $urldata);
}
sub check_customer_exists {
my $self = shift;
my $data = shift;
my $urldata = '/api/customers/';
my $collection_id = 'ngcp:customers';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_customer {
my $self = shift;
my $data = shift;
my $urldata = '/api/customers/';
return $self->_create($data, $urldata);
}
sub check_subscriber_exists {
my $self = shift;
my $data = shift;
my $urldata = '/api/subscribers/';
my $collection_id = 'ngcp:subscribers';
return $self->_exists($data, $urldata, $collection_id);
}
sub get_subscriber_preferences {
my $self = shift;
my $id = shift;
my $urldata = "/api/subscribers/${id}";
my $collection_id = 'ngcp:subscriberpreferences';
return $self->_get_content(undef, $urldata);
}
sub set_subscriber_preferences {
my $self = shift;
my $id = shift;
my $data = shift;
my $urldata = "/api/subscriberpreferences/${id}";
my $collection_id = 'ngcp:subscriberpreferences';
return $self->_set_content($data, $urldata);
}
sub create_subscriber {
my $self = shift;
my $data = shift;
my $urldata = '/api/subscribers/';
return $self->_create($data, $urldata);
}
sub check_rewriterule_exists {
my $self = shift;
my $data = shift;
my $urldata = '/api/rewriterules/';
my $collection_id = 'ngcp:rewriterules';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_rewriterule {
my $self = shift;
my $data = shift;
my $urldata = '/api/rewriterules/';
return $self->_create($data, $urldata);
}
sub check_rewriteruleset_exists {
my $self = shift;
my $data = shift;
my $urldata = '/api/rewriterulesets/';
my $collection_id = 'ngcp:rewriterules';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_rewriteruleset {
my $self = shift;
my $data = shift;
my $urldata = '/api/rewriterulesets/';
return $self->_create($data, $urldata);
}

@ -1,5 +1,8 @@
#!/bin/bash
BASE_DIR=${BASE_DIR:-"/usr/share/kamailio-config-tests"}
RUN_DIR="$(dirname "$0")"
export BASE_DIR=${BASE_DIR:-$RUN_DIR}
# Set up the environment, to use local perl modules
export PERL5LIB="${BASE_DIR}/lib"
BIN_DIR="${BASE_DIR}/bin"
LOG_DIR="${BASE_DIR}/log"
MLOG_DIR="${BASE_DIR}/mem"

@ -1,7 +1,21 @@
test_uuid: auth_fail
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,2 +0,0 @@
'@spce.test':
unauth_inbound_calls: yes

@ -1,12 +1,27 @@
test_uuid: invite
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,11 @@
{
"testuser1002@spce.test": {
"allowed_clis": [
"43110029*",
"43110021*"
],
"cli": 4311002,
"user_cli": 43122122,
"inbound_upn": "from_display"
}
}

@ -1,4 +0,0 @@
testuser1002@spce.test:
allowed_clis: [ "43110029*", "43110021*" ]
user_cli: 43122122
inbound_upn: from_display

@ -1,12 +1,27 @@
test_uuid: invite_allowedcli_match
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,11 @@
{
"testuser1002@spce.test": {
"allowed_clis": [
"43110029*",
"43110021*"
],
"user_cli": 43122122,
"inbound_upn": "from_display",
"extension_in_npn": true
}
}

@ -1,5 +0,0 @@
testuser1002@spce.test:
allowed_clis: [ "43110029*", "43110021*" ]
user_cli: 43122122
inbound_upn: from_display
extension_in_npn: 1

@ -1,12 +1,27 @@
test_uuid: invite_allowedcli_match_alias
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,11 @@
{
"testuser1002@spce.test": {
"allowed_clis": [
"43110029*",
"43110021*"
],
"cli": 4311002,
"user_cli": 43122122,
"inbound_upn": "from_display"
}
}

@ -1,4 +0,0 @@
testuser1002@spce.test:
allowed_clis: [ "43110029*", "43110021*" ]
user_cli: 43122122
inbound_upn: from_display

@ -1,12 +1,27 @@
test_uuid: invite_allowedcli_nonmatch
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,8 @@
{
"testuser1002@spce.test": {
"allowed_ips": [
"1.2.3.4"
],
"cli": 4311002
}
}

@ -1,2 +0,0 @@
testuser1002@spce.test:
allowed_ips: [ "1.2.3.4" ]

@ -1,12 +1,27 @@
test_uuid: invite_allowip
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,8 @@
{
"testuser1003@spce.test": {
"block_in_list": [
"4311001",
"4311002"
]
}
}

@ -1,2 +0,0 @@
testuser1003@spce.test:
block_in_list: [ "4311001", "4311002" ]

@ -1,12 +1,27 @@
test_uuid: invite_blockin_blst
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,11 @@
{
"testuser1002@spce.test": {
"clir": true
},
"testuser1003@spce.test": {
"block_in_list": [
"4311001"
],
"block_in_clir": true
}
}

@ -1,5 +0,0 @@
testuser1002@spce.test:
clir: 1
testuser1003@spce.test:
block_in_list: [ "4311001" ]
block_in_clir: 1

@ -1,12 +1,27 @@
test_uuid: invite_blockin_clir
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,8 @@
{
"testuser1003@spce.test": {
"block_in_list": [
"4311001"
],
"block_in_mode": true
}
}

@ -1,3 +0,0 @@
testuser1003@spce.test:
block_in_list: [ "4311001" ]
block_in_mode: 1

@ -1,12 +1,27 @@
test_uuid: invite_blockin_wlst
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,8 @@
{
"testuser1002@spce.test": {
"block_out_list": [
"4311003",
"4311001"
]
}
}

@ -1,2 +0,0 @@
testuser1002@spce.test:
block_out_list: [ "4311003", "4311001" ]

@ -1,12 +1,27 @@
test_uuid: invite_blockout_blst
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,5 @@
{
"testuser1002@spce.test": {
"ncos": "ncos_test_00"
}
}

@ -1,2 +0,0 @@
testuser1002@spce.test:
ncos: ncos_test_00

@ -1,12 +1,27 @@
test_uuid: invite_blockout_ncos
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,10 @@
{
"testuser1002@spce.test": {
"block_out_list": [
"4311001",
"4311003"
],
"block_out_override_pin": 444,
"cli": 4311002
}
}

@ -1,3 +0,0 @@
testuser1002@spce.test:
block_out_list: [ "4311001", "4311003" ]
block_out_override_pin: 444

@ -1,12 +1,27 @@
test_uuid: invite_blockout_pinoverride
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,9 @@
{
"testuser1002@spce.test": {
"block_out_list": [
"4311001",
"4311002"
],
"block_out_mode": true
}
}

@ -1,3 +0,0 @@
testuser1002@spce.test:
block_out_list: [ "4311001", "4311002" ]
block_out_mode: 1

@ -1,12 +1,27 @@
test_uuid: invite_blockout_wlst
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,27 +1,45 @@
test_uuid: invite_callforward
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1002
testuser1001:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1001
testuser1004:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1004
testuser1005:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,5 @@
{
"testuser1003@spce.test": {
"concurrent_max": 1
}
}

@ -1,2 +0,0 @@
testuser1003@spce.test:
concurrent_max: 1

@ -1,17 +1,33 @@
test_uuid: invite_concurrent_max
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1002
testuser1004:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,3 +0,0 @@
testuser1002@spce.test:
concurrent_max: 2
concurrent_max_out: 1

@ -1,2 +0,0 @@
testuser1002@spce.test:
concurrent_max_out_per_account: 1

@ -0,0 +1,8 @@
{
"testuser1003@spce.test": {
"concurrent_max_per_account": 2
},
"testuser1004@spce.test": {
"concurrent_max_per_account": 2
}
}

@ -1,4 +0,0 @@
testuser1003@spce.test:
concurrent_max_per_account: 2
testuser1004@spce.test:
concurrent_max_per_account: 2

@ -1,17 +1,33 @@
test_uuid: invite_concurrent_max_per_account
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1002
testuser1004:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -109,6 +109,5 @@ sip_out:
'P-Caller-UUID: \w+',
'P-Callee-UUID: \w+',
'P-Called-Party-ID: <sip:004321001@',
'P-App-Param: ;aleg_sst_enable=no;sst_enable=no',
'P-App-Name: sbc'
]

@ -0,0 +1,5 @@
{
"@spce.test": {
"allow_out_foreign_domain": true
}
}

@ -1,2 +0,0 @@
'@spce.test':
allow_out_foreign_domain: yes

@ -1,7 +1,21 @@
test_uuid: invite_foreign_dom
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,3 +0,0 @@
testuser1002@spce.test:
allowed_ips: [ "1.2.3.4" ]
ignore_allowed_ips: 1

@ -1,12 +1,27 @@
test_uuid: invite_lateoam
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,12 +1,27 @@
test_uuid: invite_no_refer
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,12 +1,27 @@
test_uuid: invite_offline
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,4 +0,0 @@
"@spce.test":
rewrite_rule_set: rw_00
peer_00_host0:
rewrite_rule_set: rw_00

@ -1,4 +0,0 @@
"@spce.test":
rewrite_rule_set: rw_00
peer_00_host0:
rewrite_rule_set: rw_00

@ -1,17 +1,33 @@
test_uuid: invite_redirect
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1002
testuser1004:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,12 +1,27 @@
test_uuid: invite_retrans
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,17 +1,33 @@
test_uuid: invite_speeddial
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1002
testuser1001:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,12 +1,27 @@
test_uuid: invite_tcp_udp
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,5 @@
{
"testuser1003@spce.test": {
"allow_out_foreign_domain": true
}
}

@ -1,2 +0,0 @@
testuser1003@spce.test:
allow_out_foreign_domain: yes

@ -1,12 +1,27 @@
test_uuid: invite_tcp_udp_reinvite
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,12 +1,27 @@
test_uuid: invite_voicebox
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1001:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1001
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,7 +1,21 @@
test_uuid: register
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,2 +0,0 @@
testuser1003@spce.test:
allowed_ips: [ "1.2.3.4" ]

@ -1,12 +1,27 @@
test_uuid: register_bria
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1004:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1004
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,3 +0,0 @@
testuser1003@spce.test:
allowed_ips: [ "1.2.3.4" ]
ignore_allowed_ips: 1

@ -1,7 +1,21 @@
test_uuid: register_tcp
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,12 +1,27 @@
test_uuid: reminder
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
testuser1001:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -0,0 +1,5 @@
{
"@spce.test": {
"unauth_inbound_calls": true
}
}

@ -1,7 +1,21 @@
test_uuid: incoming_foreign_dom
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

@ -1,7 +1,21 @@
test_uuid: incoming_peer
domains:
'spce.test':
reseller_id: 1
customers:
'customer.test':
contacts:
- email: "customer.test@spce.test"
reseller_id: 1
details:
status: 'active'
type: 'sipaccount'
billing_profile_id: 1
reseller_id: 1
subscribers:
spce.test:
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save