diff --git a/scenarios/invite_perm_reg/0001_test.yml.tt2 b/scenarios/invite_perm_reg/0001_test.yml.tt2 new file mode 100644 index 00000000..2ed92a4e --- /dev/null +++ b/scenarios/invite_perm_reg/0001_test.yml.tt2 @@ -0,0 +1,42 @@ +flow: + - start|DEFAULT_ROUTE: + - start|ROUTE_ENTRY: + - return|ROUTE_ENTRY: + - start|ROUTE_NET_INFO: + - return|ROUTE_NET_INFO: + - start|ROUTE_CHECK_TEL_URI: + - return|ROUTE_CHECK_TEL_URI: + - 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: + q: 0.5 + expires: 1977-07-26 23:47:37 diff --git a/scenarios/invite_perm_reg/scenario.yml b/scenarios/invite_perm_reg/scenario.yml new file mode 100644 index 00000000..5b1358c9 --- /dev/null +++ b/scenarios/invite_perm_reg/scenario.yml @@ -0,0 +1,41 @@ +test_uuid: invite_perm_reg +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.3.0.5 + username: testuser1003 + domain: spce.test + register: permanent diff --git a/scenarios/invite_perm_reg/sipp_scenario00.xml b/scenarios/invite_perm_reg/sipp_scenario00.xml new file mode 100644 index 00000000..13b3c912 --- /dev/null +++ b/scenarios/invite_perm_reg/sipp_scenario00.xml @@ -0,0 +1,146 @@ + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + 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 + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [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 + + ]]> + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + 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 + + ]]> + + + + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [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 + + ]]> + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [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 + + ]]> + + + + + + + + + + + + + + diff --git a/scenarios/invite_perm_reg/sipp_scenario_responder00.xml b/scenarios/invite_perm_reg/sipp_scenario_responder00.xml new file mode 100644 index 00000000..da77f415 --- /dev/null +++ b/scenarios/invite_perm_reg/sipp_scenario_responder00.xml @@ -0,0 +1,78 @@ + + + + + + + + + + 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 8 + a=rtpmap:8 PCMA/8000 + a=ptime:50 + + ]]> + + + + + + + + + + + Content-Length: [len] + + ]]> + + + + + + + diff --git a/scenarios_pbx/invite_perm_reg/0001_test.yml.tt2 b/scenarios_pbx/invite_perm_reg/0001_test.yml.tt2 new file mode 100644 index 00000000..64b12920 --- /dev/null +++ b/scenarios_pbx/invite_perm_reg/0001_test.yml.tt2 @@ -0,0 +1,42 @@ +flow: + - start|DEFAULT_ROUTE: + - start|ROUTE_ENTRY: + - return|ROUTE_ENTRY: + - start|ROUTE_NET_INFO: + - return|ROUTE_NET_INFO: + - start|ROUTE_CHECK_TEL_URI: + - return|ROUTE_CHECK_TEL_URI: + - 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: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^INVITE sip:testuser1003@', + 'CSeq: 2 INVITE', + 'From: ;ip=127.0.0.1;port=508[5|8];' + - 'P-To-Device: 1' + - 'Content-Type: application/sdp' + - 'Contact: ' +sip_out: + - [ + 'SIP/2.0 100 Trying', + 'Via: SIP/2.0/UDP 127.0.0.1:508[5|8];branch=', + 'From: ', + 'P-Caller-UUID: [% spce_test.testuser1002.uuid %]', + 'P-Callee-UUID: [% spce_test.testuser1003.uuid %]', + 'P-Asserted-Identity: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^SIP/2.0 180 Ringing', + 'CSeq: \d+ INVITE', + ] diff --git a/scenarios_pbx/invite_perm_reg/0008_test.yml.tt2 b/scenarios_pbx/invite_perm_reg/0008_test.yml.tt2 new file mode 100644 index 00000000..c965e6eb --- /dev/null +++ b/scenarios_pbx/invite_perm_reg/0008_test.yml.tt2 @@ -0,0 +1,40 @@ +flow: + - start|DEFAULT_ONREPLY: + - start|REPLY_ROUTE_NAT: + $avp(lua_dlg_profile): [ + "totalaccountout:[% customerpbx_test.id %]", + "totaluserout:[% spce_test.testuser1002.uuid %]", + "totalaccount:[% customerpbx_test.id %]", + "totaluser:[% spce_test.testuser1002.uuid %]", + "totalaccount:[% customerpbx_test.id %]", + "totaluser:[% spce_test.testuser1003.uuid %]", + "total" + ] + - start|ROUTE_ENTRY: + - return|ROUTE_ENTRY: + - start|ROUTE_APPLY_HEADER_RULES: + - return|ROUTE_APPLY_HEADER_RULES: + - start|REPLY_SCA_UPDATE: + - return|REPLY_SCA_UPDATE: + - start|ROUTE_PREPARE_UA: + - return|ROUTE_PREPARE_UA: + - start|REPLY_ROUTE_NAT_CONTINUE: + - start|ROUTE_EXIT: + - start|ROUTE_RUNTIME: + - return|ROUTE_RUNTIME: + - exit|ROUTE_EXIT: +sip_in: + - '^SIP/2.0 180 Ringing' + - 'CSeq: 2 INVITE' +sip_out: + - [ + '^PUBLISH sip:testuser1002@spce.test SIP/2.0', + 'From: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^SIP/2.0 180 Ringing', + 'CSeq: 2 INVITE', + ] diff --git a/scenarios_pbx/invite_perm_reg/0009_test.yml.tt2 b/scenarios_pbx/invite_perm_reg/0009_test.yml.tt2 new file mode 100644 index 00000000..72e7d9bf --- /dev/null +++ b/scenarios_pbx/invite_perm_reg/0009_test.yml.tt2 @@ -0,0 +1,39 @@ +flow: + - start|DEFAULT_ONREPLY: + - start|REPLY_ROUTE_NAT: + - start|ROUTE_ENTRY: + - return|ROUTE_ENTRY: + - 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_EXIT: + - start|ROUTE_RUNTIME: + - return|ROUTE_RUNTIME: + - start|dialog:start: + - return|dialog:start: + $avp(lua_dlg_profile): [ + "local", + "total" + ] + - return|dialog:start: +sip_in: + - '^SIP/2.0 200 OK' + - 'CSeq: \d+ INVITE' +sip_out: + - [ + '^PUBLISH sip:testuser1003@spce.test SIP/2.0', + 'From: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^SIP/2.0 200 OK', + 'CSeq: \d+ INVITE', + 'From: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^SIP/2.0 200 OK', + 'CSeq: 2 INVITE', + 'From: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^BYE sip:127.0.0.1:508[5|8](;prxroute=1)? SIP/2.0', + 'Contact: sip:testuser1002@', + 'CSeq: 3 BYE', + 'Max-Forwards: 68', + 'Content-Length: 0', + 'From: ', + 'To: ', + 'Event: dialog', + 'Content-Type: application/dialog-info\+xml', + ] + - [ + '^BYE sip:127.0.0.1:508[0|8];transport=udp SIP/2.0', + 'CSeq: \d+ BYE', + 'Max-Forwards: 69', + 'Content-Length: 0', + 'From: + q: 0.5 + expires: 1977-07-26 23:47:37 diff --git a/scenarios_pbx/invite_perm_reg/scenario.yml b/scenarios_pbx/invite_perm_reg/scenario.yml new file mode 100644 index 00000000..b04f3cd7 --- /dev/null +++ b/scenarios_pbx/invite_perm_reg/scenario.yml @@ -0,0 +1,41 @@ +test_uuid: invite_perm_reg +domains: + 'spce.test': + reseller_id: 1 +customers: + 'customerpbx.test': + contacts: + - email: "customerpbx.test@spce.test" + reseller_id: 1 + details: + status: 'active' + type: 'pbxaccount' + billing_profile_id: 1 + reseller_id: 1 +subscribers: + spce.test: + testuser1002: + customer: 'customerpbx.test' + password: testuser + cc: 43 + ac: 1 + sn: 1002 + is_pbx_pilot: 1 + pbx_extension: 1002 + testuser1003: + customer: 'customerpbx.test' + password: testuser + cc: 43 + ac: 1 + sn: 1003 + is_pbx_pilot: 0 + pbx_extension: 1003 +scenarios: + - ip: 127.126.0.1 + username: testuser1002 + domain: spce.test + responders: + - ip: 127.3.0.5 + username: testuser1003 + domain: spce.test + register: permanent diff --git a/scenarios_pbx/invite_perm_reg/sipp_scenario00.xml b/scenarios_pbx/invite_perm_reg/sipp_scenario00.xml new file mode 100644 index 00000000..a8c36024 --- /dev/null +++ b/scenarios_pbx/invite_perm_reg/sipp_scenario00.xml @@ -0,0 +1,146 @@ + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + 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 + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [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 + + ]]> + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + 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 + + ]]> + + + + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [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 + + ]]> + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [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 + + ]]> + + + + + + + + + + + + + + diff --git a/scenarios_pbx/invite_perm_reg/sipp_scenario_responder00.xml b/scenarios_pbx/invite_perm_reg/sipp_scenario_responder00.xml new file mode 100644 index 00000000..da77f415 --- /dev/null +++ b/scenarios_pbx/invite_perm_reg/sipp_scenario_responder00.xml @@ -0,0 +1,78 @@ + + + + + + + + + + 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 8 + a=rtpmap:8 PCMA/8000 + a=ptime:50 + + ]]> + + + + + + + + + + + Content-Length: [len] + + ]]> + + + + + + +