MT#6243 add test for emergency call with multipart body

mr3.6
Andrew Pogrebennyk 12 years ago
parent 34c3579eed
commit 79e9cd9fd8

@ -0,0 +1,34 @@
# REGISTER scenario
flow:
- start|MAIN:
- start|ROUTE_NET_INFO:
- end|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- end|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- end|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- exit|ROUTE_AUTH:
sip_in:
- '^INVITE sip:112@'
- 'Contact: sip:testuser1002@'
- 'To: <sip:112@'
- '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:112@'
]
- [
'^SIP/2.0 407 Proxy Authentication Required',
'CSeq: 1 INVITE',
'From: <sip:testuser1002@',
'To: <sip:112@'
]

@ -0,0 +1,155 @@
# INVITE_OFFLINE scenario
flow:
- start|MAIN:
- start|ROUTE_NET_INFO:
- end|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_INVITE:
- start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- end|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
- end|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- start|ROUTE_ADD_CALLINFO_REPLY:
- end|ROUTE_ADD_CALLINFO_REPLY:
- end|ROUTE_AUTH:
- end|ROUTE_FIND_CALLER:
- start|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_CLEAR_CALLER_PREF:
- end|ROUTE_CLEAR_CALLER_PREF:
- end|ROUTE_LOAD_CALLER_PREF:
- start|ROUTE_GET_CALLER_CLI:
- end|ROUTE_GET_CALLER_CLI:
- start|ROUTE_GET_FORWARDER_CLI:
- end|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_APPLY_CALLER_RWR:
- start|ROUTE_APPLY_REWRITE_RULE:
- return|ROUTE_APPLY_REWRITE_RULE:
- end|ROUTE_APPLY_CALLER_RWR:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- end|ROUTE_CHECK_CLI_ALLOWED:
- end|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_APPLY_REWRITE_RULE:
- return|ROUTE_APPLY_REWRITE_RULE:
- start|ROUTE_CLIR:
- end|ROUTE_CLIR:
- start|ROUTE_CLEAR_CALLEE_PREF:
- end|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_BLOCK_OUT:
- end|ROUTE_BLOCK_OUT:
- start|ROUTE_CHECK_PBX:
- return|ROUTE_CHECK_PBX:
- start|ROUTE_SET_CALLER_DIALOG:
- end|ROUTE_SET_CALLER_DIALOG:
- start|ROUTE_INVITE_TO_EXT:
- start|ROUTE_PSTN:
- start|ROUTE_CLEAR_PEER_OUT_PREF:
- end|ROUTE_CLEAR_PEER_OUT_PREF:
- start|ROUTE_LOAD_PEER_OUT_PREF:
- end|ROUTE_LOAD_PEER_OUT_PREF:
- start|ROUTE_OUTBOUND:
- start|ROUTE_ACC_CALLER:
- end|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- end|ROUTE_ACC_CALLEE:
- start|BRANCH_ROUTE_SBC:
- start|ROUTE_BRANCH_ACC_RTP:
- end|ROUTE_BRANCH_ACC_RTP:
- start|ROUTE_SET_RUSER:
- end|ROUTE_SET_RUSER:
- start|ROUTE_PREPARE_SST:
- end|ROUTE_PREPARE_SST:
- start|ROUTE_PREPARE_MOH:
- end|ROUTE_PREPARE_MOH:
- start|ROUTE_SET_CALLER_CLI:
- start|ROUTE_APPLY_CALLER_RWR_FIRST:
- start|ROUTE_APPLY_REWRITE_RULE:
- return|ROUTE_APPLY_REWRITE_RULE:
- start|ROUTE_APPLY_REWRITE_RULE:
- return|ROUTE_APPLY_REWRITE_RULE:
- end|ROUTE_APPLY_CALLER_RWR_FIRST:
- start|ROUTE_PREPARE_CALLER_CLI:
- end|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- end|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- end|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- end|ROUTE_PREPARE_CALLER_CLI:
- start|ROUTE_PREPARE_CALLER_CLI:
- end|ROUTE_PREPARE_CALLER_CLI:
- end|ROUTE_SET_CALLER_CLI:
- start|ROUTE_SET_CALLEE:
- start|ROUTE_APPLY_REWRITE_RULE:
- return|ROUTE_APPLY_REWRITE_RULE:
- end|ROUTE_SET_CALLEE:
- start|ROUTE_ADD_CALLINFO:
- end|ROUTE_ADD_CALLINFO:
- end|BRANCH_ROUTE_SBC:
- exit|ROUTE_OUTBOUND:
# 101 Connecting
- start|REPLY_ROUTE_NAT:
- exit|REPLY_ROUTE_NAT:
# 180 Ringing
- start|REPLY_ROUTE_NAT:
- exit|REPLY_ROUTE_NAT:
# 200 OK
- start|REPLY_ROUTE_NAT:
- exit|REPLY_ROUTE_NAT:
sip_in:
- '^INVITE sip:112@'
- '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:112@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:112@'
]
- [
'^INVITE sip:112@',
'CSeq: 2 INVITE',
'From: <sip:4311002@',
'To: <sip:112@',
'Content-Type: application/sdp',
'P-Caller-UUID: \w+',
'P-Callee-UUID: \w+',
'P-Asserted-Identity: <sip:4311002@',
'P-Called-Party-ID: <sip:112@',
'P-App-Param: ;aleg_sst_enable=no;sst_enable=no',
'P-App-Name: sbc'
]
- [
'^SIP/2.0 180 Ringing',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:112@'
]
- [
'^SIP/2.0 200 OK',
'CSeq: 2 INVITE',
'From: <sip:testuser1002@',
'To: <sip:112@'
]

