Compare commits

...

2 Commits

Author SHA1 Message Date
sauwming 2ca8f83dc2 Revert to the last known success 2023-10-12 10:14:10 +08:00
sauwming e8aa27c5e2 Temporarily delete this test 2023-10-11 16:40:59 +08:00
2 changed files with 4 additions and 218 deletions

View File

@ -366,18 +366,12 @@ PJ_DEF(pj_status_t) pjsip_mwi_notify( pjsip_evsub *sub,
pj_status_t status;
/* Check arguments. */
PJ_ASSERT_RETURN(sub && p_tdata, PJ_EINVAL);
PJ_ASSERT_RETURN(sub && mime_type && body && p_tdata, PJ_EINVAL);
/* Get the mwi object. */
mwi = (pjsip_mwi*) pjsip_evsub_get_mod_data(sub, mod_mwi.id);
PJ_ASSERT_RETURN(mwi != NULL, PJ_EINVALIDOP);
/* Make sure both mime_type & body are-being/have-been set. */
PJ_ASSERT_RETURN((mime_type && body) ||
(!body &&
mwi->mime_type.type.slen && mwi->body.slen),
PJ_EINVAL);
/* Lock object. */
pjsip_dlg_inc_lock(mwi->dlg);
@ -387,11 +381,12 @@ PJ_DEF(pj_status_t) pjsip_mwi_notify( pjsip_evsub *sub,
goto on_return;
/* Update the cached message body */
if (mime_type && body) {
if (mime_type || body)
pj_pool_reset(mwi->body_pool);
if (mime_type)
pjsip_media_type_cp(mwi->body_pool, &mwi->mime_type, mime_type);
if (body)
pj_strdup(mwi->body_pool, &mwi->body, body);
}
/* Create message body */
status = mwi_create_msg_body( mwi, tdata );

View File

@ -1,209 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<!-- 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 2 of the -->
<!-- License, or (at your option) any later version. -->
<!-- -->
<!-- This program 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, write to the -->
<!-- Free Software Foundation, Inc., -->
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- -->
<!-- Re-INVITE with bad Via branch (it has the same branch as the
previous INVITE (ticket #965) will cause assertion
-->
<scenario name="UAC re-INVITE with bad Via branch">
<label id="1"/>
<send>
<![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bKPj-1
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len]
v=0
o=Tester 234 123 IN IP4 127.0.0.1
s=Tester
c=IN IP4 127.0.0.1
t=0 0
m=audio 17424 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=sendrecv
]]>
</send>
<recv response="100"
optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="200" rtd="true">
</recv>
<!-- Packet lost can be simulated in any send/recv message by -->
<!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
<send>
<![CDATA[
ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bKPj-2
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>
<!-- Uncomment this to the test retry/looping scenario -->
<!--pause distribution="uniform" min="0" max="100"/-->
<!-- Re-INVITE with Via branch value the same as previous INVITE -->
<send>
<![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bKPj-1
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len]
v=0
o=Tester 234 124 IN IP4 127.0.0.1
s=Tester
c=IN IP4 127.0.0.1
t=0 0
m=audio 17424 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
]]>
</send>
<!-- Previous INVITE transaction may have been destroyed, and 200 -->
<!-- response is received, instead of 500. So, let's just try again, -->
<!-- i.e: send ACK and repeat the scenario. -->
<recv response="200" optional="true" next="9">
</recv>
<!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="500" rtd="true">
</recv>
<!-- Packet lost can be simulated in any send/recv message by -->
<!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
<send>
<![CDATA[
ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bKPj-1
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<!-- The 'crlf' option inserts a blank line in the statistics report. -->
<send>
<![CDATA[
BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] BYE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true" next="10">
</recv>
<label id="9"/>
<!-- Send ACK before repeating the scenario -->
<send>
<![CDATA[
ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bKPj-1
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>
<!-- Wait for this tsx getting destroyed before restarting -->
<pause milliseconds="5100" next="1"/>
<label id="10"/>
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>