diff --git a/README.md b/README.md index 5b85ce1..2f4ee63 100644 --- a/README.md +++ b/README.md @@ -336,6 +336,25 @@ Runs the internal topology hiding scenario. Runs a simple parking scenario where a call is sent to a media server then picked up by the called entity later. +#### 27.top-hiding-reject +Run the same as [25.top-hiding](#25top-hiding) scenario, but send re-INVITEs +which are rejected. + +#### 28.top-hiding-overlapping +Run the same as [25.top-hiding](#25top-hiding) scenario, but send re-INVITEs +in such a manner that they overlap. + +#### 29.refer-unattended-uas-491-uas +Runs a b2b transfer scenario where there is a race between a re-INVITE +generated by the caller and the one generated by the referee. In this case, +the referee/uac sends its re-INVITE after the 491. + +#### 30.refer-unattended-uas-491-uac +Run the same as +[29.refer-unattended-uas-491-uas](#29refer-unattended-uas-491-uas) +scenario, but the referee no longer sends the re-INVITE, thus we retry +the bridging after 2.1-4s. + ### UAC Auth Verifies the behavior of uac_auth module. diff --git a/b2b/27.top-hiding-reject/opensips.cfg b/b2b/27.top-hiding-reject/opensips.cfg new file mode 100644 index 0000000..d9f1c58 --- /dev/null +++ b/b2b/27.top-hiding-reject/opensips.cfg @@ -0,0 +1,88 @@ +# +# OpenSIPS residential configuration script +# by OpenSIPS Solutions +# +# This script was generated via "make menuconfig", from +# the "Residential" scenario. +# You can enable / disable more features / functionalities by +# re-generating the scenario with different options.# +# +# Please refer to the Core CookBook at: +# https://opensips.org/Resources/DocsCookbooks +# for a explanation of possible statements, functions and parameters. +# + + +####### Global Parameters ######### +###################################################################### +/* uncomment the following lines to enable debugging */ +#debug_mode=yes + +log_level=4 +xlog_level=4 +log_stderror=yes + +udp_workers=4 + +####### Modules Section ######## + +#set module path +mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/" + +#### SIGNALING module +loadmodule "signaling.so" + +#### StateLess module +loadmodule "sl.so" + +#### Transaction Module +loadmodule "tm.so" +modparam("tm", "fr_timeout", 5) +modparam("tm", "fr_inv_timeout", 30) +modparam("tm", "restart_fr_on_each_reply", 0) +modparam("tm", "onreply_avp_mode", 1) + +#### SIP MSG OPerationS module +loadmodule "sipmsgops.so" + +#### MAX ForWarD module +loadmodule "maxfwd.so" + +#### Record Route Module +loadmodule "rr.so" +/* do not append from tag to the RR (no need for this script) */ +modparam("rr", "append_fromtag", 0) + +#### B2B modules +loadmodule "b2b_entities.so" +loadmodule "b2b_logic.so" + +loadmodule "proto_udp.so" + +####### Routing Logic ######## + +# main request routing logic + +route { + + if (!mf_process_maxfwd_header(10)) { + send_reply(483,"Too Many Hops"); + exit; + } + + if (has_totag()) { + send_reply(481, "Call/Transaction Does Not Exist"); + exit; + } + + # accept just INVITE requests + if (!is_method("INVITE")) { + send_reply(503, "Service Unavailable"); + exit; + } + + # initialize the internal topology hiding scenario + b2b_init_request("top hiding"); + + exit; +} diff --git a/b2b/27.top-hiding-reject/scenario.yml b/b2b/27.top-hiding-reject/scenario.yml new file mode 100644 index 0000000..d06e856 --- /dev/null +++ b/b2b/27.top-hiding-reject/scenario.yml @@ -0,0 +1,22 @@ +--- +timeout: 20 + +tasks: + - name: OpenSIPS + type: opensips + + - name: SIPP UAS + type: uas-sipp + config_file: scripts/uas.xml + duration: 3000 + require: OpenSIPS + + - name: SIPP UAC + type: uac-sipp + config_file: scripts/uac.xml + username: {{ username }} + remote: {{ uas_ip }}:{{ uas_port }} + require: + started: + task: SIPP UAS + wait: 0.5 diff --git a/b2b/27.top-hiding-reject/scripts/uac.xml b/b2b/27.top-hiding-reject/scripts/uac.xml new file mode 100644 index 0000000..29f666e --- /dev/null +++ b/b2b/27.top-hiding-reject/scripts/uac.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + ;tag=[call_number] + To: + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 1 ACK + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + ]]> + + + + + + + + + + + + diff --git a/b2b/27.top-hiding-reject/scripts/uas.xml b/b2b/27.top-hiding-reject/scripts/uas.xml new file mode 100644 index 0000000..f8b0e78 --- /dev/null +++ b/b2b/27.top-hiding-reject/scripts/uas.xml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + 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 + + ]]> + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/b2b/28.top-hiding-overlapping/opensips.cfg b/b2b/28.top-hiding-overlapping/opensips.cfg new file mode 100644 index 0000000..d9f1c58 --- /dev/null +++ b/b2b/28.top-hiding-overlapping/opensips.cfg @@ -0,0 +1,88 @@ +# +# OpenSIPS residential configuration script +# by OpenSIPS Solutions +# +# This script was generated via "make menuconfig", from +# the "Residential" scenario. +# You can enable / disable more features / functionalities by +# re-generating the scenario with different options.# +# +# Please refer to the Core CookBook at: +# https://opensips.org/Resources/DocsCookbooks +# for a explanation of possible statements, functions and parameters. +# + + +####### Global Parameters ######### +###################################################################### +/* uncomment the following lines to enable debugging */ +#debug_mode=yes + +log_level=4 +xlog_level=4 +log_stderror=yes + +udp_workers=4 + +####### Modules Section ######## + +#set module path +mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/" + +#### SIGNALING module +loadmodule "signaling.so" + +#### StateLess module +loadmodule "sl.so" + +#### Transaction Module +loadmodule "tm.so" +modparam("tm", "fr_timeout", 5) +modparam("tm", "fr_inv_timeout", 30) +modparam("tm", "restart_fr_on_each_reply", 0) +modparam("tm", "onreply_avp_mode", 1) + +#### SIP MSG OPerationS module +loadmodule "sipmsgops.so" + +#### MAX ForWarD module +loadmodule "maxfwd.so" + +#### Record Route Module +loadmodule "rr.so" +/* do not append from tag to the RR (no need for this script) */ +modparam("rr", "append_fromtag", 0) + +#### B2B modules +loadmodule "b2b_entities.so" +loadmodule "b2b_logic.so" + +loadmodule "proto_udp.so" + +####### Routing Logic ######## + +# main request routing logic + +route { + + if (!mf_process_maxfwd_header(10)) { + send_reply(483,"Too Many Hops"); + exit; + } + + if (has_totag()) { + send_reply(481, "Call/Transaction Does Not Exist"); + exit; + } + + # accept just INVITE requests + if (!is_method("INVITE")) { + send_reply(503, "Service Unavailable"); + exit; + } + + # initialize the internal topology hiding scenario + b2b_init_request("top hiding"); + + exit; +} diff --git a/b2b/28.top-hiding-overlapping/scenario.yml b/b2b/28.top-hiding-overlapping/scenario.yml new file mode 100644 index 0000000..cf322bc --- /dev/null +++ b/b2b/28.top-hiding-overlapping/scenario.yml @@ -0,0 +1,22 @@ +--- +timeout: 30 + +tasks: + - name: OpenSIPS + type: opensips + + - name: SIPP UAS + type: uas-sipp + config_file: scripts/uas.xml + duration: 2000 + require: OpenSIPS + + - name: SIPP UAC + type: uac-sipp + config_file: scripts/uac.xml + username: {{ username }} + remote: {{ uas_ip }}:{{ uas_port }} + require: + started: + task: SIPP UAS + wait: 0.5 diff --git a/b2b/28.top-hiding-overlapping/scripts/uac.xml b/b2b/28.top-hiding-overlapping/scripts/uac.xml new file mode 100644 index 0000000..c9a47c5 --- /dev/null +++ b/b2b/28.top-hiding-overlapping/scripts/uac.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + ;tag=[call_number] + To: + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 1 ACK + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 2 INVITE + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 2 ACK + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + ]]> + + + + + + + + + + + + diff --git a/b2b/28.top-hiding-overlapping/scripts/uas.xml b/b2b/28.top-hiding-overlapping/scripts/uas.xml new file mode 100644 index 0000000..0296d13 --- /dev/null +++ b/b2b/28.top-hiding-overlapping/scripts/uas.xml @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/b2b/29.refer-unattended-uas-491-uas/defines.yml b/b2b/29.refer-unattended-uas-491-uas/defines.yml new file mode 100644 index 0000000..64e1a68 --- /dev/null +++ b/b2b/29.refer-unattended-uas-491-uas/defines.yml @@ -0,0 +1,3 @@ +--- +transfer_ip: 192.168.52.5 +transfer_port: 5065 diff --git a/b2b/29.refer-unattended-uas-491-uas/opensips.cfg b/b2b/29.refer-unattended-uas-491-uas/opensips.cfg new file mode 100644 index 0000000..3659406 --- /dev/null +++ b/b2b/29.refer-unattended-uas-491-uas/opensips.cfg @@ -0,0 +1,114 @@ +# +# OpenSIPS residential configuration script +# by OpenSIPS Solutions +# +# This script was generated via "make menuconfig", from +# the "Residential" scenario. +# You can enable / disable more features / functionalities by +# re-generating the scenario with different options.# +# +# Please refer to the Core CookBook at: +# https://opensips.org/Resources/DocsCookbooks +# for a explanation of possible statements, functions and parameters. +# + + +####### Global Parameters ######### +###################################################################### +/* uncomment the following lines to enable debugging */ +#debug_mode=yes + +log_level=4 +xlog_level=4 +log_stderror=yes + +udp_workers=4 + +####### Modules Section ######## + +#set module path +mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/" + +#### SIGNALING module +loadmodule "signaling.so" + +#### StateLess module +loadmodule "sl.so" + +#### Transaction Module +loadmodule "tm.so" +modparam("tm", "fr_timeout", 5) +modparam("tm", "fr_inv_timeout", 30) +modparam("tm", "restart_fr_on_each_reply", 0) +modparam("tm", "onreply_avp_mode", 1) + +#### SIP MSG OPerationS module +loadmodule "sipmsgops.so" + +#### MAX ForWarD module +loadmodule "maxfwd.so" + +#### Record Route Module +loadmodule "rr.so" +/* do not append from tag to the RR (no need for this script) */ +modparam("rr", "append_fromtag", 0) + +#### B2B modules +loadmodule "b2b_entities.so" +loadmodule "b2b_logic.so" +modparam("b2b_logic", "script_req_route", "b2b_logic_request") + +loadmodule "proto_udp.so" + +####### Routing Logic ######## + +# main request routing logic + +route { + + if (!mf_process_maxfwd_header(10)) { + send_reply(483,"Too Many Hops"); + exit; + } + + if (has_totag()) { + send_reply(481, "Call/Transaction Does Not Exist"); + exit; + } + + # accept just INVITE requests + if (!is_method("INVITE")) { + send_reply(503, "Service Unavailable"); + exit; + } + + # create the server entity + b2b_server_new("caller"); + # create the initial client entity, to connect the caller with the callee + b2b_client_new("callee", $ru); + + # initialize B2B session for the "refer" scenario + b2b_init_request("refer"); + + exit; +} + +route[b2b_logic_request] { + if ($rm != "REFER") { + # for requests other than REFER, no special actions needs to be done, + # just pass the request to the peer + b2b_pass_request(); + exit; + } + + # end dialog with the referrer + b2b_send_reply(202, "Accepted"); + b2b_end_dlg_leg(); + + # create the client entity corresponding to + # the user specified in the 'Refer-To' header + b2b_client_new("referee", $hdr(Refer-To)); + + # bridge the referrer's peer with the referee + b2b_bridge("peer", "referee", , "notify,rollback-failed,no-late-sdp"); +} diff --git a/b2b/29.refer-unattended-uas-491-uas/scenario.yml b/b2b/29.refer-unattended-uas-491-uas/scenario.yml new file mode 100644 index 0000000..bb16ee4 --- /dev/null +++ b/b2b/29.refer-unattended-uas-491-uas/scenario.yml @@ -0,0 +1,38 @@ +--- +timeout: 20 + +tasks: + - name: OpenSIPS + type: opensips + + - name: SIPP UAS + type: uas-sipp + config_file: scripts/uas.xml + duration: 5000 # after reINVITE/transfer + require: OpenSIPS + keys: + transfer: sip:transfer@{{ transfer_ip }}:{{ transfer_port }} + + - name: SIPP UAC + type: uac-sipp + config_file: scripts/uac.xml + duration: 2000 # before transfer + username: {{ username }} + remote: {{ uas_ip }}:{{ uas_port }} + require: + started: + task: SIPP UAS + wait: 0.5 + + - name: SIPP Transfer + type: uas-sipp + config_file: scripts/transfer.xml + ip: {{ transfer_ip }} + port: {{ transfer_port }} + require: + - started: + task: SIPP UAC + wait: 0.5 + - after: + task: OpenSIPS + wait: 0.5 diff --git a/b2b/29.refer-unattended-uas-491-uas/scripts/transfer.xml b/b2b/29.refer-unattended-uas-491-uas/scripts/transfer.xml new file mode 100644 index 0000000..ce023b9 --- /dev/null +++ b/b2b/29.refer-unattended-uas-491-uas/scripts/transfer.xml @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + 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 + + ]]> + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + Content-Length: 0 + ]]> + + + + + + + + + + + + + + + + + + + + + diff --git a/b2b/29.refer-unattended-uas-491-uas/scripts/uac.xml b/b2b/29.refer-unattended-uas-491-uas/scripts/uac.xml new file mode 100644 index 0000000..98db6df --- /dev/null +++ b/b2b/29.refer-unattended-uas-491-uas/scripts/uac.xml @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + ;tag=[call_number] + To: + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 1 ACK + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 2 BYE + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/b2b/29.refer-unattended-uas-491-uas/scripts/uas.xml b/b2b/29.refer-unattended-uas-491-uas/scripts/uas.xml new file mode 100644 index 0000000..9acccfa --- /dev/null +++ b/b2b/29.refer-unattended-uas-491-uas/scripts/uas.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Refer-To: [transfer] + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + ]]> + + + + + + + + + + + + + + + diff --git a/b2b/30.refer-unattended-uas-491-uac/defines.yml b/b2b/30.refer-unattended-uas-491-uac/defines.yml new file mode 100644 index 0000000..64e1a68 --- /dev/null +++ b/b2b/30.refer-unattended-uas-491-uac/defines.yml @@ -0,0 +1,3 @@ +--- +transfer_ip: 192.168.52.5 +transfer_port: 5065 diff --git a/b2b/30.refer-unattended-uas-491-uac/opensips.cfg b/b2b/30.refer-unattended-uas-491-uac/opensips.cfg new file mode 100644 index 0000000..3659406 --- /dev/null +++ b/b2b/30.refer-unattended-uas-491-uac/opensips.cfg @@ -0,0 +1,114 @@ +# +# OpenSIPS residential configuration script +# by OpenSIPS Solutions +# +# This script was generated via "make menuconfig", from +# the "Residential" scenario. +# You can enable / disable more features / functionalities by +# re-generating the scenario with different options.# +# +# Please refer to the Core CookBook at: +# https://opensips.org/Resources/DocsCookbooks +# for a explanation of possible statements, functions and parameters. +# + + +####### Global Parameters ######### +###################################################################### +/* uncomment the following lines to enable debugging */ +#debug_mode=yes + +log_level=4 +xlog_level=4 +log_stderror=yes + +udp_workers=4 + +####### Modules Section ######## + +#set module path +mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/" + +#### SIGNALING module +loadmodule "signaling.so" + +#### StateLess module +loadmodule "sl.so" + +#### Transaction Module +loadmodule "tm.so" +modparam("tm", "fr_timeout", 5) +modparam("tm", "fr_inv_timeout", 30) +modparam("tm", "restart_fr_on_each_reply", 0) +modparam("tm", "onreply_avp_mode", 1) + +#### SIP MSG OPerationS module +loadmodule "sipmsgops.so" + +#### MAX ForWarD module +loadmodule "maxfwd.so" + +#### Record Route Module +loadmodule "rr.so" +/* do not append from tag to the RR (no need for this script) */ +modparam("rr", "append_fromtag", 0) + +#### B2B modules +loadmodule "b2b_entities.so" +loadmodule "b2b_logic.so" +modparam("b2b_logic", "script_req_route", "b2b_logic_request") + +loadmodule "proto_udp.so" + +####### Routing Logic ######## + +# main request routing logic + +route { + + if (!mf_process_maxfwd_header(10)) { + send_reply(483,"Too Many Hops"); + exit; + } + + if (has_totag()) { + send_reply(481, "Call/Transaction Does Not Exist"); + exit; + } + + # accept just INVITE requests + if (!is_method("INVITE")) { + send_reply(503, "Service Unavailable"); + exit; + } + + # create the server entity + b2b_server_new("caller"); + # create the initial client entity, to connect the caller with the callee + b2b_client_new("callee", $ru); + + # initialize B2B session for the "refer" scenario + b2b_init_request("refer"); + + exit; +} + +route[b2b_logic_request] { + if ($rm != "REFER") { + # for requests other than REFER, no special actions needs to be done, + # just pass the request to the peer + b2b_pass_request(); + exit; + } + + # end dialog with the referrer + b2b_send_reply(202, "Accepted"); + b2b_end_dlg_leg(); + + # create the client entity corresponding to + # the user specified in the 'Refer-To' header + b2b_client_new("referee", $hdr(Refer-To)); + + # bridge the referrer's peer with the referee + b2b_bridge("peer", "referee", , "notify,rollback-failed,no-late-sdp"); +} diff --git a/b2b/30.refer-unattended-uas-491-uac/scenario.yml b/b2b/30.refer-unattended-uas-491-uac/scenario.yml new file mode 100644 index 0000000..bb16ee4 --- /dev/null +++ b/b2b/30.refer-unattended-uas-491-uac/scenario.yml @@ -0,0 +1,38 @@ +--- +timeout: 20 + +tasks: + - name: OpenSIPS + type: opensips + + - name: SIPP UAS + type: uas-sipp + config_file: scripts/uas.xml + duration: 5000 # after reINVITE/transfer + require: OpenSIPS + keys: + transfer: sip:transfer@{{ transfer_ip }}:{{ transfer_port }} + + - name: SIPP UAC + type: uac-sipp + config_file: scripts/uac.xml + duration: 2000 # before transfer + username: {{ username }} + remote: {{ uas_ip }}:{{ uas_port }} + require: + started: + task: SIPP UAS + wait: 0.5 + + - name: SIPP Transfer + type: uas-sipp + config_file: scripts/transfer.xml + ip: {{ transfer_ip }} + port: {{ transfer_port }} + require: + - started: + task: SIPP UAC + wait: 0.5 + - after: + task: OpenSIPS + wait: 0.5 diff --git a/b2b/30.refer-unattended-uas-491-uac/scripts/transfer.xml b/b2b/30.refer-unattended-uas-491-uac/scripts/transfer.xml new file mode 100644 index 0000000..330bec7 --- /dev/null +++ b/b2b/30.refer-unattended-uas-491-uac/scripts/transfer.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + ]]> + + + + + + + + + + + + + + + + + + + + + diff --git a/b2b/30.refer-unattended-uas-491-uac/scripts/uac.xml b/b2b/30.refer-unattended-uas-491-uac/scripts/uac.xml new file mode 100644 index 0000000..e14ae55 --- /dev/null +++ b/b2b/30.refer-unattended-uas-491-uac/scripts/uac.xml @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + ;tag=[call_number] + To: + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 1 ACK + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: [peer_tag_param] + [routes] + CSeq: 2 BYE + Contact: + Call-ID: [call_id] + Max-Forwards: 70 + Subject: Performance Test + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/b2b/30.refer-unattended-uas-491-uac/scripts/uas.xml b/b2b/30.refer-unattended-uas-491-uac/scripts/uas.xml new file mode 100644 index 0000000..9acccfa --- /dev/null +++ b/b2b/30.refer-unattended-uas-491-uac/scripts/uas.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + + ]]> + + + + + + + Content-Length: 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 0 + a=rtpmap:0 PCMU/8000 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + Call-ID: [call_id] + Max-Forwards: 70 + Refer-To: [transfer] + User-Agent: sipp + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content-Length: 0 + ]]> + + + + + + + + + + + + + + +