TT#53329 Add some basic header manipulation tests

Added tests:
* scenarios/invite_hm
* scenarios/invite_hm_callforward
* scenarios/invite_hm_peerout

Add a new file descriptors for the tests:
* pro.yml
If the file is present and the PROFILE is CE, then
the test isskipped because not in scope.

Change-Id: I8da41d764ef352d3caf592f31894e0c58399ed07
changes/45/27345/17
Marco Capetta 7 years ago
parent e36b100479
commit eb88477c14

@ -222,6 +222,11 @@ create_voip_prefs() {
"${BIN_DIR}/create_lnp.pl" "${SCEN_CHECK_DIR}/lnp.yml"
fi
if [ -f "${SCEN_CHECK_DIR}/header.yml" ]; then
echo "$(date) - Creating header manipulations"
"${BIN_DIR}/create_header_manipulation.pl" "${SCEN_CHECK_DIR}/header.yml"
fi
if [ -f "${SCEN_CHECK_DIR}/prefs.json" ]; then
echo "$(date) - Setting preferences"
"${BIN_DIR}/set_preferences.pl" "${SCEN_CHECK_DIR}/prefs.json"
@ -244,6 +249,11 @@ delete_voip() {
ngcp-kamcmd proxy permissions.trustedReload
fi
if [ -f "${SCEN_CHECK_DIR}/header.yml" ]; then
echo "$(date) - Deleting header manipulations"
"${BIN_DIR}/create_header_manipulation.pl" -delete "${SCEN_CHECK_DIR}/header.yml"
fi
if [ -f "${SCEN_CHECK_DIR}/lnp.yml" ]; then
echo "$(date) - Deleting lnp carrier/number"
"${BIN_DIR}/create_lnp.pl" -delete "${SCEN_CHECK_DIR}/lnp.yml"
@ -711,6 +721,12 @@ if ! [ -f "${SCEN_CHECK_DIR}/scenario.yml" ]; then
exit 14
fi
if [ -f "${SCEN_CHECK_DIR}/pro.yml" ] && [ "${PROFILE}" == "CE" ]; then
echo "${SCEN_CHECK_DIR}/pro.yml found but PROFILE ${PROFILE}"
echo "Skipping the tests because not in scope"
exit 0
fi
if ! "$SKIP" ; then
echo "$(date) - Deleting all info for ${DOMAIN} domain"
delete_voip "${DOMAIN}" # just to be sure nothing is there

@ -0,0 +1,173 @@
#!/usr/bin/perl
#
# Copyright: 2013 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".
#
use strict;
use warnings;
use English;
use Getopt::Long;
use Cwd 'abs_path';
use Config::Tiny;
use Sipwise::API qw(all);
use YAML::XS qw(DumpFile LoadFile);
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;
my $del = 0;
sub usage {
return "Usage:\n$PROGRAM_NAME header.yml\n".
"Options:\n".
" -delete\n".
" -d debug\n".
" -h this help\n";
}
my $help = 0;
GetOptions ("h|help" => \$help,
"d|debug" => \$opts->{verbose},
"delete" => \$del)
or die("Error in command line arguments\n".usage());
die(usage()) unless (!$help);
die("Error: Wrong number of arguments\n".usage()) unless ($#ARGV == 0);
sub manage_headers_rule
{
my $data = shift;
my $id = $api->check_headerrule_exists($data);
if($id) {
$data->{id} = $id;
print "headerrule [$data->{name}] already there [$id]\n";
} else {
my $hr_id = $api->create_headerrule($data);
if(defined $hr_id) {
$data->{id} = $hr_id;
print "headerrule [$data->{name}] created [$hr_id]\n";
}
else {
die "Error: Can't create headerrule";
}
}
return;
}
sub manage_headers_conditions
{
my $data = shift;
my $header_id = shift;
foreach my $condition (@{$data}) {
$condition->{rule_id} = $header_id;
my $con_id = $api->create_headerrulecondition($condition);
if(defined $con_id) {
$condition->{id} = $con_id;
print "header_condition [$condition->{match_type}/$condition->{match_part}/$condition->{match_name}]: created [$con_id]\n";
}
else {
die "Error: Can't create headerrulecondition";
}
}
return;
}
sub manage_headers_actions
{
my $data = shift;
my $header_id = shift;
foreach my $action (@{$data}) {
$action->{rule_id} = $header_id;
my $act_id = $api->create_headerruleaction($action);
if(defined $act_id) {
$action->{id} = $act_id;
if(defined $action->{value}) {
print "header_action [$action->{action_type}/$action->{header}/$action->{value}]: created [$act_id]\n";
}
else {
print "header_action [$action->{action_type}/$action->{header}/]: created [$act_id]\n";
}
}
else {
die "Error: Can't create headerruleaction";
}
}
return;
}
sub do_delete
{
my ($data) = @_;
for my $header_set_name (keys %{$data}) {
my $param = { reseller_id => 1, name => $header_set_name };
my $hrs_id = $api->check_headerruleset_exists($param);
if(defined $hrs_id) {
if($api->delete_headerruleset($hrs_id)) {
print "headerruleset [$header_set_name] deleted [$hrs_id]\n";
}
else {
die "Error: headerruleset [$header_set_name] can't be removed [$hrs_id]\n";
}
} else {
print "headerruleset [$header_set_name] not there\n";
}
}
exit;
}
sub do_create
{
my ($data) = @_;
for my $header_set_name (keys %{$data}) {
my $param = { reseller_id => 1, name => $header_set_name };
my $hrs_id = $api->check_headerruleset_exists($param);
if(defined $hrs_id) {
print "headerruleset [$header_set_name] already there [$hrs_id]\n";
} else {
$hrs_id = $api->create_headerruleset($param);
print "headerruleset [$header_set_name] created [$hrs_id]\n";
}
foreach my $header_rule (@{$data->{$header_set_name}->{header_rules}}) {
$header_rule->{data}->{set_id} = $hrs_id;
manage_headers_rule($header_rule->{data});
manage_headers_conditions($header_rule->{conditions}, $header_rule->{data}->{id});
manage_headers_actions($header_rule->{actions}, $header_rule->{data}->{id});
}
}
exit;
}
my $r = YAML::XS::LoadFile(abs_path($ARGV[0]));
if ($del) {
do_delete($r);
}
else {
do_create($r);
}

@ -605,6 +605,73 @@ sub delete_rewriteruleset {
return $self->_delete($urldata);
}
sub check_headerrulecondition_exists {
my ($self, $data) = @_;
my $urldata = '/api/headerruleconditions/';
my $collection_id = 'ngcp:headerruleconditions';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_headerrulecondition {
my ($self, $data) = @_;
my $urldata = '/api/headerruleconditions/';
return $self->_create($data, $urldata);
}
sub check_headerruleaction_exists {
my ($self, $data) = @_;
my $urldata = '/api/headerruleactions/';
my $collection_id = 'ngcp:headerruleactions';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_headerruleaction {
my ($self, $data) = @_;
my $urldata = '/api/headerruleactions/';
return $self->_create($data, $urldata);
}
sub check_headerrule_exists {
my ($self, $data) = @_;
my $urldata = '/api/headerrules/';
my $collection_id = 'ngcp:headerrules';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_headerrule {
my ($self, $data) = @_;
my $urldata = '/api/headerrules/';
return $self->_create($data, $urldata);
}
sub check_headerruleset_exists {
my ($self, $data) = @_;
my $urldata = '/api/headerrulesets/';
my $collection_id = 'ngcp:headerrulesets';
return $self->_exists($data, $urldata, $collection_id);
}
sub create_headerruleset {
my ($self, $data) = @_;
my $urldata = '/api/headerrulesets/';
return $self->_create($data, $urldata);
}
sub delete_headerruleset {
my ($self, $id) = @_;
my $urldata = "/api/headerrulesets/${id}";
return $self->_delete($urldata);
}
sub check_peeringgroup_exists {
my ($self, $data) = @_;
my $urldata = '/api/peeringgroups/';

@ -0,0 +1,42 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE'
- 'Contact: sip:testuser1002@'
- 'To: <sip:testuser1003@'
- 'CSeq: 1 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
]
- [
'^SIP/2.0 407 Proxy Authentication Required',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
]

@ -0,0 +1,237 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_AUTH_HELPER:
$x_hdr(From): spce.test
$var(realm_user): testuser1002
$var(realm_domain): spce.test
- return|ROUTE_AUTH_HELPER:
$avp(orig_acc_caller_user): ['testuser1002']
$avp(orig_acc_caller_domain): ['spce.test']
- start|ROUTE_ADD_CALLINFO_REPLY:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_REPLY:
- return|ROUTE_AUTH:
- return|ROUTE_FIND_CALLER:
- start|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_CLEAR_CALLER_PREF:
- return|ROUTE_CLEAR_CALLER_PREF:
- start|ROUTE_CHECK_UA:
- return|ROUTE_CHECK_UA:
- start|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_DLG_MANAGE:
- return|ROUTE_DLG_MANAGE:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_GET_CALLER_CLI:
- return|ROUTE_GET_CALLER_CLI:
- start|ROUTE_GET_FORWARDER_CLI:
- return|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_CLIR:
- return|ROUTE_CLIR:
- start|ROUTE_CALLER_BLOCK_CLI:
- return|ROUTE_CALLER_BLOCK_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_CLEAR_CALLEE_PREF:
- return|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- start|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
- start|ROUTE_ORDER_CF_MAP_ID:
- return|ROUTE_ORDER_CF_MAP_ID:
- return|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_NCOS_CHECK:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- return|ROUTE_NCOS_CHECK:
- start|ROUTE_BLOCK_OUT:
- return|ROUTE_BLOCK_OUT:
- start|ROUTE_CHECK_PBX:
- return|ROUTE_CHECK_PBX:
- start|ROUTE_CALLEE_DISPATCH:
- start|ROUTE_INVITE_TO_INT:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_CF_CFU:
- return|ROUTE_CF_CFU:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- start|ROUTE_OUTBOUND:
- start|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- start|ROUTE_ACC_CALLER:
- return|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- return|ROUTE_ACC_CALLEE:
- start|ROUTE_ADD_AOC_HEADER:
- return|ROUTE_ADD_AOC_HEADER:
- start|BRANCH_ROUTE_SBC:
- start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- start|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_SET_BRANCH_HDRS:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- return|ROUTE_SET_BRANCH_HDRS:
- start|ROUTE_SET_RUSER:
- return|ROUTE_SET_RUSER:
- start|ROUTE_BRANCH_ACC_RTP:
- return|ROUTE_BRANCH_ACC_RTP:
- start|ROUTE_FILTER_PRACK:
- return|ROUTE_FILTER_PRACK:
- start|ROUTE_PREPARE_SST:
- return|ROUTE_PREPARE_SST:
- start|ROUTE_PREPARE_MOH:
- return|ROUTE_PREPARE_MOH:
- start|ROUTE_SET_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_SET_CALLER_CLI:
- start|ROUTE_SET_CALLEE:
- return|ROUTE_SET_CALLEE:
- start|ROUTE_ADD_CALLINFO:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- start|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- return|BRANCH_ROUTE_SBC:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
sip_in:
- '^INVITE'
- 'Contact: sip:testuser1002@'
- 'CSeq: 2 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
- 'Proxy-Authorization: Digest username="testuser1002"'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
]
- [
'^INVITE sip:testuser1003@',
'CSeq: 2 INVITE',
'From: <sip:4311002@',
'To: <sip:testuser1003@',
'Content-Type: application/sdp',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]',
'P-Callee-UUID: [% spce_test.testuser1003.uuid %]',
'P-Asserted-Identity: <sip:11111111@',
'P-Called-Party-ID: <sip:testuser1003@',
'P-App-Param: ;calltimer=21600;aleg_sst_enable=no;sst_enable=no',
'P-App-Name: sbc',
'TestTest: updated_local_header'
]

@ -0,0 +1,26 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^SIP/2.0 180 Ringing'
- 'CSeq: 2 INVITE'
sip_out:
- [
'^SIP/2.0 180 Ringing',
'CSeq: 2 INVITE',
]

@ -0,0 +1,50 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_RTPENGINE:
- return|REPLY_ROUTE_RTPENGINE:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- start|dialog:start:
- return|dialog:start:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- return|dialog:start:
sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: 2 INVITE'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@',
'ReplyOnlySecond: this_is_second_reply',
'ReplyOnlyFirst: this_is_first_reply'
]

@ -0,0 +1,39 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_RESTORE_CLUSTERSET:
- start|ROUTE_WITHINDLG_RTPENGINE:
- return|ROUTE_WITHINDLG_RTPENGINE:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^ACK sip:127.0.0.1:5080;prxroute=1 SIP/2.0'
- 'CSeq: 2 ACK'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1003@'
sip_out:
- [
'^ACK sip:127.0.0.1:5080;prxroute=1 SIP/2.0',
'CSeq: 2 ACK',
'From: <sip:4311002@',
'To: <sip:testuser1003@'
]

@ -0,0 +1,57 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|dialog:end:
- return|dialog:end:
$avp(lua_dlg_profile): None
- return|dialog:end:
- start|ROUTE_STOP_RTPPROXY:
- start|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_STOP_RTPPROXY:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'CSeq: 3 BYE'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1003@'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
]
- [
'^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0',
'Contact: sip:testuser1002@',
'CSeq: 3 BYE',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:4311002@',
'To: <sip:testuser1003@'
]

@ -0,0 +1,32 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: 3 BYE'
- 'Content-Length: 0'
- 'From: <sip:4311002@'
- 'To: <sip:testuser1003@'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1003@'
]

@ -0,0 +1,10 @@
cdr:
- source_user: 'testuser1002'
source_domain: 'spce.test'
source_cli: '4311002'
destination_user: 'testuser1003'
destination_domain: 'spce.test'
destination_user_dialed: 'testuser1003'
call_type: 'call'
call_status: 'ok'
call_code: '200'

@ -0,0 +1,216 @@
hm_00:
header_rules:
- data:
direction: inbound
description: Empty Manipulation
name: hm_00_00
stopper: 0
enabled: 0
priority: 48
conditions: []
actions: []
- data:
direction: inbound
description: Add TestTest Header
name: hm_00_01
stopper: 0
enabled: 1
priority: 50
conditions:
- enabled: 1
match_name: From
match_part: username
match_type: header
expression: contains
expression_negation: 0
value_type: input
values:
- value: testuser1002
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: TestTest
header_part: full
value: new_internal_header
value_part: full
rwr_set_id:
- data:
direction: local
description: Edit TestTest Local Header
name: hm_00_02
stopper: 0
enabled: 1
priority: 51
conditions:
- enabled: 1
match_name: TestTest
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: new_internal_header
rwr_set_id:
actions:
- enabled: 1
action_type: set
header: TestTest
header_part: full
value: updated_local_header
value_part: full
rwr_set_id:
- data:
direction: peer
description: Edit TestTest Peer Header
name: hm_00_03
stopper: 0
enabled: 1
priority: 52
conditions:
- enabled: 1
match_name: TestTest
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '^new[\w]+$'
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: TestTest
header_part: full
value:
value_part: full
rwr_set_id:
- data:
direction: reply
description: Add ReplyOnly Headers
name: hm_00_04
stopper: 0
enabled: 1
priority: 53
conditions:
- enabled: 1
match_name: From
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '^.*$'
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: ReplyOnlyFirst
header_part: full
value: this_is_first_reply
value_part: full
rwr_set_id:
- enabled: 1
action_type: add
header: ReplyOnlySecond
header_part: full
value: this_is_second_reply
value_part: full
rwr_set_id:
hm_01:
header_rules:
- data:
direction: outbound
description: Edit P-Asserted-Identity
name: hm_01_00
stopper: 1
enabled: 1
priority: 60
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1003@spce.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: set
header: P-Asserted-Identity
header_part: username
value: 11111111
value_part: full
rwr_set_id:
- data:
direction: outbound
description: Should not be executed
name: hm_01_01
stopper: 0
enabled: 1
priority: 61
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '.*'
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: From
header_part: full
value:
value_part: full
rwr_set_id:
- enabled: 1
action_type: remove
header: To
header_part: full
value:
value_part: full
rwr_set_id:
- data:
direction: reply
description: Add NO_ReplyOnly Headers
name: hm_01_02
stopper: 0
enabled: 1
priority: 62
conditions:
- enabled: 1
match_name: From
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '^.*$'
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: NO_ReplyOnlyFirst
header_part: full
value: no this_is_first_reply
value_part: full
rwr_set_id:
- enabled: 1
action_type: add
header: NO_ReplyOnlySecond
header_part: full
value: no this_is_second_reply
value_part: full
rwr_set_id:

@ -0,0 +1,8 @@
{
"testuser1002@spce.test": {
"header_rule_set": "hm_00"
},
"testuser1003@spce.test": {
"header_rule_set": "hm_01"
}
}

@ -0,0 +1,41 @@
test_uuid: invite_hm
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
alias_numbers:
- cc: 34
ac: 96
sn: 5711941
scenarios:
- ip: 127.126.0.1
username: testuser1002
domain: spce.test
responders:
- ip: 127.1.0.1
username: testuser1003
domain: spce.test
register: yes

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Sipwise NGCP Benchmark UAC Caller">
<send start_rtd="1" start_rtd="2">
<![CDATA[
INVITE sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv"]@[field2 file="caller.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 1 INVITE
Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" rtd="1" optional="true">
</recv>
<recv response="407" rtd="2" auth="true"/>
<send>
<![CDATA[
ACK sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]:[remote_port] SIP/2.0
[last_Via:]
From: <sip:[field0 file="caller.csv"]@[field2 file="caller.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 1 ACK
Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send start_rtd="3">
<![CDATA[
INVITE sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv"]@[field2 file="caller.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 2 INVITE
Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port]
Max-Forwards: 70
[field1 file="caller.csv"]
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<recv response="183" optional="true">
</recv>
<recv response="200" rrs="true" rtd="3">
</recv>
<send>
<![CDATA[
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv"]@[field2 file="caller.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
[routes]
CSeq: 2 ACK
Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<nop>
<action>
<exec play_pcap_audio="media181sec.pcap"/>
</action>
</nop>
<pause milliseconds="1000"/>
<send start_rtd="4">
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv"]@[field2 file="caller.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 3 BYE
Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port]
[routes]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="200" crlf="true" rtd="4">
</recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200, 500, 1000"/>
<!-- <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> -->
</scenario>

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<scenario name="Sipwise NGCP Benchmark UAS Responder">
<recv request="INVITE" crlf="true" rtd="true">
</recv>
<send>
<![CDATA[
SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
[last_Record-Route:]
[last_Route:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv request="ACK"
crlf="true">
</recv>
<recv request="BYE">
</recv>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: [len]
]]>
</send>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>

@ -0,0 +1,42 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE sip:testuser1001@'
- 'Contact: sip:testuser1002@'
- 'To: <sip:testuser1001@'
- 'CSeq: 1 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]
- [
'^SIP/2.0 407 Proxy Authentication Required',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]

@ -0,0 +1,199 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_AUTH_HELPER:
$x_hdr(From): spce.test
$var(realm_user): testuser1002
$var(realm_domain): spce.test
- return|ROUTE_AUTH_HELPER:
$avp(orig_acc_caller_user): ['testuser1002']
$avp(orig_acc_caller_domain): ['spce.test']
- start|ROUTE_ADD_CALLINFO_REPLY:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_REPLY:
- return|ROUTE_AUTH:
- return|ROUTE_FIND_CALLER:
- start|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_CLEAR_CALLER_PREF:
- return|ROUTE_CLEAR_CALLER_PREF:
- start|ROUTE_CHECK_UA:
- return|ROUTE_CHECK_UA:
- start|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_DLG_MANAGE:
- return|ROUTE_DLG_MANAGE:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_GET_CALLER_CLI:
- return|ROUTE_GET_CALLER_CLI:
- start|ROUTE_GET_FORWARDER_CLI:
- return|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_CLIR:
- return|ROUTE_CLIR:
- start|ROUTE_CALLER_BLOCK_CLI:
- return|ROUTE_CALLER_BLOCK_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_CLEAR_CALLEE_PREF:
- return|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- start|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
- start|ROUTE_ORDER_CF_MAP_ID:
- return|ROUTE_ORDER_CF_MAP_ID:
- return|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_NCOS_CHECK:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- return|ROUTE_NCOS_CHECK:
- start|ROUTE_BLOCK_OUT:
- return|ROUTE_BLOCK_OUT:
- start|ROUTE_CHECK_PBX:
- return|ROUTE_CHECK_PBX:
- start|ROUTE_CALLEE_DISPATCH:
- start|ROUTE_INVITE_TO_INT:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_CF_CFU:
- start|ROUTE_LOAD_CF_MAP:
- return|ROUTE_LOAD_CF_MAP:
- start|ROUTE_CHECK_CF:
- start|ROUTE_CHECK_CF_SOURCES:
- return|ROUTE_CHECK_CF_SOURCES:
- start|ROUTE_CHECK_CF_BNUMBERS:
- return|ROUTE_CHECK_CF_BNUMBERS:
- start|ROUTE_CHECK_CF_PERIOD:
- return|ROUTE_CHECK_CF_PERIOD:
- return|ROUTE_CHECK_CF:
- start|ROUTE_ACC_CF:
- start|ROUTE_ACC_CALLER:
- return|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- return|ROUTE_ACC_CALLEE:
- return|ROUTE_ACC_CF:
- start|ROUTE_EXECUTE_CF_LOOP:
- start|ROUTE_SET_CALLER_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"total",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]"
]
- start|ROUTE_ADD_AOC_HEADER:
- return|ROUTE_ADD_AOC_HEADER:
- start|BRANCH_ROUTE_FWD_LOOP:
- start|ROUTE_APPEND_CF_HDRS:
- start|ROUTE_ADD_EVENTMON_HEADERS:
- return|ROUTE_ADD_EVENTMON_HEADERS:
- return|ROUTE_APPEND_CF_HDRS:
- start|ROUTE_ADD_CALLINFO:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- start|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- return|BRANCH_ROUTE_FWD_LOOP:
# branch ??
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE sip:testuser1001@'
- 'Contact: sip:testuser1002@'
- 'CSeq: 2 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
- 'Proxy-Authorization: Digest username="testuser1002"'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@',
'P-Caller-UUID: [% spce_test.testuser1002.uuid %]'
]
- [
'^INVITE sip:4311003@',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@',
'Content-Type: application/sdp',
'P-Caller-UUID: [% spce_test.testuser1001.uuid %]',
'P-First-Caller-UPN: 4311002',
'P-First-Caller-NPN: 4311002',
'P-Acc-Caller-User: testuser1001',
'P-Acc-State: cfu',
'P-From-Peer: 0',
'P-CF-Depth: 1',
'P-App-Param: ;profile=ngcp_cf',
'P-App-Name: sbc',
'P-NGCP-Forward-Info: <sip:testuser1001@',
'P-NGCP-Callee-Info: <sip:4311003@',
'Outbound: outbound header'
]

@ -0,0 +1,227 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_CONSUME_CF_HDRS:
- start|ROUTE_RESTORE_EVENTMON_HEADERS:
- return|ROUTE_RESTORE_EVENTMON_HEADERS:
- return|ROUTE_CONSUME_CF_HDRS:
- return|ROUTE_FIND_CALLER:
- start|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_CLEAR_CALLER_PREF:
- return|ROUTE_CLEAR_CALLER_PREF:
- start|ROUTE_CHECK_UA:
- return|ROUTE_CHECK_UA:
- start|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_GET_FORWARDER_CLI:
- return|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_CLIR:
- return|ROUTE_CLIR:
- start|ROUTE_CALLER_BLOCK_CLI:
- return|ROUTE_CALLER_BLOCK_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_CLEAR_CALLEE_PREF:
- return|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- start|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- start|ROUTE_DLG_MANAGE:
- return|ROUTE_DLG_MANAGE:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLEE_DIALOG:
$avp(lua_dlg_profile): [
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- start|ROUTE_BLOCK_IN:
- return|ROUTE_BLOCK_IN:
- start|ROUTE_ORDER_CF_MAP_ID:
- return|ROUTE_ORDER_CF_MAP_ID:
- return|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_NCOS_CHECK:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- return|ROUTE_NCOS_CHECK:
- start|ROUTE_BLOCK_OUT:
- return|ROUTE_BLOCK_OUT:
- start|ROUTE_CHECK_PBX:
- return|ROUTE_CHECK_PBX:
- start|ROUTE_CALLEE_DISPATCH:
- start|ROUTE_INVITE_TO_INT:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_CF_CFU:
- return|ROUTE_CF_CFU:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- start|ROUTE_OUTBOUND:
$avp(lua_dlg_profile): [
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- start|ROUTE_SET_CALLER_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1001.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1001.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
- start|ROUTE_ACC_CALLER:
- return|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- return|ROUTE_ACC_CALLEE:
- start|BRANCH_ROUTE_SBC:
- start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
- start|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLEE_DIALOG:
- start|ROUTE_SET_BRANCH_HDRS:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- return|ROUTE_SET_BRANCH_HDRS:
- start|ROUTE_SET_RUSER:
- return|ROUTE_SET_RUSER:
- start|ROUTE_BRANCH_ACC_RTP:
- return|ROUTE_BRANCH_ACC_RTP:
- start|ROUTE_FILTER_PRACK:
- return|ROUTE_FILTER_PRACK:
- start|ROUTE_PREPARE_SST:
- return|ROUTE_PREPARE_SST:
- start|ROUTE_PREPARE_MOH:
- return|ROUTE_PREPARE_MOH:
- start|ROUTE_SET_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_SET_CALLER_CLI:
- start|ROUTE_SET_CALLEE:
- return|ROUTE_SET_CALLEE:
- start|ROUTE_ADD_CALLINFO:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- start|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- return|BRANCH_ROUTE_SBC:
# branch ??
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1001.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1001.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1001.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1001.uuid %]",
"local",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1003.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1003.uuid %]"
]
sip_in:
- '^INVITE sip:4311003@'
- 'Contact: <sip:127.0.0.1:5080'
- 'CSeq: \d+ INVITE'
- 'Content-Type: application/sdp'
- 'P-Caller-UUID: [% spce_test.testuser1001.uuid %]'
- 'P-First-Caller-UPN: 4311002'
- 'P-First-Caller-NPN: 4311002'
- 'P-Acc-Caller-User: testuser1001'
- 'P-Acc-State: cfu'
- 'P-From-Peer: 0'
- 'P-CF-Depth: 1'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: \d+ INVITE',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]
- [
'^INVITE sip:testuser1003@',
'CSeq: \d+ INVITE',
'From: <sip:4311002@',
'Contact: <sip:127.0.0.1:5080(;transport=udp)?>',
'To: <sip:testuser1001@',
'Content-Type: application/sdp',
'P-Callee-UUID: [% spce_test.testuser1003.uuid %]',
'P-Asserted-Identity: <sip:11111111@',
'P-Called-Party-ID: <sip:testuser1003@',
'P-App-Name: sbc',
'P-NGCP-Caller-Info: <sip:testuser1001@',
'P-NGCP-Callee-Info: <sip:4311003@',
'Inbound: inbound header'
]

@ -0,0 +1,46 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_RESTORE_CLUSTERSET:
- start|ROUTE_WITHINDLG_RTPENGINE:
- return|ROUTE_WITHINDLG_RTPENGINE:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^ACK sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'CSeq: 2 ACK'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1001@'
sip_out:
- [
'^ACK sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0',
'Contact: sip:testuser1002@',
'CSeq: 2 ACK',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]

@ -0,0 +1,55 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|dialog:end:
- return|dialog:end:
$avp(lua_dlg_profile): None
- return|dialog:end:
- start|ROUTE_STOP_RTPPROXY:
- return|ROUTE_STOP_RTPPROXY:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'CSeq: 3 BYE'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1001@'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]
- [
'^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0',
'Contact: sip:testuser1002@',
'CSeq: 3 BYE',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]

@ -0,0 +1,53 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|dialog:end:
- return|dialog:end:
$avp(lua_dlg_profile): None
- return|dialog:end:
- start|ROUTE_STOP_RTPPROXY:
- start|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_STOP_RTPPROXY:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^BYE sip:127.0.0.1:5080;transport=udp SIP/2.0'
- 'CSeq: \d+ BYE'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1001@'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: \d+ BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]
- [
'^BYE sip:127.0.0.1:5080;transport=udp SIP/2.0',
'CSeq: \d+ BYE',
'Max-Forwards: 69',
'Content-Length: 0',
'From: <sip:4311002@',
'To: <sip:testuser1001@'
]

@ -0,0 +1,32 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: \d+ BYE'
- 'Content-Length: 0'
- 'From: <sip:4311002@'
- 'To: <sip:testuser1001@'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: \d+ BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]

@ -0,0 +1,32 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^SIP/2.0 200 OK'
- 'Content-Length: 0'
- 'CSeq: 3 BYE'
- 'From: <sip:testuser1002@'
- 'To: <sip:testuser1001@'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:testuser1001@'
]

@ -0,0 +1,19 @@
---
testuser1001@spce.test:
destinations:
destinations:
- destination: sip:4311003@spce.test
priority: 0
timeout: 10
name: dest1001
mappings:
cfu:
- bnumberset: null
destinationset: dest1001
sourceset: null
timeset: null
cfb: []
cfna: []
cft: []
cfs: []
cfr: []

@ -0,0 +1,19 @@
cdr:
- source_user: 'testuser1002'
source_domain: 'spce.test'
source_cli: '4311002'
destination_user: 'testuser1001'
destination_domain: 'spce.test'
destination_user_dialed: 'testuser1001'
call_type: 'call'
call_status: 'ok'
call_code: '200'
- source_user: 'testuser1001'
source_domain: 'spce.test'
source_cli: '4311001'
destination_user: 'testuser1003'
destination_domain: 'spce.test'
destination_user_dialed: '4311003'
call_type: 'cfu'
call_status: 'ok'
call_code: '200'

@ -0,0 +1,188 @@
hm_00:
header_rules:
- data:
direction: inbound
description: Empty Manipulation
name: hm_00_00
stopper: 0
enabled: 0
priority: 48
conditions: []
actions: []
- data:
direction: inbound
description: Add TestTest Header
name: hm_00_01
stopper: 0
enabled: 1
priority: 50
conditions:
- enabled: 1
match_name: From
match_part: username
match_type: header
expression: contains
expression_negation: 0
value_type: input
values:
- value: testuser1001
rwr_set_id:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '.*'
rwr_set_id:
actions:
- enabled: 1
action_type: preference
header: TestTest
header_part: full
value: language
value_part: full
rwr_set_id:
- data:
direction: peer
description: Edit TestTest Peer Header
name: hm_00_03
stopper: 0
enabled: 1
priority: 52
conditions:
- enabled: 1
match_name: TestTest
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '^new[\w]+$'
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: TestTest
header_part: full
value:
value_part: full
rwr_set_id:
hm_01:
header_rules:
- data:
direction: outbound
description: Add header as AVP
name: hm_01_00
stopper: 1
enabled: 1
priority: 60
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1001@spce.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: set
header: P-Asserted-Identity
header_part: username
value: 11111111
value_part: full
rwr_set_id:
- data:
direction: outbound
description: Should not be executed
name: hm_01_01
stopper: 0
enabled: 1
priority: 61
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '.*'
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: From
header_part: full
value:
value_part: full
rwr_set_id:
- enabled: 1
action_type: remove
header: To
header_part: full
value:
value_part: full
rwr_set_id:
hm_02:
header_rules:
- data:
direction: cf_outbound
description: CF Outbound
name: hm_02_00
stopper: 0
enabled: 1
priority: 70
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1001@spce.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: Outbound
header_part: full
value: outbound header
value_part: full
rwr_set_id:
- data:
direction: cf_inbound
description: CF Inbound
name: hm_02_01
stopper: 0
enabled: 1
priority: 71
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: '<sip:testuser1001@spce.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: Inbound
header_part: full
value: inbound header
value_part: full
rwr_set_id:

@ -0,0 +1,11 @@
{
"testuser1002@spce.test": {
"header_rule_set": "hm_00"
},
"testuser1003@spce.test": {
"header_rule_set": "hm_01"
},
"testuser1001@spce.test": {
"header_rule_set": "hm_02"
}
}

@ -0,0 +1,48 @@
test_uuid: invite_hm_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:
testuser1001:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1001
testuser1002:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1002
testuser1003:
customer: 'customer.test'
password: testuser
cc: 43
ac: 1
sn: 1003
scenarios:
- ip: 127.126.0.1
username: testuser1002
domain: spce.test
responders:
- ip: 127.1.0.1
username: testuser1001
domain: spce.test
register: no
active: no
- ip: 127.1.0.3
username: testuser1003
domain: spce.test
register: yes

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Sipwise NGCP Benchmark UAC Caller">
<send start_rtd="1" start_rtd="2">
<![CDATA[
INVITE sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 1 INVITE
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" rtd="1" optional="true">
</recv>
<recv response="407" rtd="2" auth="true"/>
<send>
<![CDATA[
ACK sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]:[remote_port] SIP/2.0
[last_Via:]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 1 ACK
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send start_rtd="3">
<![CDATA[
INVITE sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 2 INVITE
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
[field1 file="caller.csv" line=0]
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<recv response="183" optional="true">
</recv>
<recv response="200" rrs="true" rtd="3">
</recv>
<send>
<![CDATA[
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
[routes]
CSeq: 2 ACK
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<nop>
<action>
<exec play_pcap_audio="media181sec.pcap"/>
</action>
</nop>
<pause milliseconds="1000"/>
<send start_rtd="4">
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 3 BYE
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
[routes]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="200" crlf="true" rtd="4">
</recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200, 500, 1000"/>
<!-- <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> -->
</scenario>

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<scenario name="Sipwise NGCP Benchmark UAS Responder">
<recv request="INVITE" crlf="true" rtd="true">
</recv>
<send>
<![CDATA[
SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
[last_Record-Route:]
[last_Route:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv request="ACK"
crlf="true">
</recv>
<recv request="BYE">
</recv>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: [len]
]]>
</send>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>

@ -0,0 +1,42 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^INVITE sip:004321001@'
- 'Contact: sip:testuser1002@'
- 'To: <sip:004321001@'
- 'CSeq: 1 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:004321001@'
]
- [
'^SIP/2.0 407 Proxy Authentication Required',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:004321001@'
]

@ -0,0 +1,209 @@
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_AUTH_HELPER:
- return|ROUTE_AUTH_HELPER:
- start|ROUTE_ADD_CALLINFO_REPLY:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_REPLY:
- return|ROUTE_AUTH:
- return|ROUTE_FIND_CALLER:
- start|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_CLEAR_CALLER_PREF:
- return|ROUTE_CLEAR_CALLER_PREF:
- start|ROUTE_CHECK_UA:
- return|ROUTE_CHECK_UA:
- start|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_CONTRACT_PREF:
- return|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_DLG_MANAGE:
- return|ROUTE_DLG_MANAGE:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_GET_CALLER_CLI:
- return|ROUTE_GET_CALLER_CLI:
- start|ROUTE_GET_FORWARDER_CLI:
- return|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_CLIR:
- return|ROUTE_CLIR:
- start|ROUTE_CALLER_BLOCK_CLI:
- return|ROUTE_CALLER_BLOCK_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_CLI_ALLOWED:
- return|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_CLEAR_CALLEE_PREF:
- return|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_NCOS_CHECK:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- start|ROUTE_NCOS:
- return|ROUTE_NCOS:
- return|ROUTE_NCOS_CHECK:
- start|ROUTE_BLOCK_OUT:
- return|ROUTE_BLOCK_OUT:
- start|ROUTE_CHECK_PBX:
- return|ROUTE_CHECK_PBX:
- start|ROUTE_INVITE_TO_EXT:
- start|ROUTE_PSTN:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- start|ROUTE_PSTN_SELECT_PEER:
$avp(lua_dlg_profile): ["outgoing"]
- start|ROUTE_CLEAR_PEER_OUT_PREF:
- return|ROUTE_CLEAR_PEER_OUT_PREF:
- start|ROUTE_LOAD_PEER_OUT_PREF:
- return|ROUTE_LOAD_PEER_OUT_PREF:
- return|ROUTE_PSTN_SELECT_PEER:
- start|ROUTE_OUTBOUND:
$avp(lua_dlg_profile): [
"relay",
"peerout:[% peer_00_host0.id %]",
"peer:[% peer_00_host0.id %]",
"outgoing"
]
- start|ROUTE_SET_CALLER_DIALOG:
- start|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_CNT_DLG_CHECK:
- return|ROUTE_SET_CALLER_DIALOG:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"total",
"relay",
"peerout:[% peer_00_host0.id %]",
"peer:[% peer_00_host0.id %]",
"outgoing"
]
- start|ROUTE_ACC_CALLER:
- return|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- return|ROUTE_ACC_CALLEE:
- start|ROUTE_ADD_AOC_HEADER:
- return|ROUTE_ADD_AOC_HEADER:
- start|BRANCH_ROUTE_SBC:
- start|ROUTE_SET_BRANCH_HDRS:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- return|ROUTE_SET_BRANCH_HDRS:
- start|ROUTE_SET_RUSER:
- return|ROUTE_SET_RUSER:
- start|ROUTE_BRANCH_ACC_RTP:
- return|ROUTE_BRANCH_ACC_RTP:
- start|ROUTE_FILTER_PRACK:
- return|ROUTE_FILTER_PRACK:
- start|ROUTE_PREPARE_SST:
- return|ROUTE_PREPARE_SST:
- start|ROUTE_PREPARE_MOH:
- return|ROUTE_PREPARE_MOH:
- start|ROUTE_SET_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_PREPARE_CALLER_CLI:
- return|ROUTE_SET_CALLER_CLI:
- start|ROUTE_SET_CALLEE:
- return|ROUTE_SET_CALLEE:
- start|ROUTE_ADD_CALLINFO:
- start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
- start|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
- return|ROUTE_ADD_CALLINFO:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- return|BRANCH_ROUTE_SBC:
# branch ??
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"total",
"relay",
"peerout:[% peer_00_host0.id %]",
"peer:[% peer_00_host0.id %]",
"outgoing"
]
sip_in:
- '^INVITE sip:004321001@'
- 'Contact: sip:testuser1002@'
- 'CSeq: 2 INVITE'
- 'Max-Forwards: 69'
- 'Content-Type: application/sdp'
- 'Proxy-Authorization: Digest username="testuser1002"'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:004321001@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:004321001@'
]
- [
'^INVITE sip:004321001@',
'CSeq: 2 INVITE',
'From: <sip:4311002@',
'To: <sip:004321001@',
'Content-Type: application/sdp',
'P-Caller-UUID: \w+',
'P-Callee-UUID: \w+',
'P-Asserted-Identity: <sip:4311002@',
'P-Called-Party-ID: <sip:004321001@',
'P-App-Param: ;calltimer=21600;aleg_sst_enable=no;sst_enable=no',
'P-App-Name: sbc',
'OutboundHeader: 4311002'
]

@ -0,0 +1,30 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^SIP/2.0 180 Ringing'
- 'CSeq: 2 INVITE'
- 'From: <sip:4311002@'
- 'To: <sip:004321001@'
sip_out:
- [
'^SIP/2.0 180 Ringing',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:004321001@',
]

@ -0,0 +1,49 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_RTPENGINE:
- return|REPLY_ROUTE_RTPENGINE:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- start|dialog:start:
- return|dialog:start:
$avp(lua_dlg_profile): [
"accountout:[% customer_test.id %]",
"userout:[% spce_test.testuser1002.uuid %]",
"account:[% customer_test.id %]",
"user:[% spce_test.testuser1002.uuid %]",
"totalaccountout:[% customer_test.id %]",
"totaluserout:[% spce_test.testuser1002.uuid %]",
"totalaccount:[% customer_test.id %]",
"totaluser:[% spce_test.testuser1002.uuid %]",
"total",
"relay",
"peerout:[% peer_00_host0.id %]",
"peer:[% peer_00_host0.id %]",
"outgoing"
]
- return|dialog:start:
sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: 2 INVITE'
- 'From: <sip:4311002@'
- 'To: <sip:004321001@'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:004321001@',
]

@ -0,0 +1,47 @@
# INVITE_OFFLINE scenario
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_RESTORE_CLUSTERSET:
- start|ROUTE_WITHINDLG_RTPENGINE:
- return|ROUTE_WITHINDLG_RTPENGINE:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^ACK sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'CSeq: 2 ACK'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:004321001@'
sip_out:
- [
'^ACK sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0',
'Contact: sip:testuser1002@',
'CSeq: 2 ACK',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:4311002@',
'To: <sip:004321001@'
]

@ -0,0 +1,58 @@
# INVITE_OFFLINE scenario
flow:
- start|DEFAULT_ROUTE:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_NET_INFO:
- return|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INITVARS:
- return|ROUTE_INITVARS:
- start|dialog:end:
- return|dialog:end:
$avp(lua_dlg_profile): None
- return|dialog:end:
- start|ROUTE_STOP_RTPPROXY:
- start|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_RESTORE_CLUSTERSET:
- return|ROUTE_STOP_RTPPROXY:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|ROUTE_OUTBOUND:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- exit|DEFAULT_SEND:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0'
- 'Contact: sip:testuser1002@'
- 'CSeq: 3 BYE'
- 'Max-Forwards: 69'
- 'Content-Length: 0'
- 'From: <sip:testuser1002@'
- 'To: <sip:004321001@'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:004321001@'
]
- [
'^BYE sip:127.0.0.1:5080(;prxroute=1)? SIP/2.0',
'Contact: sip:testuser1002@',
'CSeq: 3 BYE',
'Max-Forwards: 68',
'Content-Length: 0',
'From: <sip:4311002@',
'To: <sip:004321001@'
]

@ -0,0 +1,32 @@
flow:
- start|DEFAULT_ONREPLY:
- start|REPLY_ROUTE_NAT:
- start|ROUTE_ENTRY:
- return|ROUTE_ENTRY:
- start|ROUTE_COLLECT_HDR:
- return|ROUTE_COLLECT_HDR:
- start|ROUTE_APPLY_HEADER_RULES:
- return|ROUTE_APPLY_HEADER_RULES:
- start|ROUTE_PREPARE_UA:
- return|ROUTE_PREPARE_UA:
- start|REPLY_ROUTE_NAT_CONTINUE:
- start|ROUTE_APPLY_HDR:
- return|ROUTE_APPLY_HDR:
- start|ROUTE_EXIT:
- start|ROUTE_RUNTIME:
- return|ROUTE_RUNTIME:
- exit|ROUTE_EXIT:
sip_in:
- '^SIP/2.0 200 OK'
- 'CSeq: 3 BYE'
- 'Content-Length: 0'
- 'From: <sip:4311002@'
- 'To: <sip:004321001@'
sip_out:
- [
'^SIP/2.0 200 OK',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:004321001@'
]

@ -0,0 +1,10 @@
cdr:
- source_user: 'testuser1002'
source_domain: 'spce.test'
source_cli: '4311002'
destination_user: '004321001'
destination_domain: '127.0.2.1'
destination_user_dialed: '004321001'
call_type: 'call'
call_status: 'ok'
call_code: '200'

@ -0,0 +1,150 @@
hm_00:
header_rules:
- data:
direction: inbound
description: Empty Manipulation
name: hm_00_00
stopper: 0
enabled: 0
priority: 48
conditions: []
actions: []
- data:
direction: inbound
description: Add TestTest Header
name: hm_00_01
stopper: 0
enabled: 1
priority: 50
conditions:
- enabled: 1
match_name: From
match_part: username
match_type: header
expression: contains
expression_negation: 0
value_type: input
values:
- value: testuser1002
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: TestTest
header_part: full
value: new_internal_header
value_part: full
rwr_set_id:
- data:
direction: local
description: Edit TestTest Local Header
name: hm_00_02
stopper: 0
enabled: 1
priority: 51
conditions:
- enabled: 1
match_name: TestTest
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: new_internal_header
rwr_set_id:
actions:
- enabled: 1
action_type: set
header: TestTest
header_part: full
value: updated_local_header
value_part: full
rwr_set_id:
- data:
direction: peer
description: Edit TestTest Peer Header
name: hm_00_03
stopper: 0
enabled: 1
priority: 52
conditions:
- enabled: 1
match_name: TestTest
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '^new[\w]+$'
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: TestTest
header_part: full
value:
value_part: full
rwr_set_id:
hm_01:
header_rules:
- data:
direction: outbound
description: Add OutboundHeader as AVP
name: hm_01_00
stopper: 1
enabled: 1
priority: 60
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: is
expression_negation: 0
value_type: input
values:
- value: '<sip:004321001@spce.test>'
rwr_set_id:
actions:
- enabled: 1
action_type: add
header: OutboundHeader
header_part: full
value: '$avp(s:caller_cli_userprov)'
value_part: full
rwr_set_id:
- data:
direction: outbound
description: Should not be executed
name: hm_01_01
stopper: 0
enabled: 1
priority: 61
conditions:
- enabled: 1
match_name: To
match_part: full
match_type: header
expression: regexp
expression_negation: 0
value_type: input
values:
- value: '.*'
rwr_set_id:
actions:
- enabled: 1
action_type: remove
header: From
header_part: full
value:
value_part: full
rwr_set_id:
- enabled: 1
action_type: remove
header: To
header_part: full
value:
value_part: full
rwr_set_id:

@ -0,0 +1,27 @@
---
peer_00:
contact:
company: peer_00
email: peer_00@host0.not
contract:
billing_profile_id: 1
status: active
type: sippeering
groups:
- name: peer_00_group
priority: 1
description:
rules:
- group_id: peer_00_group
callee_prefix: ""
callee_pattern: ''
caller_pattern: '^sip:.+@spce.test'
description: ""
hosts:
- group_id: peer_00_group
name: peer_00_host0
ip: 127.0.2.1
port: 51602
host:
transport: 1
weight: 1

@ -0,0 +1,9 @@
{
"testuser1002@spce.test": {
"header_rule_set": "hm_00"
},
"peer_00_host0": {
"concurrent_max": 1,
"header_rule_set": "hm_01"
}
}

@ -0,0 +1,33 @@
test_uuid: invite_hm_peerout
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
sn: 1002
scenarios:
- ip: 127.126.0.1
username: testuser1002
domain: spce.test
responders:
- ip: 127.0.2.1
number: 004321001
username: 004321001
domain: spce.test
peer_host: peer_00_host0
register: no

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Sipwise NGCP Benchmark UAC Caller">
<send start_rtd="1" start_rtd="2">
<![CDATA[
INVITE sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 1 INVITE
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" rtd="1" optional="true">
</recv>
<recv response="407" rtd="2" auth="true"/>
<send>
<![CDATA[
ACK sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]:[remote_port] SIP/2.0
[last_Via:]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 1 ACK
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send start_rtd="3">
<![CDATA[
INVITE sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 2 INVITE
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
[field1 file="caller.csv" line=0]
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<recv response="183" optional="true">
</recv>
<recv response="200" rrs="true" rtd="3">
</recv>
<send>
<![CDATA[
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
[routes]
CSeq: 2 ACK
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<nop>
<action>
<exec play_pcap_audio="media181sec.pcap"/>
</action>
</nop>
<pause milliseconds="1000"/>
<send start_rtd="4">
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="caller.csv" line=0]@[field2 file="caller.csv" line=0]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv" line=0]@[field3 file="callee.csv" line=0]>[peer_tag_param]
Call-ID: NGCP%[field4 file="callee.csv" line=0]%///[call_id]
CSeq: 3 BYE
Contact: sip:[field0 file="caller.csv" line=0]@[local_ip]:[local_port]
[routes]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="200" crlf="true" rtd="4">
</recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200, 500, 1000"/>
<!-- <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> -->
</scenario>

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<scenario name="Sipwise NGCP Benchmark UAS Responder">
<recv request="INVITE" crlf="true" rtd="true">
</recv>
<send>
<![CDATA[
SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
[last_Record-Route:]
[last_Route:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:50
]]>
</send>
<recv request="ACK"
crlf="true">
</recv>
<recv request="BYE">
</recv>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: [len]
]]>
</send>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
Loading…
Cancel
Save