[asterisk-commits] kharwell: testsuite/asterisk/trunk r4308 - in /asterisk/trunk/tests/channels/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 30 12:50:32 CDT 2013
Author: kharwell
Date: Wed Oct 30 12:50:29 2013
New Revision: 4308
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4308
Log:
Testsuite: pjsip_messaging in dialog test sporadically failing
The pjsip message_in_dialog test would fail every once in a while because the
SIPp scenarios were not giving enough time for the call to properly initialize,
send the message and receive a response before hanging up. The solution was
to have the message receiver send a "bye" (instead of the original sender) once
the message was received.
(closes issue ASTERISK-22777)
Reported by: Matt Jordan
Modified:
asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf
asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml
asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message_recv.xml
asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/test-config.yaml
Modified: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf?view=diff&rev=4308&r1=4307&r2=4308
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/configs/ast1/extensions.conf Wed Oct 30 12:50:29 2013
@@ -2,4 +2,5 @@
[default]
+exten => user,1,Dial(pjsip/user)
exten => user1,1,Dial(pjsip/user1)
Modified: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml?view=diff&rev=4308&r1=4307&r2=4308
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml (original)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message.xml Wed Oct 30 12:50:29 2013
@@ -50,6 +50,8 @@
]]>
</send>
+ <pause milliseconds="1000"/>
+
<send>
<![CDATA[
MESSAGE sip:user1@[remote_ip]:[remote_port] SIP/2.0
@@ -72,23 +74,22 @@
<recv response="202" crlf="true" />
- <!-- allow the time for the message to be propagated -->
- <pause milliseconds="7000" />
+ <recv request="BYE" crlf="true" />
<send retrans="500">
<![CDATA[
- BYE sip:user1@[remote_ip]:[remote_port] SIP/2.0
- Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
- From: <sip:user@[local_ip]>;tag=[call_number]
- To: <sip:user1@[remote_ip]:[remote_port]>[peer_tag_param]
- CSeq: [cseq] BYE
- Call-ID: [call_id]
- Contact: <sip:user@[local_ip]>
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:user@[local_ip]:[local_port];transport=[transport]>
Allow: INVITE, ACK, MESSAGE, BYE
- Max-Forwards: 70
+ Content-Type: application/sdp
Content-Length: 0
+
]]>
</send>
- <recv response="200" crlf="true" />
</scenario>
Modified: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message_recv.xml?view=diff&rev=4308&r1=4307&r2=4308
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message_recv.xml (original)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/sipp/message_recv.xml Wed Oct 30 12:50:29 2013
@@ -2,91 +2,95 @@
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="In dialog MESSAGE recv">
- <recv request="INVITE" crlf="true" />
+ <Global variables="remote_tag" />
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
- <send>
- <![CDATA[
- SIP/2.0 100 Trying
- [last_Via:]
- [last_From:]
- [last_To:];tag=[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Contact: <sip:user1@[local_ip]:[local_port];transport=[transport]>
- Content-Length: 0
- ]]>
- </send>
+ <send>
+ <![CDATA[
- <send>
- <![CDATA[
- SIP/2.0 180 Ringing
- [last_Via:]
- [last_From:]
- [last_To:];tag=[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Contact: <sip:user1@[local_ip]:[local_port];transport=[transport]>
- Content-Length: 0
- ]]>
- </send>
+ 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 retrans="500">
- <![CDATA[
- SIP/2.0 200 OK
- [last_Via:]
- [last_From:]
- [last_To:];tag=[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Contact: <sip:user1@[local_ip]:[local_port];transport=[transport]>
- Allow: INVITE, ACK, MESSAGE, BYE
- Content-Type: application/sdp
- Content-Length: [len]
+ ]]>
+ </send>
- v=0
- o=- 1324901698 1324901698 IN IP4 [local_ip]
- s=-
- c=IN IP4 [local_ip]
- t=0 0
- m=audio 2226 RTP/AVP 0 101
- a=sendrecv
- a=rtpmap:0 PCMU/8000
- a=rtpmap:101 telephone-event/8000
- ]]>
- </send>
+ <send retrans="500">
+ <![CDATA[
- <recv request="ACK"/>
+ SIP/2.0 200 OK
+ [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-Type: application/sdp
+ Content-Length: [len]
- <recv request="MESSAGE" crlf="true" />
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=-
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
- <send>
- <![CDATA[
- SIP/2.0 202 Accepted
- [last_Via:]
- [last_From:]
- [last_To:];tag=[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Allow: INVITE, ACK, MESSAGE, BYE
- Content-Length: 0
- ]]>
- </send>
+ <recv request="ACK" rtd="true" crlf="true" />
- <recv request="BYE" crlf="true" />
+ <recv request="MESSAGE" crlf="true" />
- <send retrans="500">
- <![CDATA[
- SIP/2.0 200 OK
- [last_Via:]
- [last_From:]
- [last_To:];tag=[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Contact: <sip:user1@[local_ip]:[local_port];transport=[transport]>
- Allow: INVITE, ACK, MESSAGE, BYE
- Content-Type: application/sdp
- Content-Length: 0
+ <send>
+ <![CDATA[
+ SIP/2.0 202 Accepted
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Allow: INVITE, ACK, MESSAGE, BYE
+ Content-Length: 0
+ ]]>
+ </send>
- ]]>
- </send>
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:user@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: <sip:user1@[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
+ To: [$remote_tag]
+ [last_Call-ID:]
+ CSeq: [cseq] BYE
+ Contact: sip:user1@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200" />
+
+ <!-- Keep the call open for a while in case the 200 is lost to be -->
+ <!-- able to retransmit it if we receive the BYE again. -->
+
</scenario>
Modified: asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/test-config.yaml?view=diff&rev=4308&r1=4307&r2=4308
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/message/message_in_dialog/test-config.yaml Wed Oct 30 12:50:29 2013
@@ -19,6 +19,7 @@
typename: 'sipp.SIPpTestCase'
test-object-config:
+ reactor-timeout: 10
test-iterations:
-
scenarios:
More information about the asterisk-commits
mailing list