> On May 12, 2014, 8:58 p.m., Matt Jordan wrote: > > asterisk/trunk/lib/python/asterisk/ari.py, lines 511-523 > > <https://reviewboard.asterisk.org/r/3525/diff/1/?file=58346#file58346line511> > > > > This should not be bundled with EventWatcher. Separation of concerns > > takes a real beating when you combine SIPp related activities with a > > general callback function executor. > > > > I would structure this differently: > > 1) Have a generic base class that provides event matching and calls a > > virtual method when an event matches. > > 2) Extract out the existing callback functionality and place it into a > > concrete class that inherits from the base class. > > 3) Add your SIPp scenario execution in another concrete class. > > 4) Modify WebSocketEventModule to look at the config passed to it and > > instantiate the object based on the type specified in the yaml. You can do > > this either by using factory functions (based on a passed in string > > keyword), or by dynamically instantiating the object in the same fashion as > > test_runner.py.
After re-evaluating why I went this direction, I appear to have missed something. This will be implemented in the callback with the other ARI requests. - opticron ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3525/#review11877 ----------------------------------------------------------- On May 19, 2014, 1:02 p.m., opticron wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3525/ > ----------------------------------------------------------- > > (Updated May 19, 2014, 1:02 p.m.) > > > Review request for Asterisk Developers and Joshua Colp. > > > Bugs: ASTERISK-23641 > https://issues.asterisk.org/jira/browse/ASTERISK-23641 > > > Repository: testsuite > > > Description > ------- > > This reworks a significant portion of the ARI attended transfer test to avoid > dependence on pjsua since it has the tendency to cause sporadic (and > sometimes consistent) test failures. The reworked test uses SIPp with 3PCC to > manage the transfer scenario. > > This change also gives WebSocketEventModule (and anything else using > EventMatcher) the ability to spawn SIPp scenarios in response to websocket > events. > > > Diffs > ----- > > asterisk/trunk/tests/rest_api/bridges/attended_transfer/test-config.yaml > 5043 > asterisk/trunk/tests/rest_api/bridges/attended_transfer/sipp/referer.xml > PRE-CREATION > asterisk/trunk/tests/rest_api/bridges/attended_transfer/sipp/referee.xml > PRE-CREATION > > asterisk/trunk/tests/rest_api/bridges/attended_transfer/attended_transfer.py > 5043 > asterisk/trunk/lib/python/asterisk/ari.py 5043 > > Diff: https://reviewboard.asterisk.org/r/3525/diff/ > > > Testing > ------- > > Ensured that the test was operating as expected. > > > Thanks, > > opticron > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