@ -0,0 +1,26 @@
# INVITE_OFFLINE scenario
flow:
- start|MAIN:
- start|ROUTE_NET_INFO:
- end|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_OUTBOUND:
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:112@'
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:112@'
]

@ -0,0 +1,46 @@
# INVITE_OFFLINE scenario
flow:
- start|MAIN:
- start|ROUTE_NET_INFO:
- end|ROUTE_NET_INFO:
- start|ROUTE_PRX_REQUEST:
- start|ROUTE_STOP_RTPPROXY:
- end|ROUTE_STOP_RTPPROXY:
- start|ROUTE_OUTBOUND:
- exit|ROUTE_OUTBOUND:
# 200 OK
- start|REPLY_ROUTE_NAT:
- exit|REPLY_ROUTE_NAT:
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:112@'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:112@'
]
- [
'^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:112@'
]
- [
'^SIP/2.0 200 OK',
'CSeq: 3 BYE',
'Content-Length: 0',
'From: <sip:testuser1002@',
'To: <sip:112@'
]

@ -0,0 +1,30 @@
---
peer_00:
contract:
billing_profile: default
contact:
company: peer_00
email: peer_00@host0.not
groups:
- name: peer_00_group
priority: 1
description:
rules:
- group_id: peer_00_group
data:
callee_prefix: "emergency"
callee_pattern: ""
caller_pattern: "^sip:.+@spce.test"
description: ""
hosts:
- group_id: peer_00_group
data:
name: peer_00_host0
ip: 127.0.2.1
port: 50602
host:
transport: UDP
weight: 1
preferences:
concurrent_max: 1

@ -0,0 +1,6 @@
testuser1002@spce.test:
emergency_location_object: 7e 19 00 0d 64 30 90 11 f4 31 ff ff 43 68 65 6d 6e 69 74 7a 74 61 6c 73
"@spce.test":
rewrite_rule_set: rw_00
peer_00_host0:
rewrite_rule_set: rw_00

@ -0,0 +1,13 @@
rw_00:
- direction: in
field: callee
match_pattern: "^([1-9][0-9]{2})$"
replace_pattern: "emergency_\1"
priority: 1
description: Emergency in
- direction: out
field: callee
match_pattern: "^emergency_([1-9][0-9]+)$"
replace_pattern: "\1"
priority: 1
description: Emergency out

@ -0,0 +1,18 @@
subscribers:
spce.test:
testuser1002:
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: 112
username: 112
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: [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: [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: [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: [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="scenarios/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: [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