Setting up Hylafax in the setting of multi-site installation


(Venu Julapalli) #1

Hi again,

I recently set up another instance for my sister using the multi-site module. I have been using Hylafax with OEMR in my first site. I set up a two-port Mainpine modem, which can now receive and send faxes using two separate numbers. The challenge now is how to separate the fax layout between me and her, as she has her own practice independent from me. I would not want either of us to be able to see and send faxes of the other. My limitation right now is the tiered structure of the multi-site installation. The Hylafax spool is all in the middle tier and is not site-specific.

I can’t quite wrap my head around this. Sure, I can change permissions through Hylafax configs, depending on which number is being invoked. But everything on the web console comes through one user, www-data, so that doesn’t help. And the interface pulls from faxstat commands, which draw from non-site-specific folders (recvq and doneq).

Any ideas on how to solve this, without rebuilding the whole interface, would be much appreciated.

Thanks,
Venu


#2

I’ve not played with Hylafax for a long time but in OpenEMR do the following.
In Admin->Globals->Miscellaneous for each site you will find both the Hylafax and the Scan_docs folder.
Make sure they are different for each site.

But please do post your solution for the benefit of the community.
And because I’m curious :wink:.

Thanks


(Stephen Waite) #3

hi @vrjula, you’re probably going to have to fine tune hylafax to put the received faxes for each phone number in their own directory.


(Venu Julapalli) #4

Hi @stephenwaite…exactly what I was thinking.

I have a rudimentary knowledge now of PHP (a Saturday cram session).

What superglobal variable holds the specific site name? If I can call that name up with a conditional statement, I’m getting close to a solution. I’m having some basic trouble with this.


(Venu Julapalli) #5

No bother…I found the variable.

So what I’ve ended up doing is this:

  1. Created the script /var/spool/hylafax/etc/FaxDispatch, which says if the device that is receiving a fax is the one with my sister’s number, move that fax to /var/spool/hylafax/archive.
  2. The reason I chose that folder is that it can be called with faxstat -a. And faxstat is what faxq.php is using to display the received faxes in OEMR.
  3. I edited faxq.php with conditional statements that if the site_id is my sister’s site, to exec faxstat -a (instead of faxstat -r, which pulls from the recvq folder) and format the output properly for display.

It’s not a scalable solution beyond two sites, but I don’t need scale anyway, with only a 2-port modem.

Now if only I could get Dispatch to work properly with convert – different issue, never been able to succeed…

-Venu