[asterisk-commits] mjordan: testsuite/asterisk/trunk r5049 - in /asterisk/trunk/tests/channels/p...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun May 18 15:31:03 CDT 2014
Author: mjordan
Date: Sun May 18 15:30:58 2014
New Revision: 5049
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5049
Log:
pjsip/transfers/blind_transfer/caller_direct_media: Fix race conditions
This patch fixes a few race conditions in the test where NOTIFY requests
could be sent interleaved with direct media re-INVITE requests. It also
makes it expect some direct media requests when channels are ejected from
a bridge.
Modified:
asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/configs/ast1/extensions.conf
asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/bob.xml
Modified: asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/configs/ast1/extensions.conf?view=diff&rev=5049&r1=5048&r2=5049
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/configs/ast1/extensions.conf Sun May 18 15:30:58 2014
@@ -13,13 +13,25 @@
same => n,Hangup()
exten => charlie,1,NoOp()
+ ; The Wait here is annoying, but necessary. We need to
+ ; allow some time to pass before dialing Charlie, otherwise
+ ; Charlie's answering will cause a NOTIFY request to be sent
+ ; prior to the direct media INVITE requests being fully
+ ; processed
+ same => n,Wait(5)
same => n,Dial(PJSIP/charlie)
same => n,Hangup()
[other]
; Second test iteration should execute
exten => charlie,1,NoOp()
- same => n,Dial(PJSIP/charlie)
+ ; The Wait here is annoying, but necessary. We need to
+ ; allow some time to pass before dialing Charlie, otherwise
+ ; Charlie's answering will cause a NOTIFY request to be sent
+ ; prior to the direct media INVITE requests being fully
+ ; processed
+ same => n,Wait(5)
+ same => n,Dial(PJSIP/charlie)
same => n,Hangup()
Modified: asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/bob.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/bob.xml?view=diff&rev=5049&r1=5048&r2=5049
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/bob.xml (original)
+++ asterisk/trunk/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/bob.xml Sun May 18 15:30:58 2014
@@ -155,6 +155,34 @@
crlf="true">
</recv>
+ <!-- Wait for re-invite to setup RTP directly between bob and Asterisk
+ after charlie hangs up -->
+ <recv request="INVITE" crlf="true"/>
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:bob@[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 [custom_media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
<recv request="BYE" />
<send>
More information about the asterisk-commits
mailing list