scenarios/invite: First draft to get a real call with media. WIP

vseva/3.0
Victor Seva 13 years ago
parent 9926af1eb8
commit e789ec1c60

@ -61,9 +61,6 @@ function error_sipp
echo $1
delete_voip ${DOMAIN}
find ${SCEN_CHECK_DIR}/ -type f -name 'sipp_scenario*errors.log' -exec mv {} ${LOG_DIR} \;
if [ -f ${SCEN_CHECK_DIR}/sipp_scenario_responder.xml ]; then
find ${SCEN_DIR}/register/ -type f -name 'sipp_scenario*errors.log' -exec mv {} ${LOG_DIR} \;
fi
exit $2
}
@ -80,14 +77,15 @@ function run_sipp
${BASE_DIR}/restart_log.sh
if [ -f ${SCEN_CHECK_DIR}/sipp_scenario_responder.xml ]; then
${BASE_DIR}/sipp.sh -d ${DOMAIN} -r ${SCEN_CHECK_DIR}/sipp_scenario_responder.xml &
${BASE_DIR}/sipp.sh -d ${DOMAIN} -r ${SCEN_CHECK_DIR}/sipp_scenario_responder_reg.xml
${BASE_DIR}/sipp.sh -d ${DOMAIN} -r ${SCEN_CHECK_DIR}/sipp_scenario_responder.xml
fi
# let's fire sipp scenario
${BASE_DIR}/sipp.sh -d ${DOMAIN} $1
status=$?
# copy the kamailio log
cp ${KAM_LOG} ${LOG_FILE} ${LOG_DIR}/kamailio.log
find ${SCEN_CHECK_DIR}/ -type f -name 'sipp_scenario*errors.log' -exec mv {} ${LOG_DIR} \;
if [[ $status -ne 0 ]]; then
error_sipp "error in sipp" 2
fi

@ -0,0 +1,27 @@
# 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:
- end|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
- start|ROUTE_FIND_CALLER:
- start|ROUTE_AUTH:
- exit|ROUTE_AUTH:
sip_in:
- '^INVITE'
- 'Contact: sip:testuser2@'
- 'CSeq: 1 INVITE'
- 'Max-Forwards: 16'
- 'Content-Type: application/sdp'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 1 INVITE'
]
- [
'^SIP/2.0 407 Proxy Authentication Required',
'CSeq: 1 INVITE'
]

@ -0,0 +1,80 @@
# 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:
- 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:
- return|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- end|ROUTE_CHECK_CLI_ALLOWED:
- end|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CLIR:
- end|ROUTE_CLIR:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_CLEAR_CALLEE_PREF:
- end|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_BLOCK_OUT:
- end|ROUTE_BLOCK_OUT:
- start|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_BLOCK_IN:
- end|ROUTE_BLOCK_IN:
- end|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_INVITE_TO_INT:
- start|ROUTE_ACC_FAILURE:
- start|ROUTE_ACC_CALLER:
- end|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- end|ROUTE_ACC_CALLEE:
- end|ROUTE_ACC_FAILURE:
- start|ROUTE_EARLY_REJECT:
- start|ROUTE_ADD_CALLINFO_REPLY:
- end|ROUTE_ADD_CALLINFO_REPLY:
- exit|ROUTE_EARLY_REJECT:
sip_in:
- '^INVITE'
- 'Contact: sip:testuser2@'
- 'CSeq: 2 INVITE'
- 'Max-Forwards: 16'
- 'Content-Type: application/sdp'
- 'Proxy-Authorization: Digest username="testuser2"'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 2 INVITE',
'From: <sip:testuser2@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser2@',
'P-NGCP-Authorization: testuser2',
'P-NGCP-Authorized: 1'
]
- [
'^SIP/2.0 480 Offline',
'CSeq: 2 INVITE',
'From: <sip:testuser2@',
'P-NGCP-Authorization: testuser2',
'P-NGCP-Authorized: 1'
]

