[asterisk-commits] Get sip bye also test passing with Asterisk 11. (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 18 15:29:22 CST 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: Get sip_bye_also test passing with Asterisk 11.
......................................................................
Get sip_bye_also test passing with Asterisk 11.
The test was recently altered to use the HangupMonitor to stop the test
when all channels had hung up. The problem is that in Asterisk 11, blind
transfers are done using channel masquerades. This causes problems
because <ZOMBIE> channels get hung up, and the HangupMonitor has no
record of those channels existing.
The fix is to have the HangupMonitor listen for Rename AMI events. This
way, we can tell when a channel has been renamed to be a zombie variant.
With this change, the test passes.
Change-Id: I1af60d6a0461d974a4269ca3782dd5b85ae619cb
---
M lib/python/asterisk/pluggable_modules.py
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/lib/python/asterisk/pluggable_modules.py b/lib/python/asterisk/pluggable_modules.py
index d1265c2..65105e3 100755
--- a/lib/python/asterisk/pluggable_modules.py
+++ b/lib/python/asterisk/pluggable_modules.py
@@ -299,6 +299,7 @@
"""AMI connect handler"""
if str(ami.id) in self.config["ids"]:
ami.registerEvent('Newchannel', self.__new_channel_handler)
+ ami.registerEvent('Rename', self.__rename_handler)
ami.registerEvent('Hangup', self.__hangup_handler)
def __new_channel_handler(self, ami, event):
@@ -320,6 +321,12 @@
self.stop_test()
return (ami, event)
+ def __rename_handler(self, ami, event):
+ LOGGER.debug("Channel {0} renamed to {1}".format(event['channel'],
+ event['newname']))
+ self.channels.append(event['newname'])
+ self.channels.remove(event['channel'])
+
def stop_test(self):
"""Allow subclasses to take different actions to stop the test."""
self.test_object.stop_reactor()
--
To view, visit https://gerrit.asterisk.org/2278
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1af60d6a0461d974a4269ca3782dd5b85ae619cb
Gerrit-PatchSet: 1
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: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-commits
mailing list