[Asterisk-code-review] Fix Failing atxfer fail blond test (testsuite[master])

Mark Michelson asteriskteam at digium.com
Thu Mar 17 16:54:59 CDT 2016


Mark Michelson has uploaded a new change for review.

  https://gerrit.asterisk.org/2434

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 tests/bridge/atxfer_fail_blonde/test-config.yaml
4 files changed, 4 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/34/2434/1

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..38239b0 100644
--- a/configs/bridge/ast2/extensions.conf
+++ b/configs/bridge/ast2/extensions.conf
@@ -9,6 +9,7 @@
 same => n,Record(alice_audio_%d.wav,,,k)
 same => n,UserEvent(Connected, Channel: ${CHANNEL(name)})
 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/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: newchange
Gerrit-Change-Id: I8c4175c3abd1cc1d2e71f3a73c3a11ea17436452
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list