[asterisk-dev] [Code Review] 3832: testsuite: Accountcode propagation.

rmudgett reviewboard at asterisk.org
Tue Jul 22 15:46:06 CDT 2014



> On July 22, 2014, 12:41 p.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/pbx/accountcode/dial_none/configs/ast1/extensions.conf, lines 7-10
> > <https://reviewboard.asterisk.org/r/3832/diff/1/?file=64930#file64930line7>
> >
> >     Having to wait 5 seconds for this test to end when it has essentially completed is usually something we avoid.
> >     
> >     There is another route you can take, however:
> >     (1) Drop the channel into Echo after answering it
> >     (2) Use the channel hangup module to hangup the channel on the Newexten event:
> >     
> >         modules:
> >             -
> >                 config-section: hangup-channel
> >                 typename: 'pluggable_modules.AMIChannelHangup'
> >     
> >     hangup-channel:
> >         id: '1'
> >         conditions:
> >             match:
> >                 Event: 'Newexten'
> >                 Channel: 'PJSIP/bob-.*'
> >                 Application: Echo
> >         count: '1'
> >     
> >     This also supports a 'delay' parameter in case the hangup *does* need to wait a second or two.
> >     
> >     This finding would extend to the other tests that use the same pattern.

How is the 'delay' parameter any different than the Wait?  The Wait is to allow the answer to percolate back up the chain and to allow the channels to enter the bridge before hanging up.  Otherwise, the channels may not enter the bridge at all.


> On July 22, 2014, 12:41 p.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/pbx/accountcode/dial_none/test-config.yaml, line 61
> > <https://reviewboard.asterisk.org/r/3832/diff/1/?file=64932#file64932line61>
> >
> >     I don't think you need the dependency on func_channel for this test.

With so many tests it was getting difficult to keep those dependencies straight. :)


- rmudgett


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3832/#review12810
-----------------------------------------------------------


On July 21, 2014, 4:49 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3832/
> -----------------------------------------------------------
> 
> (Updated July 21, 2014, 4:49 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: AFS-65
>     https://issues.asterisk.org/jira/browse/AFS-65
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> New tests to check accountcode propagation with the new accouncode/peeracccount interaction.
> 
> * Made pluggable_modules.py Originator class and test_case.py
> SimpleTestCase class call origination allow specifying the accountcode.
> 
> * Fix tests/cdr/sqlite3 to work with the new accountcode propagation rules.
> 
> * Add accountcode tag to existing tests doing something with accountcode.
> 
> Testsuite tests to go with https://reviewboard.asterisk.org/r/3601/
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5288 
>   /asterisk/trunk/tests/pbx/accountcode/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_preserve/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_preserve/configs/ast1/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_preserve/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_preserve/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_none/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_none/configs/ast1/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_none/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_peer_none/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_none/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_none/configs/ast1/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_none/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/queue_none/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/local_originate/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/local_originate/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/local_crossover_back/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/local_crossover/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_straight_override/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_straight_override/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_straight_override/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_straight_none/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_straight_none/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_straight_none/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_predial/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_predial/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_predial/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_peer_override/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_peer_override/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_peer_override/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_peer_none/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_peer_none/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_peer_none/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_none/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_none/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/pbx/accountcode/dial_none/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/sqlite3/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_properties/cdr_accountcode/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_properties/blind-transfer-accountcode/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_originate_sip_congestion_log/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_manipulation/console_fork_before_dial/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_manipulation/console_fork_after_busy_forward/test-config.yaml 5288 
>   /asterisk/trunk/tests/cdr/cdr_manipulation/cdr_fork_end_time/test-config.yaml 5288 
>   /asterisk/trunk/lib/python/asterisk/test_case.py 5288 
>   /asterisk/trunk/lib/python/asterisk/pluggable_modules.py 5288 
> 
> Diff: https://reviewboard.asterisk.org/r/3832/diff/
> 
> 
> Testing
> -------
> 
> All accountcode tagged tests pass.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140722/92d250e0/attachment-0001.html>


More information about the asterisk-dev mailing list