[Asterisk-code-review] Fix failing blind transfer test after PJSIP 2.4 upgrade. (testsuite[master])

Joshua Colp asteriskteam at digium.com
Thu Jun 4 06:09:04 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: Fix failing blind transfer test after PJSIP 2.4 upgrade.
......................................................................


Fix failing blind transfer test after PJSIP 2.4 upgrade.

A change in PJSIP 2.4 resulted in the blind transfer test taking
longer than 30 seconds to complete. On my box, the test on PJSIP 2.3
tood 22 seconds, and on PJSIP 2.4 took 38 seconds.

The reason for this was due to some changes to transaction timers in
PJSIP. In our test scenario, alice would send an initial INVITE with
branch "foo". Asterisk would answer the INVITE, and alice would ACK the
answer. In PJSIP 2.3, the transaction was immediately destroyed when the
ACK was received. However, in 2.4, there is a delay between when the ACK
is received and when the transaction is terminated.

Alice re-used branch "foo" in subsequent requests. With PJSIP 2.3, this
was not an issue since the previous transaction had been destroyed
already. With 2.4, however, this incoming request would match the
previous transaction, and the request would be ignored. After the
original transaction timed out and was destroyed, then the next
retransmission of the request from alice would finally be responded to.

The solution for this is to vary the branch parameter that we send in
requests from alice in this scenario. This is done by adding a numerical
suffix to the end of the [last_Via:] to ensure that the branch will be
different from previous transactions.

ASTERISK-25147 #close
Created by Mark Michelson

Change-Id: Ifdf798cb7abd49f764d533b9af96aa813f954391
---
M tests/channels/pjsip/transfers/blind_transfer/caller_with_hold/sipp/alice.xml
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold/sipp/alice.xml b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold/sipp/alice.xml
index 60598b1..bc16036 100644
--- a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold/sipp/alice.xml
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold/sipp/alice.xml
@@ -72,7 +72,7 @@
     <![CDATA[
 
       INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
-      [last_Via:]
+      [last_Via:]2
       [last_From:]
       [last_To:]
       [last_Call-ID:]
@@ -103,7 +103,7 @@
     <![CDATA[
 
       ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
-      [last_Via:]
+      [last_Via:]2
       [last_From:]
       [last_To:]
       Call-ID: [call_id]
@@ -122,7 +122,7 @@
     <![CDATA[
 
       REFER sip:[service]@[remote_ip]:[remote_port] SIP/2.0
-      [last_Via:]
+      [last_Via:]3
       From: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
       To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
       Call-ID: [call_id]
@@ -191,7 +191,7 @@
     <![CDATA[
 
       BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
-      [last_Via:]
+      [last_Via:]4
       From: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
       To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
       Call-ID: [call_id]

-- 
To view, visit https://gerrit.asterisk.org/580
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdf798cb7abd49f764d533b9af96aa813f954391
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list