[asterisk-commits] Fix Failing atxfer fail blond test (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 18 09:49:03 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: Fix Failing atxfer_fail_blond test
......................................................................


Fix Failing atxfer_fail_blond test

There were two issues here:

First, the TALK_DETECTED variable was not being set by BackgroundDetect.
This was because the audio being transmitted by Alice was going to Bob
but not being echoed back to Alice. This is fixed by adjusting Bob's
dialplan to use Echo() instead of Wait().

Second, the automatic recall feature for attended transfers was not
working properly for this test. The problem with the recall is that it's
possible to call a specific SIP endpoint, but it's not possible to know
what username to call at that endpoint. So when attempting to recall
Alice, an INVITE gets sent to an Asterisk instance but there is no way
for the Asterisk server to know where in the dialplan to send the call.
This is fixed by simply removing the recall. The test is not intending
to even test the recall, but to ensure that in a failed blond transfer
that all channels are properly hung up.

Change-Id: I8c4175c3abd1cc1d2e71f3a73c3a11ea17436452
---
M configs/bridge/ast1/features.conf
M configs/bridge/ast2/extensions.conf
M configs/bridge/ast3/extensions.conf
M lib/python/asterisk/bridge_test_case.py
M tests/bridge/atxfer_fail_blonde/test-config.yaml
5 files changed, 6 insertions(+), 18 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/configs/bridge/ast1/features.conf b/configs/bridge/ast1/features.conf
index b5fd5d6..2899d67 100644
--- a/configs/bridge/ast1/features.conf
+++ b/configs/bridge/ast1/features.conf
@@ -1,5 +1,6 @@
 [general]
 atxferthreeway => 7
+atxferdropcall=yes
 
 [featuremap]
 blindxfer => 1
diff --git a/configs/bridge/ast2/extensions.conf b/configs/bridge/ast2/extensions.conf
index 302fd4d..570779f 100644
--- a/configs/bridge/ast2/extensions.conf
+++ b/configs/bridge/ast2/extensions.conf
@@ -8,7 +8,9 @@
 same => n,SendDTMF(#)
 same => n,Record(alice_audio_%d.wav,,,k)
 same => n,UserEvent(Connected, Channel: ${CHANNEL(name)})
+same => n,Set(TALK_DETECTED=0)
 same => n,BackgroundDetect(${RECORDED_FILE},1,20,,20000)
+same => n,NoOp(TALK_DETECTED is ${TALK_DETECTED})
 same => n,GoToIf($[${TALK_DETECTED}=0]?talkdetectfail:talkdetectpass)
 same => n(talkdetectfail),NoOp()
 same => n,UserEvent(TalkDetect, result: fail)
diff --git a/configs/bridge/ast3/extensions.conf b/configs/bridge/ast3/extensions.conf
index df8d7bc..e46b741 100644
--- a/configs/bridge/ast3/extensions.conf
+++ b/configs/bridge/ast3/extensions.conf
@@ -7,7 +7,7 @@
 same => n,Playback(${RECORDED_FILE})
 same => n,SendDTMF(#)
 same => n,UserEvent(Connected, Channel: ${CHANNEL(name)})
-same => n,Wait(10000)
+same => n,Echo()
 same => n,Hangup()
 same => n(fail),UserEvent(DTMF, Success: False)
 same => n,Hangup()
diff --git a/lib/python/asterisk/bridge_test_case.py b/lib/python/asterisk/bridge_test_case.py
index 9953c6b..9c6fcd8 100644
--- a/lib/python/asterisk/bridge_test_case.py
+++ b/lib/python/asterisk/bridge_test_case.py
@@ -224,6 +224,7 @@
                     alice_bridge_peer=self.uut_bob_channel)
             else:
                 LOGGER.warning("Audio issues on bridged call")
+                self.set_passed(False)
                 self.stop_reactor()
         return (ami, event)
 
diff --git a/tests/bridge/atxfer_fail_blonde/test-config.yaml b/tests/bridge/atxfer_fail_blonde/test-config.yaml
index 5b7ad4f..d1169a8 100644
--- a/tests/bridge/atxfer_fail_blonde/test-config.yaml
+++ b/tests/bridge/atxfer_fail_blonde/test-config.yaml
@@ -8,8 +8,7 @@
         3) Charlie delays slightly...
         4) Alice hangs up, converting attended transfer to blonde mode
         5)                        ...and hangs up to fail transfer
-        6) When the transfer recall is answered by Alice, hang up
-        7) Check "core show channels" for leaked Local/123 channel
+        6) Check "core show channels" for leaked Local/123 channel
         '
 
 test-modules:
@@ -51,21 +50,6 @@
                     Channel: 'Local/123 at default-00000000;1'
                     Cause: 17
 
-    -
-        # after transfer recall calls back Alice
-        ami-events:
-            conditions:
-                match:
-                    Event: CEL
-                    EventName: ANSWER
-                    Channel: 'SIP/alice-00000002'
-        # hang the call up, test is done
-        ami-actions:
-            -
-                action:
-                    Action: 'Hangup'
-                    Channel: 'SIP/alice-00000002'
-                    Cause: 16
 
 properties:
     minversion: '11.0.0'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c4175c3abd1cc1d2e71f3a73c3a11ea17436452
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list