[asterisk-dev] [Code Review] 3666: res_fax: fax show session, fax show sessions, fax show stats - providing similar AMI commands

Jonathan Rose reviewboard at asterisk.org
Thu Jul 3 14:37:27 CDT 2014



> On June 26, 2014, 5:18 p.m., Mark Michelson wrote:
> > /trunk/res/res_fax_spandsp.c, lines 1109-1112
> > <https://reviewboard.asterisk.org/r/3666/diff/3/?file=61083#file61083line1109>
> >
> >     If you move the initialization of p out of the else, then you can combine the else and the if below it into an "else if" statement and gain back a level of indentation.

Hmmm, this remark made me realize that I left out an else clause that deals with AST_FAX_TECH_V21_DETECT which causes a bit of logical inconsistency from the CLI command. That needs to be dealt with as well.

Once that's the case, it will make less than a lot of sense to throw this if statement into the if/else ladder since it wouldn't connect logically to the other if statements (which all pertain to the fax session capabilities (send, receive, gateway, t38 detect))

What I'll do instead to save on the indention is invert the check and if it's true, skip the appends.


- Jonathan


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


On June 26, 2014, 2:54 p.m., Jonathan Rose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3666/
> -----------------------------------------------------------
> 
> (Updated June 26, 2014, 2:54 p.m.)
> 
> 
> Review request for Asterisk Developers, Matt Jordan and Mark Michelson.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> More CLI to AMI command conversions, this time focusing on everyone's favorite method for sending documents, FAX!
> 
> FAXSessions replicates the functionality of fax show sessions, and is more or less a 1:1 duplication.
> FAXSession replicates the functionality of fax show session. Output is slightly stripped down from the CLI variant in order to keep things consistent across multiple FAX modules and not just spandsp.
> FAXStats replicates the functionality of fax show stats, but only provides the fields that res_fax would normally provide in fax show stats and not any of the technology specific fields.
> 
> 
> Diffs
> -----
> 
>   /trunk/res/res_fax_spandsp.c 416868 
>   /trunk/res/res_fax.exports.in 416868 
>   /trunk/res/res_fax.c 416868 
>   /trunk/include/asterisk/res_fax.h 416868 
>   /trunk/CHANGES 416868 
> 
> Diff: https://reviewboard.asterisk.org/r/3666/diff/
> 
> 
> Testing
> -------
> 
> Created some simple transmit/receive fax sessions by originating calls to/from faxsend/faxreceive extensions and then ran each of these commands.
> Did the above with and without action_id included to make sure it would be reproduced across events and responses.
> Checked the output of documentation for events and actions for sanity.
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

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


More information about the asterisk-dev mailing list