<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10553">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chanspy_barge: rewrite to remove pjsua dependency<br><br>When Asterisk was upgraded to use pjproject 2.8 a patch that was made to pjsua<br>caused pjsua to default to a TCP transport. This caused any testsuite test that<br>spawned pjsua as an endpoint to start to fail as they were using UDP (e.g.<br>chanspy_barge). An easy solution here is to set those particular tests to pass<br>the '--no-tcp' option to pjsua.<br><br>However, at some point we want to remove the dependency to pjsua altogther from<br>the testsuite. That being the case the chanspy_barge test has been rewritten to<br>not longer use pjsua. Instead this test just now uses local channels to test the<br>"barge" functionality.<br><br>ASTERISK~28096<br><br>Change-Id: Ia4ab4e37b867cc6b4cd7351e22adc3862d4b34eb<br>---<br>M tests/apps/chanspy/chanspy_barge/configs/ast1/extensions.conf<br>D tests/apps/chanspy/chanspy_barge/configs/ast1/rtp.conf<br>D tests/apps/chanspy/chanspy_barge/configs/ast1/sip.conf<br>D tests/apps/chanspy/chanspy_barge/run-test<br>D tests/apps/chanspy/chanspy_barge/sounds/talking.wav<br>M tests/apps/chanspy/chanspy_barge/test-config.yaml<br>6 files changed, 71 insertions(+), 214 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/apps/chanspy/chanspy_barge/configs/ast1/extensions.conf b/tests/apps/chanspy/chanspy_barge/configs/ast1/extensions.conf</span><br><span>index 89008da..02854d2 100644</span><br><span>--- a/tests/apps/chanspy/chanspy_barge/configs/ast1/extensions.conf</span><br><span>+++ b/tests/apps/chanspy/chanspy_barge/configs/ast1/extensions.conf</span><br><span>@@ -1,25 +1,23 @@</span><br><span style="color: hsl(0, 100%, 40%);">-[general]</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => create_bridge,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(Local/detect_barge)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-[globals]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => detect_barge,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ ; Transmit silence so the "other" side doesn't detect</span><br><span style="color: hsl(120, 100%, 40%);">+ ; its audio from "this" side</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,BackgroundDetect(silence/10,1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Log(ERROR, Channel ${CHANNEL} failed to detect barged audio)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-[test]</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_exten,1,Answer()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_exten,n,MixMonitor(${TESTAUDIO1}.wav)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_exten,n,Wait(3)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_exten,n,StopMixMonitor()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_exten,n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => talk,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ ; Once talking is detected wait for the other side. The test will hang</span><br><span style="color: hsl(120, 100%, 40%);">+ ; things up once it both sides successfully enter the "talk" extension.</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Verbose(Detected barged audio on channel ${CHANNEL})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Echo()</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-exten => chanspytest,1,ChanSpy(SIP,qB)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-exten => detect_audio,1,Answer()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => detect_audio,n,Set(TALK_DETECTED=0) ; initialize TALK_DETECT var</span><br><span style="color: hsl(0, 100%, 40%);">-exten => detect_audio,n,BackgroundDetect(${TALK_AUDIO},1,20,,20000)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => detect_audio,n,GoToIf($[${TALK_DETECTED}=0]?talkdetectfail:talkdetectpass)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => detect_audio,n(talkdetectfail),Hangup()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-;PASSED!</span><br><span style="color: hsl(0, 100%, 40%);">-exten => detect_audio,n(talkdetectpass),AGI(agi://127.0.0.1:4573)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_recording,1,Answer()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_recording,n,PlayBack(${TESTAUDIO1})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => play_recording,n,Echo()</span><br><span>\ No newline at end of file</span><br><span style="color: hsl(120, 100%, 40%);">+exten => s,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(hello-world)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span>diff --git a/tests/apps/chanspy/chanspy_barge/configs/ast1/rtp.conf b/tests/apps/chanspy/chanspy_barge/configs/ast1/rtp.conf</span><br><span>deleted file mode 100644</span><br><span>index fb420ba..0000000</span><br><span>--- a/tests/apps/chanspy/chanspy_barge/configs/ast1/rtp.conf</span><br><span>+++ /dev/null</span><br><span>@@ -1,3 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-[general]</span><br><span style="color: hsl(0, 100%, 40%);">-; Turn off strictrtp so that DTMF does not get dropped</span><br><span style="color: hsl(0, 100%, 40%);">-strictrtp=no</span><br><span>diff --git a/tests/apps/chanspy/chanspy_barge/configs/ast1/sip.conf b/tests/apps/chanspy/chanspy_barge/configs/ast1/sip.conf</span><br><span>deleted file mode 100644</span><br><span>index c9bcb00..0000000</span><br><span>--- a/tests/apps/chanspy/chanspy_barge/configs/ast1/sip.conf</span><br><span>+++ /dev/null</span><br><span>@@ -1,29 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-[general]</span><br><span style="color: hsl(0, 100%, 40%);">-directmedia=no</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-[end_a]</span><br><span style="color: hsl(0, 100%, 40%);">-context=test</span><br><span style="color: hsl(0, 100%, 40%);">-type=friend</span><br><span style="color: hsl(0, 100%, 40%);">-host=127.0.0.1</span><br><span style="color: hsl(0, 100%, 40%);">-port=5065</span><br><span style="color: hsl(0, 100%, 40%);">-insecure=invite</span><br><span style="color: hsl(0, 100%, 40%);">-disallow=all</span><br><span style="color: hsl(0, 100%, 40%);">-allow=ulaw</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-[end_b]</span><br><span style="color: hsl(0, 100%, 40%);">-context=test</span><br><span style="color: hsl(0, 100%, 40%);">-type=friend</span><br><span style="color: hsl(0, 100%, 40%);">-host=127.0.0.1</span><br><span style="color: hsl(0, 100%, 40%);">-port=5066</span><br><span style="color: hsl(0, 100%, 40%);">-insecure=invite</span><br><span style="color: hsl(0, 100%, 40%);">-disallow=all</span><br><span style="color: hsl(0, 100%, 40%);">-allow=ulaw</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-[end_c]</span><br><span style="color: hsl(0, 100%, 40%);">-context=test</span><br><span style="color: hsl(0, 100%, 40%);">-type=friend</span><br><span style="color: hsl(0, 100%, 40%);">-host=127.0.0.1</span><br><span style="color: hsl(0, 100%, 40%);">-port=5067</span><br><span style="color: hsl(0, 100%, 40%);">-insecure=invite</span><br><span style="color: hsl(0, 100%, 40%);">-disallow=all</span><br><span style="color: hsl(0, 100%, 40%);">-allow=ulaw</span><br><span>diff --git a/tests/apps/chanspy/chanspy_barge/run-test b/tests/apps/chanspy/chanspy_barge/run-test</span><br><span>deleted file mode 100755</span><br><span>index e1b8bc6..0000000</span><br><span>--- a/tests/apps/chanspy/chanspy_barge/run-test</span><br><span>+++ /dev/null</span><br><span>@@ -1,146 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-#!/usr/bin/env python</span><br><span style="color: hsl(0, 100%, 40%);">-'''</span><br><span style="color: hsl(0, 100%, 40%);">-Copyright (C) 2010-2014, Digium, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">-David Vossel <dvossel@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">-Matt Jordan <mjordan@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-This program is free software, distributed under the terms of</span><br><span style="color: hsl(0, 100%, 40%);">-the GNU General Public License Version 2.</span><br><span style="color: hsl(0, 100%, 40%);">-'''</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-import sys</span><br><span style="color: hsl(0, 100%, 40%);">-import os</span><br><span style="color: hsl(0, 100%, 40%);">-import signal</span><br><span style="color: hsl(0, 100%, 40%);">-import subprocess</span><br><span style="color: hsl(0, 100%, 40%);">-import logging</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-from twisted.application import service, internet</span><br><span style="color: hsl(0, 100%, 40%);">-from twisted.internet import reactor, defer</span><br><span style="color: hsl(0, 100%, 40%);">-from starpy import manager</span><br><span style="color: hsl(0, 100%, 40%);">-from starpy import fastagi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-sys.path.append("lib/python")</span><br><span style="color: hsl(0, 100%, 40%);">-from asterisk.test_case import TestCase</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-LOGGER = logging.getLogger(__name__)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-class ChanSpyBarge(TestCase):</span><br><span style="color: hsl(0, 100%, 40%);">- def __init__(self):</span><br><span style="color: hsl(0, 100%, 40%);">- super(ChanSpyBarge, self).__init__()</span><br><span style="color: hsl(0, 100%, 40%);">- self.last_step = ""</span><br><span style="color: hsl(0, 100%, 40%);">- self.passed = False</span><br><span style="color: hsl(0, 100%, 40%);">- self.numSpyEvents = 0</span><br><span style="color: hsl(0, 100%, 40%);">- self.expectedSpyEvents = 3</span><br><span style="color: hsl(0, 100%, 40%);">- self.talkDetected = 0</span><br><span style="color: hsl(0, 100%, 40%);">- self.test_to = 25</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- self.create_asterisk()</span><br><span style="color: hsl(0, 100%, 40%);">- self.create_fastagi_factory()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- ast_conf_options = {</span><br><span style="color: hsl(0, 100%, 40%);">- "transmit_silence" : "yes",</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- self.talkingaudio = os.path.join(os.getcwd(), "%s/sounds/talking" % self.test_name)</span><br><span style="color: hsl(0, 100%, 40%);">- self.audiofile1 = self.ast[0].get_path("astspooldir", "tmp", "testaudio1")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def fastagi_connect(self, agi):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("GOT PASS RESULTS!!!")</span><br><span style="color: hsl(0, 100%, 40%);">- sequence = fastagi.InSequence()</span><br><span style="color: hsl(0, 100%, 40%);">- sequence.append(agi.execute, "HangUp")</span><br><span style="color: hsl(0, 100%, 40%);">- sequence.append(agi.finish)</span><br><span style="color: hsl(0, 100%, 40%);">- self.passed = True</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.callLater(1, self.readResult)</span><br><span style="color: hsl(0, 100%, 40%);">- return sequence()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def readResult(self):</span><br><span style="color: hsl(0, 100%, 40%);">- self.stop_reactor()</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Reading results")</span><br><span style="color: hsl(0, 100%, 40%);">- self.ast[0].cli_exec("core show locks") # get lock output in case of deadlock before tearing down.</span><br><span style="color: hsl(0, 100%, 40%);">- self.ast[0].cli_exec("core show channels")# if channels are still up for some reason, we want to know that as well</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- self.ast[0].cli_exec("core show globals") # The global variables here hold failure conditions</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if self.passed == True:</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info('SIP ChanSpy test PASSED!')</span><br><span style="color: hsl(0, 100%, 40%);">- else:</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.error('SIP ChanSpy Test FAILED')</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def chanspyEvent(self, ami, event):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info('Received ChanSpyStart event')</span><br><span style="color: hsl(0, 100%, 40%);">- self.numSpyEvents += 1</span><br><span style="color: hsl(0, 100%, 40%);">- if event['spyeechannel'].count('end_a') > 0:</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.callLater(3, self.aHangup)</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.callLater(4, self.bHangup)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def ami_connect(self, ami):</span><br><span style="color: hsl(0, 100%, 40%);">- self.ami = ami</span><br><span style="color: hsl(0, 100%, 40%);">- self.ami.registerEvent('ChanSpyStart', self.chanspyEvent)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- self.ami.setVar(channel = "", variable = "TESTAUDIO1", value = self.audiofile1)</span><br><span style="color: hsl(0, 100%, 40%);">- self.ami.setVar(channel = "", variable = "TALK_AUDIO", value = self.talkingaudio)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.callLater(1, self.callChanSpy)</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.callLater(2, self.aCall)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def aCall(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("A Calling into Wait")</span><br><span style="color: hsl(0, 100%, 40%);">- self.pja.stdin.write("m\n")</span><br><span style="color: hsl(0, 100%, 40%);">- self.pja.stdin.write("sip:play_exten@127.0.0.1:5060\n")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def bCall(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("B Calling into Playback")</span><br><span style="color: hsl(0, 100%, 40%);">- self.pjb.stdin.write("m\n")</span><br><span style="color: hsl(0, 100%, 40%);">- self.pjb.stdin.write("sip:play_exten@127.0.0.1:5060\n")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def aHangup(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Hanging up A")</span><br><span style="color: hsl(0, 100%, 40%);">- self.pja.stdin.write("h\n")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def bHangup(self): #calls into chanspy extension and plays audio to A using Barge</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Hanging up B")</span><br><span style="color: hsl(0, 100%, 40%);">- self.pjb.stdin.write("h\n")</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.callLater(2, self.verifyAudio)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def startProcesses(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Starting Processes")</span><br><span style="color: hsl(0, 100%, 40%);">- playfilearg = "--play-file=%s.wav" % (self.talkingaudio)</span><br><span style="color: hsl(0, 100%, 40%);">- self.pja = subprocess.Popen(['pjsua', '--local-port=5065', '--auto-answer=200', '--null-audio', '--auto-loop'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)</span><br><span style="color: hsl(0, 100%, 40%);">- self.pjb = subprocess.Popen(['pjsua', '--local-port=5066', '--auto-answer=200', playfilearg, '--null-audio', '--auto-play'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def stopProcesses(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Stopping Processes")</span><br><span style="color: hsl(0, 100%, 40%);">- os.kill(self.pja.pid, signal.SIGKILL)</span><br><span style="color: hsl(0, 100%, 40%);">- os.kill(self.pjb.pid, signal.SIGKILL)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def callChanSpy(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Placing call to ChanSpy extension.")</span><br><span style="color: hsl(0, 100%, 40%);">- self.ast[0].cli_originate("SIP/end_b extension chanspytest@test")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def verifyAudio(self):</span><br><span style="color: hsl(0, 100%, 40%);">- LOGGER.info("Verifying Audio")</span><br><span style="color: hsl(0, 100%, 40%);">- self.ast[0].cli_originate("Local/play_recording@test extension detect_audio@test")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def stop_asterisk(self):</span><br><span style="color: hsl(0, 100%, 40%);">- if not self.passed:</span><br><span style="color: hsl(0, 100%, 40%);">- self.readResult()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- def run(self):</span><br><span style="color: hsl(0, 100%, 40%);">- self.create_ami_factory()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-def main():</span><br><span style="color: hsl(0, 100%, 40%);">- test = ChanSpyBarge()</span><br><span style="color: hsl(0, 100%, 40%);">- test.startProcesses()</span><br><span style="color: hsl(0, 100%, 40%);">- reactor.run()</span><br><span style="color: hsl(0, 100%, 40%);">- test.stopProcesses()</span><br><span style="color: hsl(0, 100%, 40%);">- if test.passed != True:</span><br><span style="color: hsl(0, 100%, 40%);">- return 1</span><br><span style="color: hsl(0, 100%, 40%);">- return 0</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-if __name__ == "__main__":</span><br><span style="color: hsl(0, 100%, 40%);">- sys.exit(main() or 0)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-# vim:sw=4:ts=4:expandtab:textwidth=79</span><br><span>diff --git a/tests/apps/chanspy/chanspy_barge/sounds/talking.wav b/tests/apps/chanspy/chanspy_barge/sounds/talking.wav</span><br><span>deleted file mode 100644</span><br><span>index 6304af0..0000000</span><br><span>--- a/tests/apps/chanspy/chanspy_barge/sounds/talking.wav</span><br><span>+++ /dev/null</span><br><span>Binary files differ</span><br><span>diff --git a/tests/apps/chanspy/chanspy_barge/test-config.yaml b/tests/apps/chanspy/chanspy_barge/test-config.yaml</span><br><span>index e3ec313..83ef805 100644</span><br><span>--- a/tests/apps/chanspy/chanspy_barge/test-config.yaml</span><br><span>+++ b/tests/apps/chanspy/chanspy_barge/test-config.yaml</span><br><span>@@ -1,28 +1,65 @@</span><br><span> testinfo:</span><br><span style="color: hsl(0, 100%, 40%);">- summary: 'Test Chanspy with the \"B\" option for barging in on both channels.'</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Test Chanspy with the \"B\" option for barging in on both channels.'</span><br><span> description: |</span><br><span style="color: hsl(0, 100%, 40%);">- 'This test verifies basic functionality of using ChanSpy with the </span><br><span style="color: hsl(0, 100%, 40%);">- barge option set. MixMonitor is used to record the audio on the</span><br><span style="color: hsl(0, 100%, 40%);">- spied on channel to verify the barging spy channel audio is received. </span><br><span style="color: hsl(0, 100%, 40%);">- Also, since the Wait() application is used during barge, this verifies </span><br><span style="color: hsl(0, 100%, 40%);">- that the behavior of transmitting silence during ast_safe_sleep works with</span><br><span style="color: hsl(0, 100%, 40%);">- transmit_silence=yes configured in asterisk.conf. Without transmitting</span><br><span style="color: hsl(0, 100%, 40%);">- silence during wait, the barge audio will not be mixed and this test will</span><br><span style="color: hsl(0, 100%, 40%);">- fail.'</span><br><span style="color: hsl(120, 100%, 40%);">+ 'This test verifies basic functionality of using ChanSpy with the</span><br><span style="color: hsl(120, 100%, 40%);">+ barge option set. Both sides of the call transmit silence using</span><br><span style="color: hsl(120, 100%, 40%);">+ BackgroundDetect. This ensures that any noise/audio heard only</span><br><span style="color: hsl(120, 100%, 40%);">+ comes from the barging channel.'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ test-object:</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: test-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'test_case.SimpleTestCase'</span><br><span style="color: hsl(120, 100%, 40%);">+ modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: event-action-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.EventActionModule'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ test-iterations:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/detect_barge'</span><br><span style="color: hsl(120, 100%, 40%);">+ context: 'default'</span><br><span style="color: hsl(120, 100%, 40%);">+ exten: 'create_bridge'</span><br><span style="color: hsl(120, 100%, 40%);">+ priority: 1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+event-action-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ami-events:</span><br><span style="color: hsl(120, 100%, 40%);">+ conditions:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Event: 'Newexten'</span><br><span style="color: hsl(120, 100%, 40%);">+ Application: 'BackgroundDetect'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: '2'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger-on-count: True</span><br><span style="color: hsl(120, 100%, 40%);">+ ami-actions:</span><br><span style="color: hsl(120, 100%, 40%);">+ action:</span><br><span style="color: hsl(120, 100%, 40%);">+ Action: 'Originate'</span><br><span style="color: hsl(120, 100%, 40%);">+ Channel: 'Local/s'</span><br><span style="color: hsl(120, 100%, 40%);">+ Application: 'ChanSpy'</span><br><span style="color: hsl(120, 100%, 40%);">+ Data: 'Local/detect_barge,qBE'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ami-events:</span><br><span style="color: hsl(120, 100%, 40%);">+ conditions:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Event: 'Newexten'</span><br><span style="color: hsl(120, 100%, 40%);">+ Application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: '2'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger-on-count: True</span><br><span style="color: hsl(120, 100%, 40%);">+ ami-actions:</span><br><span style="color: hsl(120, 100%, 40%);">+ action:</span><br><span style="color: hsl(120, 100%, 40%);">+ Action: 'UserEvent'</span><br><span style="color: hsl(120, 100%, 40%);">+ UserEvent: 'Done'</span><br><span> </span><br><span> properties:</span><br><span> dependencies:</span><br><span> - python : 'twisted'</span><br><span> - python : 'starpy'</span><br><span style="color: hsl(0, 100%, 40%);">- - app : 'pjsua'</span><br><span> - asterisk : 'app_chanspy'</span><br><span> - asterisk : 'app_echo'</span><br><span style="color: hsl(0, 100%, 40%);">- - asterisk : 'app_mixmonitor'</span><br><span> - asterisk : 'app_playback'</span><br><span> - asterisk : 'app_talkdetect'</span><br><span style="color: hsl(0, 100%, 40%);">- - asterisk : 'chan_sip'</span><br><span> - asterisk : 'pbx_config'</span><br><span style="color: hsl(0, 100%, 40%);">- - asterisk : 'res_agi'</span><br><span> tags:</span><br><span style="color: hsl(0, 100%, 40%);">- - SIP</span><br><span> - chanspy</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10553">change 10553</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10553"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia4ab4e37b867cc6b4cd7351e22adc3862d4b34eb </div>
<div style="display:none"> Gerrit-Change-Number: 10553 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>