[asterisk-dev] [Code Review] 3151: res_pjsip: PJSUA pluggable module and subscription tests

Kevin Harwell reviewboard at asterisk.org
Fri Jan 24 16:15:49 CST 2014


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



/asterisk/trunk/lib/python/asterisk/pluggable_modules.py
<https://reviewboard.asterisk.org/r/3151/#comment20187>

    I believe it is a PEP 8 guideline to have all imports at the top of the file.



/asterisk/trunk/lib/python/asterisk/pluggable_modules.py
<https://reviewboard.asterisk.org/r/3151/#comment20192>

    Parent method calls should also now be called with "super".



/asterisk/trunk/lib/python/asterisk/pluggable_modules.py
<https://reviewboard.asterisk.org/r/3151/#comment20189>

    Another import that needs to be moved.



/asterisk/trunk/tests/channels/pjsip/mwi/configs/ast1/modules.conf
<https://reviewboard.asterisk.org/r/3151/#comment20196>

    You'll need to include a noload => chan_sip.so (so it won't conflict) as well since this will override the testsuite's default behaviour to not load it for pjsip tests.



/asterisk/trunk/tests/channels/pjsip/mwi/test-config.yaml
<https://reviewboard.asterisk.org/r/3151/#comment20194>

    Probably also want to make this depend on res_pjsip_mwi just in case the module doesn't exist for some reason.



/asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/modules.conf
<https://reviewboard.asterisk.org/r/3151/#comment20198>

    Same as above.  You'll need to include a noload => chan_sip.so to avoid possible module conflicts.  The same will need to be done for the other presence test too.



/asterisk/trunk/tests/channels/pjsip/presence_pidf/test-config.yaml
<https://reviewboard.asterisk.org/r/3151/#comment20197>

    Make this also depend on res_pjsip_exten_state just in case.  The other presence test will need this as well.



/asterisk/trunk/tests/channels/pjsip/presence_xpidf/state_check.py
<https://reviewboard.asterisk.org/r/3151/#comment20199>

    Once the test fails and the reactor stops is there a need to continue on?  I don't think it would cause a problem, but just wondering.


- Kevin Harwell


On Jan. 23, 2014, 4:52 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3151/
> -----------------------------------------------------------
> 
> (Updated Jan. 23, 2014, 4:52 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> When creating the changes on https://reviewboard.asterisk.org/r/3150/, I realized that there were no subscription tests in the testsuite for res_pjsip yet.
> 
> In order to properly test subscriptions, I could not use SIPp, since removing the subscription requires the ability to handle two active transactions, and SIPp chokes when that happens. Since PJSUA is smarter and has python bindings, I decided to use that instead for the tests. In oder to do things the right way(tm), I decided to create a pluggable module for the testsuite that allows for PJSUA transports, accounts, and buddies to be created using yaml. Once all PJSUA accounts are registered, then a specified callback can be called to continue the test.
> 
> As far as actual tests are concerned, I've added three tests that use the new PJSUA plugin. There are two presence tests that test PIDF and XPIDF, and there is an MWI test. I was forced to use unsolicited MWI for the MWI test since the PJSUA python bindings do not have the ability to convey that an account should subscribe for MWI.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/pjsip/tests.yaml 4595 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/state_check.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/configs/ast1/modules.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/state_check.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/modules.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/mwi_check.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/configs/ast1/modules.conf PRE-CREATION 
>   /asterisk/trunk/lib/python/asterisk/pluggable_modules.py 4595 
> 
> Diff: https://reviewboard.asterisk.org/r/3151/diff/
> 
> 
> Testing
> -------
> 
> The tests pass.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

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


More information about the asterisk-dev mailing list