[asterisk-commits] kmoore: testsuite/asterisk/trunk r3226 - /asterisk/trunk/tests/channels/SIP/s...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 18 11:49:06 CDT 2012


Author: kmoore
Date: Fri May 18 11:49:01 2012
New Revision: 3226

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3226
Log:
Add debugging to sip_cause to provide more information on failures

When events fail to pass inspection, provide helpful debug information
about why they failed to pass.

Modified:
    asterisk/trunk/tests/channels/SIP/sip_cause/run-test

Modified: asterisk/trunk/tests/channels/SIP/sip_cause/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_cause/run-test?view=diff&rev=3226&r1=3225&r2=3226
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_cause/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/sip_cause/run-test Fri May 18 11:49:01 2012
@@ -55,16 +55,24 @@
                 logger.info("got result for single channel call")
                 if event['hangupcause'] == '34':
                     self.success_count += 1
+                else:
+                    logger.error("Received 'single' event with bad HANGUPCAUSE code")
             elif event ['status'] == "double":
                 logger.info("got result for branched call")
                 if event['hangupcause'] == '17' and\
                         res_good(event['chan2'], event['res2']):
                     self.success_count += 1
+                else:
+                    logger.error("Received 'double' event with bad cause information")
             elif event ['status'] == "local":
                 logger.info("got result for local-indirected branched call")
                 if event['hangupcause'] == '0' and\
                         res_good(event['chan2'], event['res2']):
                     self.success_count += 1
+                else:
+                    logger.error("Received 'local' event with bad cause information")
+        else:
+            logger.error("Received '%s' event with bad cause information" % (event['status']))
 
         self.are_we_there_yet()
 




More information about the asterisk-commits mailing list