@ -0,0 +1,76 @@
# 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:
- 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:
- return|ROUTE_GET_FORWARDER_CLI:
- start|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CHECK_CLI_ALLOWED:
- end|ROUTE_CHECK_CLI_ALLOWED:
- end|ROUTE_CHECK_USERPROV_CLI:
- start|ROUTE_CLIR:
- end|ROUTE_CLIR:
- start|ROUTE_FIND_CALLEE:
- start|ROUTE_CLEAR_CALLEE_PREF:
- end|ROUTE_CLEAR_CALLEE_PREF:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_NCOS:
- end|ROUTE_NCOS:
- start|ROUTE_BLOCK_OUT:
- end|ROUTE_BLOCK_OUT:
- start|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_BLOCK_IN:
- end|ROUTE_BLOCK_IN:
- end|ROUTE_LOAD_CALLEE_PREF:
- start|ROUTE_INVITE_TO_INT:
- start|ROUTE_ACC_FAILURE:
- start|ROUTE_ACC_CALLER:
- end|ROUTE_ACC_CALLER:
- start|ROUTE_ACC_CALLEE:
- end|ROUTE_ACC_CALLEE:
- end|ROUTE_ACC_FAILURE:
- start|ROUTE_EARLY_REJECT:
- start|ROUTE_ADD_CALLINFO_REPLY:
- end|ROUTE_ADD_CALLINFO_REPLY:
- exit|ROUTE_EARLY_REJECT:
sip_in:
- '^INVITE'
- 'Contact: sip:testuser2@'
- 'CSeq: 2 INVITE'
- 'Max-Forwards: 16'
- 'Content-Type: application/sdp'
- 'Proxy-Authorization: Digest username="testuser2"'
sip_out:
- [
'^SIP/2.0 100 Trying',
'CSeq: 2 INVITE',
'From: <sip:testuser2@'
]
- [
'^SIP/2.0 101 Connecting',
'CSeq: 2 INVITE',
'From: <sip:testuser2@'
]
- [
'^SIP/2.0 480 Offline',
'CSeq: 2 INVITE',
'From: <sip:testuser2@'
]

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Sipwise NGCP Benchmark UAC Caller">
<send retrans="500" start_rtd="1" start_rtd="2">
<![CDATA[
INVITE sip:[field0 file="callee.csv"]@[field3 file="callee.csv"] 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"]@[field3 file="callee.csv"]>
Call-ID: [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"]@[field3 file="callee.csv"]:[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"]@[field3 file="callee.csv"]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 1 ACK
Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<send retrans="500" start_rtd="3">
<![CDATA[
INVITE sip:[field0 file="callee.csv"]@[field3 file="callee.csv"] 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"]@[field3 file="callee.csv"]>
Call-ID: [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"]@[field3 file="callee.csv"]>[peer_tag_param]
Call-ID: [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="scenarios/media181sec.pcap"/>
</action>
</nop>
<pause milliseconds="1000"/>
<send retrans="500" 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"]@[field3 file="callee.csv"]>[peer_tag_param]
Call-ID: [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,103 @@
<?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 retrans="500">
<![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: 0
]]>
</send>
<send>
<![CDATA[
REGISTER sip:[field0 file="callee.csv"]@[field3 file="callee.csv"] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="callee.csv"]@[field3 file="callee.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv"]@[field3 file="callee.csv"]>
Call-ID: [call_id]
CSeq: 2 REGISTER
[field2 file="callee.csv"]
Contact: sip:[field0 file="callee.csv"]@[local_ip]:[local_port]
Expires: 0
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="200">
</recv>
<timewait milliseconds="4000"/>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="Sipwise NGCP Benchmark UAS Registration">
<send>
<![CDATA[
REGISTER sip:[field0 file="callee.csv"]@[field3 file="callee.csv"] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="callee.csv"]@[field3 file="callee.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv"]@[field3 file="callee.csv"]>
Call-ID: [call_id]
CSeq: 1 REGISTER
Contact: sip:[field0 file="callee.csv"]@[local_ip]:[local_port]
Expires: 600
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="100"
optional="true">
</recv>
<recv response="401" auth="true"/>
<send>
<![CDATA[
REGISTER sip:[field0 file="callee.csv"]@[field3 file="callee.csv"] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0 file="callee.csv"]@[field3 file="callee.csv"]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[field0 file="callee.csv"]@[field3 file="callee.csv"]>
Call-ID: [call_id]
CSeq: 2 REGISTER
[field2 file="callee.csv"]
Contact: sip:[field0 file="callee.csv"]@[local_ip]:[local_port]
Expires: 600
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="200">
</recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
</scenario>

Binary file not shown.

@ -42,11 +42,11 @@ set_domain 1
if [ -z ${RESP} ]; then
PORT="50603"
sipp -inf ${BASE_DIR}/../callee.csv -inf ${BASE_DIR}/../caller.csv -sf $1 -i $IP \
-nd -t ul -p $PORT $IP -m 1 -timeout 15 -timeout_error -trace_err
-nd -t ul -p $PORT $IP -m 1 -mp 6003 -timeout 10 -timeout_error -trace_err
else
PORT="50602"
sipp -inf ${BASE_DIR}/../callee.csv -sf $1 -i $IP \
-nd -t ul -p $PORT $IP -m 1 -timeout 14 -timeout_error -trace_err
sipp -bg -inf ${BASE_DIR}/../callee.csv -sf $1 -i $IP \
-nd -t ul -p $PORT $IP -m 1 -rtp_echo -mp 6002 -timeout 25 -timeout_error -trace_err
fi
set_domain 0

Loading…
Cancel
Save