#120 Sendfax Authentication

open
nobody
None
1
2011-07-15
2011-07-12
No

I added hostname, username, and password configuration variables to the site's configuration file, as well as added the variables to the arguments in the Prescription controller. This allows for the use of a sendfax client that is external to the server (as in our case). This is a built in functionality of sendfax, as added by Hylafax developers.

Visit the code here:
https://github.com/derekbrown/openemr/tree/datagroup

Discussion

  • Brady Miller

    Brady Miller - 2011-07-13

    hi,
    placed review in github,
    -brady

     
  • Rod Roark

    Rod Roark - 2011-07-13

    Where's the commit? All I see are some changes to controllers/C_Prescription.class.php that seem unrelated to faxing.

    Rod

     
  • Derek Brown (DTI Networks)

    Rod:

    View lines 778-780 as well as 817-820 within the controller. A simple diff should allow you to see the changes. These lines allow for the addition of a hostname/username/password in the sendfax command, as long as the variables are set in the site's configuration (Lines 87-89 of /sites/default/config.php).

     
  • Brady Miller

    Brady Miller - 2011-07-13

    Rod,
    There are two commits now there (the most recent was a fix and the one previous to that is the main commit).
    -brady

     
  • Rod Roark

    Rod Roark - 2011-07-13

    OK... well github will show commit diffs, so to get something reviewed you need to clearly indicate the commits to look at. Preferably this will be a single commit against current development code.

    A couple of general comments. Global settings (Administartion -> Globals) already have a place for Hylafax parameters, so it seems inconsistent to use them from config.php. I understand if you don't want to inherit that problem, but it would be nice to clean that up. Also I'm not sure if the "Fax/Scan" feature will work with a remote Hylafax server, you might want to check that. I mention this because I vaguely remember that it accesses the hylafax directories. But I might be wrong about that.

    Rod

     
  • Derek Brown (DTI Networks)

    Understood about the single commit. Will take note in the future.

    Concerning the settings, these settings could be moved to the global settings. I just chose to put the settings with the fax client (sendfax), since it was being used in the command line, just to have everything in one place when configuring the client.

    We are in testing right now for the faxing through an external server, but see no reason other then group permissions that it would not work, as the capability is built into the sendfax client. Is there possibly something else I'm missing?

    This is only for sending, not receiving (which could be another reason that the settings be listed along with the client versus being listed globally). For receiving faxes, the external hylafax server can be used to drop files into external folders, similar to scanning directly to a folder.

     
  • Rod Roark

    Rod Roark - 2011-07-13

    OK, sounds better to deal with my concerns separately. Thanks.

    Rod

     
  • Derek Brown (DTI Networks)

    What's the status of this code review/commit?

     
  • Derek Brown (DTI Networks)

    • priority: 5 --> 1
     
  • Brady Miller

    Brady Miller - 2011-07-15

    For clarification, what is the difference between send_fax and hylafax. For example, is Hylafax Server setting that is set in globals->miscellaneous the same thing as $GLOBALS['oer_config']['prescriptions']['sendfax_host'] setting?

     
  • Derek Brown (DTI Networks)

    sendfax is simply the client of a hylafax server. The sendfax_host variable and the server setting could point to the same server (in all likelihood they will), but there could be instances where the two settings would point to two different hylafax servers configured in different ways (one for incoming, another for outgoing). In our case, we have a HF server that is configured to route incoming faxes to different oEMR clients, and could possibly use another HF server that is part of our VOIP system to send faxes out, for billing purposes.

     
  • Brady Miller

    Brady Miller - 2011-07-15

    Hi,
    So, to attempt to integrate the settings in globals->miscellaneous and config.php, would it make sense have Enable Inbound Hylafax Support with the current settings in globals and an Enable Outbound Hylafax Support with the sendfax settings? I know nothing about this stuff, so let me know if I'm completely off base. Just wondering if there's a way to integrate the globals settings and config.php settings while still giving the flexibility you need.
    -brady

     
  • Derek Brown (DTI Networks)

    That would definitely be a way to do it, as long as the variables used in the prescription class would be the variables assigned in the globals settings.

     
  • Brady Miller

    Brady Miller - 2011-07-19

    Hi,
    Very easy to assign the variables within the prescription class (grep showed them only used in one place).
    So, if do Administration->Globals->Miscellaneous (default setting in parenthesis):

    Enable Outbound Hylafax Support (disabled)
    Outbound Hylafax Server (localhost)
    Outbound Hylafax Command (/usr/local/bin/sendfax)
    Outbound Hylafax User Name
    Outbound Hylafax Password

    Enable Inbound Hylafax Support (disabled)
    Inbound Hylafax Server (localhost)
    Inbound Hylafax Directory (/var/spool/fax)
    Inbound Hylafax Enscript Command (enscript -M Letter -B -e^ --margins=36:36:36:36)

    If this makes sense. I guess I'm confused why there is an outbound hylafax command (sendfax when there is not an inbound command). I think I can understand why there's not a name/password for inbound, though.

    -brady

     
  • Tony McCormick

    Tony McCormick - 2011-07-19

    Inbound faxes would be processed by a system level command monitoring the phone line or other source, so OpenEMR would not need to handle the processing of the inbound.

    Tony

     
  • Derek Brown (DTI Networks)

    Tony is correct on inbound faxing. Faxes are to be routed at the fax server level, as configured within Hylafax. OpenEMR simply accepts the fax as processed, and therefore only needs to know the folder to which Hylafax stores the faxes.

    As far as the variables are concerned, they look good. Is that something I should code, or something that one of you guys will take care of?

     
  • Brady Miller

    Brady Miller - 2011-07-19

    Hi,
    If you want, feel free to take a stab at it. Otherwise, I'll plan to do this over the weekend (let me know so we don't both waste time on the same thing).
    An additional minor thing I'd add to the User Name and Password labels is '(optional)' at the end of those two labels.
    -brady

     
  • Derek Brown (DTI Networks)

    Go for it. I will not be working on it until Monday.

     
  • Derek Brown (DTI Networks)

    Go for it. I will not be working on it until Monday.

     
  • Derek Brown (DTI Networks)

    Just following up with this code review to ensure that the GUI for the faxing out will be incorporated with the Administrator->Globals.

     
  • Brady Miller

    Brady Miller - 2011-07-23

    Still hopefully planning to do this over the weekend.

     
  • Brady Miller

    Brady Miller - 2011-07-25

    Sorry,

    Ended up burning through all my allotted weekend openemr time trying to fix/upgrade the ubuntu packages(it's rather addicting to build/test these things):
    http://github.com/bradymiller/openemr/tree/ubuntu-dev-pack_2

    Gonna delay my work on the sendfax stuff until next weekend, so feel free to take a stab at it during this week if you want.

    -brady

     
  • Derek Brown (DTI Networks)

    No problem. It's a low priority for me as well, so we'll see how it goes.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks