TUTORIAL HylaFAX / AvantFax for PIAF! - Parts 1-4

Ive setup HylaFax/AvantFax on a small system with 3 pots lines using a Rhino card. Ive set the "Pause After Answer" for 5 seconds with Zaptel dectect. When a fax is recieved, it should be xfer to an extension with HylaFax enabled(710-713).
There seems to be some issue with receiving faxes from certain fax machines. Maybe some type of compatibility issue. The fax is detected, but not received. For an example I can send a fax to the PBX and its works 100% of the time. However HP faxback is detected, but fails to recieve.

Also there is a ring delay of 3-4 rings before the extensions start to ring. Im assuming this is related to the fax detect time. Does anyone have a recommend fax dectect time for zaptel?

Any advice?

I haven't used Zaptel detect - I wonder what the results would be if you tried NVFax on a shared Inbound Route.
 
First of all, my complements to you for such an excellent tutorial. For your prompt responses to all the questions and solving each one of them.

To answer your questions.

Which model?

Grandstream GXW410x

Did you remember to do this part:

Inside the file iax_custom.conf file, in each of the four [iax-faxX] contexts, change the context name "from-internal" to "from-fax"

Yes I did that.
Let me explain. Before installing nvfax (According to your tutorial - Adding a Dedicated Virtual Fax Machine / DID & Sharing A VoIP DID w/ Fax - Part 1 and 2) I could not receive incoming faxes as well. However, after I followed the tutorial I could receive faxes with the newly created modem IAX4 only. (For incoming faxes it always selects IAX4)
I am sure if I could somehow select the newly created modem IAX4 for outbound faxes as well, then it will work. How do I do that.
Secondly, what is different about IAX4 from IAX0, IAX1, IAX2 and IAX3?

Thanks
 
Grandstream GXW410x

Before installing nvfax (According to your tutorial - Adding a Dedicated Virtual Fax Machine / DID & Sharing A VoIP DID w/ Fax - Part 1 and 2) I could not receive incoming faxes as well.

This unit typically forwards calls as sip uri's.

You can configure them so all inbound lines go to the same destination (example: exten1@pbxaddress), or you can configure them so each inbound POTS line gets forwarded to a separate destination (example: POTS Line 1 to exten1@pbxaddress, POTS Line 2 to exten2@pbxaddress, and Etc.).

Dedicating inbound POTS for Virtual Modem Bank
If you wish to dedicate 1 inbound POTS to fax, forward it to a unique uri (fax@pbxaddress). In FreePBX, make inbound route for number FAX (just put 'fax' where you normally place the DID number.). Set inbound route destination to Custom Destinations: FAX (HylaFax).

Now, calls arriving to POTS line 1 will be forwarded to fax@pbxaddress, which is routed to the default virtual modems.

However, after I followed the tutorial I could receive faxes with the newly created modem IAX4 only. (For incoming faxes it always selects IAX4) .

Thats expected behavior when configured this way. No problems there.

I am sure if I could somehow select the newly created modem IAX4 for outbound faxes as well, then it will work. How do I do that.

Selecting the IAX device depends on how you are faxing.

If you are using the web interface to send faxes, then you shall open up the "options" section and select the IAX device you want to use from the drop down box. Remember, you must have permissions to see and use that IAX device as the user you are logged in as.

If you are using the print to fax tool we wrote about, then you enter the 'ttyIAX#' where it says modem. (See the Install article (earlier in this thread) to find pictures and full descriptions.)

Secondly, what is different about IAX4 from IAX0, IAX1, IAX2 and IAX3?

Thanks

Not very much at all.

ttyIAX0-3 are defined by the initial install script in iax_custom.conf. The inbound context is created as [custom-fax-iaxmodem] in extensions_custom.conf, and a
Custom Destinations: FAX (HylaFax) is created. then, all you have to do to get simple fax service working is pick an inbound route, and point it to this destination.

ttyIAX4 is defined manually in iax_custom.conf. The inbound context is created by FreePBX when we make the fax extension as desribed in the article. Then, you pick an inbound (shared voice) route and enable NVFax detection. When a fax is detected, NVFax directs the call to the ttyIAX4 extension instead of the telephone/voicemail.

I think it will also work if you just pick an inbound route and direct it to the ttyIAX4 fax extension you create - in the event you don't want or need to share the number with voice use. In this way, we don't really need NVFax. (I have NOT tested this last.)

Thanks for the kind words - I'm glad the articles have helped you out.

-tshif
 
I have a customer that would like to have some type of audible alert when a fax is received into the inbox. I was thinking about a special email account for faxes with a wav file triggered on receipt. Anyone have a better solution? All im looking for is a simple "beep".


thx
 
Worked finally!!!!

More power to you, tshif (Tony) !!!
The outbound faxes started working as well. There is a simple settings in GXW410x that I missed.
In t.38 settings, all I had to do was to change form default (relay mode) to pass through mode, and Bingo!! everything was working fine.
Thank you very much once again
 
Same Port Thing

I have followed on an fresh install.
I have read all the posts....I have created what I can.
I CANNOT get past the faxaddmodem part. I have rebooted...amportal restart...service iaxmodem stop then start, no luck.
I know I have missed something.
TIA
 
I have a customer that would like to have some type of audible alert when a fax is received into the inbox. I was thinking about a special email account for faxes with a wav file triggered on receipt. Anyone have a better solution? All im looking for is a simple "beep".
thx

I got nothing - your email idea should actually work pretty well. Anyone else have any thoughts?
 
I have followed on an fresh install.
I have read all the posts....I have created what I can.
I CANNOT get past the faxaddmodem part. I have rebooted...amportal restart...service iaxmodem stop then start, no luck.
I know I have missed something.
TIA

It sounds like this might help you -

This section in particular -

SetUp “Fax Machine” Peer in iax_custom.conf (new instruction)
 
Here is my question. I used your example and got everything working. I really like your solution. I also used another example and got DID routing working (http://www.guardiani.us/index.php/TrixBox_IAXModem_HylaFax) However it only seems to work when I tell it to go to a specific modem to route to a DID. It does not seem to work when it rolls over to the next modem. So when 1 call is in, if another calls they get a busy signal (but with that one modem I can get multiple DID’s to work). From the logs I can tell that your setup is not passing the DID string in callerID 4 field and in the other example it does.

They are making that happen in their setup by using “exten => analog_fax,3,Dial(${DIAL}/${CALLERID(number)},20,d)”. Whatever I try to modify the dial plan with I cannot seem to get your example to pass the DID. Do you know of anyway to make this happen? I have about 1,000 DID I am using on a Fax service and need a better solution. I really don’t want to create a 1,000 Virtual Modems and route things that way. Any help would be greatly appreciated.
 
is there a way to have a remote "email" solution???? such as say I get an email from someone regarding something very important. I then could save the attachment and "email" it to the server and have it fax it out.

say I could forward the email to [email protected] and then the PBX would fax it to the phone number provided before the @ symbol.
 
is there a way to have a remote "email" solution???? such as say I get an email from someone regarding something very important. I then could save the attachment and "email" it to the server and have it fax it out.

say I could forward the email to [email protected] and then the PBX would fax it to the phone number provided before the @ symbol.

There is email to fax capabilities built into Hylafax. I have not set it up but I will be this summer. Take a look at this info http://www.hylafax.org/content/Email_to_Fax_Gateway

If you start before I do can you take note of your progress and share :D
 
There are indeed email - to -fax provisions available, plus a new method of doing inbound DID routing has been brought to my attention. I hope to have these new procedures documented here in the next few days.

-tshif
 
Figured out DID routing

I have finally figured out how to route via DID’s using Hylafax. Here are the details on my setup. I am using an Untrixed TrixBox, but I am sure it would work in PBX in a Flash. I used the examples here to get everything working and then in the Faxdispatch I have routing as such:
Code:
FILETYPE=pdf;
[email protected];
case "$CALLID4" in
1231231234) [email protected]; FILETYPE=pdf;;
1231231235) [email protected]; FILETYPE=pdf;;
*) [email protected]; FILETYPE=pdf;;
esac
The thing that I needed to get the DID’s over to the IAXmodems was (placed in your custom destination)
Code:
exten => s,1,Dial(IAX2/iax-fax0/${DID})
exten => s,n,Dial(IAX2/iax-fax1/${DID})
exten => s,n,Busy
exten => s,n,Hangup
From searching on the Internet, the {DID} can vary depending on flavor of asterisk used.
To verify that you are getting the DID to pass use
tail -f /var/log/messages
and then dial your fax DID. You should see something similar:
Code:
Jul  7 14:42:26 pbx FaxGetty[7314]: ANSWER: Call ID 1 "8151231234"  #(this is the caller ID info)
Jul  7 14:42:26 pbx FaxGetty[7314]: ANSWER: Call ID 2 ""
Jul  7 14:42:26 pbx FaxGetty[7314]: ANSWER: Call ID 3 "<NONE>"
Jul  7 14:42:26 pbx FaxGetty[7314]: ANSWER: Call ID 4 "2222222"   #(this is the DID)
Jul  7 14:42:26 pbx FaxGetty[7314]: STATE CHANGE: LISTENING -> ANSWERING
If you get this far then you should be able to use the faxdispatch plugging in your DID’s and get it working.

Tshif if you have questions on this setup let me know. I figure you can create a better example than what I have here, but I did want to give you the guts to quickly create it.
 
An Issue:

it looks like the webmin plugin is offline.

Anyone know how to complete the install if this part fails?

The rest of it seems to work so far.

I read the thread and i am not sure about re-installing. looks like there is issues.

Thanks for the help.
 
Does someone have found a way to create custom FAX front page easily ?? I am using Avantfax since it as been posted here, but i have never been able to make a custom front page thanx!
 
An Issue:

it looks like the webmin plugin is offline.

Anyone know how to complete the install if this part fails?

The rest of it seems to work so far.

I read the thread and i am not sure about re-installing. looks like there is issues.

Thanks for the help.

Simply re-running the install script is NOT GOOD.

I think there's a good chance that site will come back online - in the mean time - can anyone help out by providing deano with a previously downloaded copy if the module?
 
I just wanted to say what a great setup this is. I just finished building our new pbx based on the dual core atom and integrated this into it. I'm still in the testing phase, but so far so good.

I really like how the failed email includes the remote destinations info! It told me fax machine brand/model, baud rates supported, and type of error. This thing really is first class.

The only thing that I would change is to edit your first post with links to the other instructions to help eliminate the redundant questions.

Thanks for your hard work guys!
 
I first want to say thanks to Joe and Tony for posting this, and being of help to those in this thread.

I've set up Hylafax on PIAF (the hard way) in the past. I've also worked with Hylafax on its own (again, the hard way... see a pattern here? LOL). Needless to say, it wasn't fun. But, seeing that a script was created (one that was editable no less), I really saw what we could do with it. We used it, and of course, we had to make adjustments along the way when we found out what was working and what wasn't working. But, in the end, we have a system for a client (one of our Atom systems with a PRI card and DIDs) that works beautifully.

With what we learned, we went back and looked to see how to make future installs better for larger installs. So, since I tend to be a little bit of a script monkey, I went to work on the original script, and added another one as a supplemental to satisfy some prerequisites that we found we needed (like NV Faxdetect).

So, what I am going to do is post the install path that worked best for us, using the modified script that should make setting up both inbound and outbound faxing easier. Be sure to do this on the system when you're not taking calls, since at least two reboots are necessary in this process.
  1. Grab this Excel spreadsheet...
    http://www.goccsg.com/piaf-hylafax/fax-assignment-sample.xls
    This spreadsheet will help you plan your fax setup, and will help avoid confusion. It will also give you the number of modems you should create.
  2. Log in to SSH. run the following (from the home root directory -- /root)...
    wget http://www.goccsg.com/piaf-hylafax/piaf-faxdetect.sh
    wget http://www.goccsg.com/piaf-hylafax/piaf-hylafax.sh
  3. do a chmod +x *.sh so that we can make them executable
  4. Now, run ./piaf-faxdetect.sh. Follow the directions and read the warnings on the screen. This will download and install the applications (nv faxdetect and nv backgrounddetect) into Asterisk. It will also recompile and reinstall the Asterisk code (this will not overwrite your config).
  5. Reboot your system, as suggested.
  6. Log back in, and run ./piaf-hylafax.sh. Again, follow all of the directions and read the warnings on the screen. Also, when prompted, answer all of the questions, including how many modems you want to start with (which is the number that you have come up with from .

    Now, it will ask you for the CID name once, and the CID numbers for however many modems you wish to add. I did this by design (for now), and if you want unique names, you can go back and edit each /etc/iaxmodem-config.ttyIAXxx config file's cidname. It will also ask for the email addresses for each modem so that it can automatically add them to the FaxDispatch file in Hylafax.
  7. Reboot your system. This will allow IAXmodem, Asterisk, and Hylafax to talk to each other.
  8. Go into the FreePBX control panel, and add your IAX Fax Extensions. Do this for every DID you create.

    SetUp “Fax Machine” Extension in FreePBX

    In FreePBX, Setup, Extensions, Add Extension, add a Generic IAX2 Device.
    Create the extension with the following Characteristics:
    User Extension: 4574 (this helped me keep it straight, you can do whatever fax extension you want)
    Display Name: Homer's Fax (Give it a Descriptive Name)
    Outbound CID: 6155551216
    Secret: The same strong secret as you specified in the setup

    Save your changes. Then, open the newly created extension again and make the following characteristics:
    notransfer = yes
    host = 127.0.0.1
    type = friend
    port = 4574 <=== * This must match the port assigned
    qualify=yes
    disallow = all
    allow = ulaw
    permit = 127.0.0.1/255.255.255.

    Save your changes again and apply your new settings.
  9. Go to your inbound routes, configure the proper DIDs (assuming it's set up). Go to the Fax Handling section, then set it to go to the created Fax extension, set the email address (again). For fax detection, use NVFax, and set the pause after answer to 4 (or whatever you feel comfortable with). When done, save your changes and apply your settings..
  10. Instead of me typing the rest, I'm going to link you to the rest...

    http://pbxinaflash.com/forum/showpost.php?p=21799&postcount=2
    (From the point on AvantFax onwards -- note: I limited users to the assigned modem)
    http://pbxinaflash.com/forum/showpost.php?p=21800&postcount=3
    http://pbxinaflash.com/forum/showpost.php?p=21801&postcount=4
    (Note: I restricted users to individual modems, and recommend faxing through WinPrint Hylafax over AvantFax. In Winprint Hylafax, you may put in "ttyIAX4" for the modem, and that modem will be used alone.
  11. In AvantFax config, under the modems, I named the modems after their extension, and for contact, put the email address of the user in there. This will help with receiving. This email address must be unique.
  12. Just to be safe, reboot again.
  13. Test and fix things as necessary
Some notes:

- I am going to look for a way to make the adding of the fax extensions easier, so that we don't have to add them through FreePBX.
- Furthermore, I modified this with the idea that this will benefit those who have PRI line(s) coming in, and that users will be faxing from their DID lines directly. In the future, I'm hoping to make it work with analog lines.
- If you have suggestions, or fixes you wish to send to me, send me a private message on here. I may not respond (since I am often busy being foneman's grunt), but I will read it and make changes to this process as I see fit.
- I borrowed from instructions that others have provided, particularly Tony. Again, I thank him for taking the time to write what he did.
- Oh, and as a note... I am not trying to supercede what has been done before, just offering a way to build upon and simplify things based on what has already been provided, especially for those who want to apply this to larger setups. This is not, in any way, a one-size-fits-all solution.
 

Members online

No members online now.

Forum statistics

Threads
26,696
Messages
174,453
Members
20,265
Latest member
irenelanda64
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top