[asterisk-dev] [Code Review] 4413: Testsuite: Simulate phones and control from YAML.

Mark Michelson reviewboard at asterisk.org
Fri Feb 13 09:19:21 CST 2015



> On Feb. 12, 2015, 6:42 p.m., Mark Michelson wrote:
> > /asterisk/trunk/lib/python/asterisk/pjsua_mod.py, lines 258-259
> > <https://reviewboard.asterisk.org/r/4413/diff/1/?file=71349#file71349line258>
> >
> >     Is this change necessary since you ended up overriding reg_success() in your new pluggable object?
> 
> jbigelow wrote:
>     If that condition is removed then it will blow up if callback_module & callback_method are not defined in YAML and pjsua_mod.PJsua is being used as a test module. If it remains with the same scenario then things won't blow up and no user code is called into(maybe there's a need for that?). Suggestions?

Hm, I guess my thoughts here are that if someone is trying to use the pjsua_mod.PJsua pluggable module directly (as opposed to using the phone controller), then it is an error currently to not specify a callback_module and callback_method.


- Mark


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


On Feb. 13, 2015, 12:27 a.m., jbigelow wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4413/
> -----------------------------------------------------------
> 
> (Updated Feb. 13, 2015, 12:27 a.m.)
> 
> 
> Review request for Asterisk Developers and Mark Michelson.
> 
> 
> Bugs: ASTERISK-24578
>     https://issues.asterisk.org/jira/browse/ASTERISK-24578
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> Pluggable modules to place, receive, and transfer (blind/attended) calls to simulate phones using PJSUA and YAML configuration. Calls are placed and/or transferred using the new pluggable action module. This should allow many currrent and future tests to easily send/receive calls to/from Asterisk along with transferring calls within YAML configuration.
> 
> The pluggable test module (phones.PjsuaPhoneController) initializes the PJSUA accounts and once all have registered, the account callbacks are setup and are ready to receive calls. The pluggable action module (pluggable_modules.PjsuaPhoneActionModule) provides the ability to place calls and transfer calls using the accounts from YAML and the action is referenced with 'pjsua_phone'. The only time a call is hung up by this is when a transfer is performed and a 200 OK sipfrag NOTIFY is received. None of the modules set a pass/fail result and are only for driving and manipulating calls.
> 
> See attached file for YAML demo.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/lib/python/asterisk/pluggable_modules.py 6379 
>   /asterisk/trunk/lib/python/asterisk/pjsua_mod.py 6379 
>   /asterisk/trunk/lib/python/asterisk/phones.py PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/4413/diff/
> 
> 
> Testing
> -------
> 
> * Tested placing calls, receiving calls, transfering via blind & attended.
> * Pylint score of 9.40/10 for phones.py
> * See attached test-config.yaml for a demonstration.
> 
> 
> File Attachments
> ----------------
> 
> Demonstration
>   https://reviewboard.asterisk.org/media/uploaded/files/2015/02/11/659ab31f-8401-4f24-be5e-da1db0be3156__test-config.yaml
> 
> 
> Thanks,
> 
> jbigelow
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150213/d2eeb614/attachment.html>


More information about the asterisk-dev mailing list