1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.
  4. Critical FreePBX vulnerability! Update your server immediately. Details here.

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

Discussion in 'Add-On Install Instructions' started by tshif, Mar 4, 2009.

  1. tshif Guru

    Foreword from Joe Roper
    This script was created by Joe Roper for a recent project - which he then modified for use with PBXIAF.
    ===================================

    Installation and Configuration of HylaFAX and AvantFax for Basic Fax Services on PBXIAF.

    I suppose faxes are one of the things I consider to be a “necessary evil”. In this day and age, there’s a lot of better ways to move documents around than pushing paper through a fax machine. But a lot of individuals and even more businesses can’t seem to break the fax habit. So much in fact that faxing must be in the top three requested functions of a pbx.

    But reliable faxing via PBX – especially with any degree of ease of use, has proven somewhat elusive. Right here in the forums, you can find information covering at least two different sets of software and methodologies for faxing with your PBX.

    And yet – there are still more alternatives for us to explore! Aren’t choices grand?

    HylaFAX and AvantFax
    Among the fax software available for free use, one of the most recognized and supported programs is Hylafax. HylaFAX is considered to be a robust system capable of handling multiple modems and a heavy traffic load – while not being so complex and cumbersome as to make it undesirable for the smaller installation.

    AvantFax web based software allows for immediate and easy access to the fax server via web interface – without ever having to install a fax client on the user’s machine.

    The combination includes everything needed for a complete solution – able to send and receive faxes – that’s simple enough for the home user, and robust enough for the enterprise.

    But Great Zeus – getting the HylaFax and AvantFax software to install and operate – well lets say it’s not a job for the rushed, or timid.

    The good news is forum friend and guru Joe Roper has just blown the doors off by releasing a completely open source installation script that gets these two programs working with great results on our PBXIAF boxes!

    Prerequisites / Notices
    We believe that this solution will co exist with Ward's Fax program, as they use very different methodologies to send and receive faxes; although this has not been thoroughly tested. However, it may not be compatible with other fax experiments you may have performed – so any such previous systems should be removed before attempting to install this solution.

    This installation script has been adapted specifically for PBXIAF by Joe Roper – and has not been tested on any other distribution. In the spirit of Open Software being “open”, the scripts are not compiled, nor are contents obfuscated in any way. You are free to open it, read it, change it, and make it work in your own environment. It’s also a great learning tool to see how things work “under the hood”.

    That’s not even the best part! The best part is the script completes the installation, and creates most of the configuration items inside FreePBX, usually in less than 5 minutes.

    Installing HylaFax/Avantfax
    Log into your PBX as root (in putty or your favorite program), and execute the following lines:
    Code:
    [FONT=Arial]cd /root[/FONT]
    [FONT=Arial]wget [URL]http://projects.colsolgrp.net/projects/afax/repository/raw/a-fax.sh[/URL] (Link updated 9/22/10) *See Note 1[/FONT]
    [FONT=Arial]chmod +x [COLOR=#2f6084]a-fax.sh[/COLOR] [/FONT]
    [FONT=Arial]./[COLOR=#2f6084]a-fax.sh[/COLOR] [/FONT]
    [FONT=Arial]update-fixes[/FONT]
    
    (Thanks to forum user jack for pointing out we needed to run update-fixes!)
    During the installation, you will be prompted for information several times. Press ENTER and accept the defaults in each case.

    Note1: This link pulls the most current version from SVN, which may be buggy. Previous/released versions can be found here.

    Note2: This fax installation does not require actual modems in any way; Instead, virtual IAX2 modems are configured on the platform. These virtual modems don’t care wheather they are communicating over VoIP, zaptel, or dahdi trunks. They simply use whatever trunks we assign to them.

    Installing HylaFax WebMin Module
    To make final configuration of the fax software painless - we want to install an additional management tool. This will expose more of the configuration settings on the fax server, and allow us to configure in a graphic environment.

    In this case, that tool is a plugin, or module, for the Webmin program.

    If you don’t have WebMin – you can’t use this management tool. WebMin is generally available by Icon from the Admin Menu. If for some reason you don’t see the Icon, you can try going to : http://yourpbx:9001

    Step 1: Download WebMin Module from this location, and save it to your workstation someplace you can find it again - such as your desktop.

    Step 2: Log Into WebMin as root. Form under WebMin, Webmin Configuration, Select WebMin Modules.

    Step 3: Select From uploaded file radio button, and then click the BROWSE button. From the browse dialog box, select the module file you downloaded to your workstation in step 1, above. Finally, click INSTALL MODULE button at the bottom of the page.

    WebMin will inform you of its success after the installation is completed.

    Using HylaFax WebMin Management Module
    The HylaFax webmin module is used primarily to set defaults and other configuration items which or not readily available in a user interface elsewhere.

    Step 1: Log Into WebMin as root. Form under Servers, Select HylafaxServer.

    You will be presented with a list of 4 (virtual) iax modems. Don’t be concerned if they do not show running and idle immediately, you may need to recheck status.

    Step 2: Configuration Options should be reviewed for correctness for your particular PBX installation, starting with General Options.

    General
    Vertical Resolution: If left unselected, will default to regular resolution – which is pretty nasty looking, but faster to send. We decided to make our faxes look their best, so we select HIGH for high resolution faxes. (And wait till you see the amazing quality you are able to send. Never again hear that the fax recipient couldn’t read your fax!) During testing – the quality of sent and received faxes form this system was nothing short of tremendous.

    Like any newly installed program, care should be taken not to over stimulate the new arrival by excessive unnecessary configuration changes. My advice is change only what you must, until you get the system working fully – THEN you can go back and configure it until it doesn’t work any more.

    Make other changes here which you believe are necessary – and click Update.

    IAX Modems
    The software as deployed comes with 4 IAX2 modems preinstalled.

    IAX2 Modems are virtual modems, that work in place of actual physical modems in the system.

    The relationship between the various parts of this solutions are like this:

    Advantfax => hylafax => Modem => asterisk

    The IAX2 modems registered as 4 peers in asterisk. This can be demonstrated by typing IAX2 show peers in the asterisk CLI.

    An important security feature is that the IAX modems do not register with a user name and password, they authenticate based on the IP address that they come from, using the permit and deny statements. This completely prevents anyone surreptitiously connecting to them for purposes of wrong-doing.

    As a result, should you remove an iax2 modem context from the iax_custom.conf file, you must also remove the corresponding IAX modem from /etc/iaxmodem. Failure to do so will cause many thousands of registration attempts per second, forcing your processor utilization through the roof, and your PBX to its knees.

    NOTE: There is no need to remove any of the 4 IAX2 modems from the system – this information is provided as an advisory only.

    The following changes are suggested for each of the 4 IAX virtual modems:

    Area Code = Set to your local area code
    Country code, long distance calls prefix, and international calls prefix: Edit to suit your specific circumstances.
    Fax number = the number you receive faxes on

    The remaining settings should generally be left unchanged.

    See HylaFAX / AvantFax for your PBXIAF! - Part2
  2. tshif Guru

    HylaFAX / AvantFax for your PBXIAF! - Part 2

    HylaFAX / AvantFax for your PBXIAF! - Continued

    After you have made any changes you feel are required, and click UPDATE to save your changes.

    Other configuration changes are outside the scope of this basic installation tutorial.

    When you are done making changes in the webmin, return to the HylaFax Server module main screen, and Stop HylaFAX server, and then Start the HylaFAX Server to assure it adopts your config settings changes.

    We are now done with the basic installation and configuration of the fax software.

    Preparing FreePBX
    FreePBX is definitely on-board with the entire idea of handing faxes. The system can be configured to handle inbound fax on a dedicated DID, or with NVDetect on an inbound trunk shared with voice use. (Or both ways simultaneously if your situation calls for it.) In this discussion, we will configure for use with a dedicated inbound DID.

    Dedicated DID Inbound Faxing
    Of course, we must start by going through all the normal steps to prepare FreePBX for the DID. This article assumes that you have a working trunk, and have tested the DID we will be using for faxing, and that we know its working fine as a regular DID.

    FreePBX - Fax Custom Destination
    In order to provide a path for the inbound fax calls to reach the bank of virtual modems, our install script has already created the following context in extensions_custom.conf:

    [custom-fax-iaxmodem]
    exten => s,1,Dial(IAX2/iax-fax0/${EXTEN})
    exten => s,n,Dial(IAX2/iax-fax1/${EXTEN})
    exten => s,n,Dial(IAX2/iax-fax2/${EXTEN})
    exten => s,n,Dial(IAX2/iax-fax3/${EXTEN})
    exten => s,n,Busy
    exten => s,n,Hangup

    To make this context available as an inbound call destination, the install script has already created a FreePBX custom Destination with the following characteristics:

    Description:Fax (Hylafax)
    Custom Destination: custom-fax-iaxmodem,s,1
    Description: Fax (Hylafax)

    Since the Custom Destination and Dial plan fragment have been created, we now simply point the inbound route for our Fax DID to that special destination, Fax (Hylafax).

    FreePBX Config: Outbound Faxing
    By default, the fax service uses the outbound routes as defined in FreePBX. By default, the first outbound route which matches dial-plan wise, will be selected as the outbound route for the faxes.

    This is probably not the most desirable circumstance; We are very likely going to want to fax out using an analogue line to assure reliability, and that means we need a good way to assure we select the desired trunk for HylaFAX to use, without the users needing to include dial-around codes for trunk selection.

    How do we do that?
    Fortunately, its very simple to do. Our changes will be made from inside FreePBX, using the Config Edit program.

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

    Inside the file extensions_custom.conf, add this to the bottom of the file:-

    [from-fax]
    exten => _x.,1,Dial(ZAP/1/${EXTEN})
    exten => _x.,n,Hangup()

    NOTE: Change the “ZAP/1” to reflect the actual technology and trunk ID that you want the outbound faxes to use. For a legitimate test – to sidestep all the potential issues of VoIP – you really need to use an analog line. Once you have successfully performed inbound and outbound fax testing on an analog trunk, you can begin experimenting with faxing by VoIP (if you must) with the knowledge that your current configuration works!

    A word about Trunks
    The fact of the matter is – faxing via VoIP is often a dicey proposition. The fax protocol is very sensitive to silences, or gaps, in transmission; In VoIP terms, JITTER. Ask 10 techs if fax over VoIP is reliable or even possible, and you will get 10 different answers – not all of them polite J .

    Remember, the virtual IAX modems we use are blind to the type of trunk being used. They work the same weather we have a VoIP, zap, or dahdi trunk.

    I myself have reliably faxed over VoIP, and have also experienced complete failure to fax over VoIP. From personal experience, I know that fax over VoIP trunk can work flawlessly, or be a complete train wreck. There are many, many articles in the forum from folks on both sides of this discussion – those that have been successful, and those that have not.

    One thing however is absolutely true. The fax protocol was designed to be used over analog phone lines, and in general, it works most reliably over analog phone lines.

    During development and testing of this fax solution, we have been very successful faxing in and out over analog lines with the extremely low end and widely disliked X100P FXO board, as well as Digium TDM401 FXO (about $218 plus shipping).

    We have also been 100 percent successful faxing in and out over VoIP trunks – as long as we were faxing to/from a fax service (such as rapidfax.com), and not a destination fax machine on an analog line. VoIP faxes failed uniformly when attempted with a remote fax machine on analog lines. In each case, HylaFax sent messages to the console disparaging excessive jitter. If you are intent upon faxing over VoIP – be very fussy about who you choose as your TSP. Select a company that explicitly supports fax over their VoIP network – and then cross your fingers – for the best possible results.

    Managing AvantFax
    The AvantFax web interface combines administrative access and control with an enterprise grade multi user web interface. To access the ui, go to http://pbxaddress/avantfax

    The default Id/Password is admin/password. You will be forced to change it the first time you login. Do NOT LOSE your new password! Its encrypted in the database.

    Once you have logged in, and arrived at the user interface, you will see something similar to this:

    [IMG]

    Manage Fax Categories
    First – let’s start by creating a fax category for our General inbound fax line. In the upper right hand corner of the AvantFax screen, under the word logout, you should see a little diamond ring looking icon. This takes us to the AvantFax DashBoard, and allows us access to the Drop Down Box. From this drop down box, select Fax Categories.

    Categories are useful for organizing faxes in the AvantFAX Archive. Non administrative users are limited to viewing faxes in the categories assigned to them. In more evolved configurations, this is very useful to provide the HR department, or executive wings with confidential faxes that can not be seen by the general fax using populace.

    Create a category called – General Inbound Faxes. This would be appropriate for the general inbound fax line of a business.

    Fax Administrators Account Settings
    Next – we will finalize the fax administrators account settings. To do that, access to the Drop Down Box, and select User List. At this time, the only user in the system is the AvantFAX Admin. Click on that user name.

    This is the account detail screen for the system super administrator – whom you are currently logged in as. Every user has access to their personal details in this same way when logged into the interface.

    Fill in the blanks for your Fax Administrative user, paying special attention to providing a valid email address, and save your changes. Why? Well this email address field is used by the fax system to send your faxes to you via email – when configured to do so.

    NOTE: You may only use an email address ONCE in AvantFax. You may not assign the same email address to multiple users.

    Company, Location, Voice Number, Fax Number and TSID may be filled in as appropriate for your circumstances.

    Verify / Update the following settings to reflect these values:

    Administrator: Enabled (Checked)
    Super User: Enabled (Checked)
    User can Delete Faxes: Enabled (Checked)
    User can fax from any modem: Enabled (Checked)
    Viewable fax Lines: Select All ttyIAX Modems
    Viewable fax categories: Select ALL categories.

    Don’t forget to save your changes.

    General Inbound Fax Users
    The combination of HylaFAX/Avantfax can be configured in a wide variety of ways, supporting many different approaches to managing faxes. The exact users configurations you create will be determined by how you are using the fax system.

    See HylaFAX / AvantFax for your PBXIAF! - Part 3
  3. tshif Guru

    HylaFAX / AvantFax for your PBXIAF! - Part 3

    HylaFAX / AvantFax for your PBXIAF! - Continued

    Since this fax operates on a dedicated fax DID, we shall assume its more of a business-type of installation. We will assume that when faxes are received by this fax number – there is an individual, or perhaps a group of individuals (administrative assistants for example), who should receive them. Faxes may always be retrieved via web interface as well.

    Fax User Account and Settings
    From the Drop Down Box, select New User.

    Create a new user with the following characteristics:
    Name: Fax user
    Username: fax
    Password: faxuser (or your choice)
    Password expiration cycle: Never
    User can reuse old passwords: Checked (enabled) (Just in case!)
    Email Address: must be unique in the Fax System

    Language, Company, Location, Voice Number, Fax Number and TSID may be filled in as appropriate for your circumstances.

    Administrator: Disabled (unchecked)
    Super User: Disabled (unchecked)
    User can Delete Faxes: Enabled (Checked)
    User can fax from any modem: Enabled (Checked)
    Viewable fax Lines: Select All ttyIAX Modems
    Viewable fax categories: Select ONLY General Inbound Faxes

    General Inbound Faxes is the only category we presently have – but even if we add other categories, this General Fax User account will still only have access to faxes in this category.

    When you are satisfied with the configuration for the new user, save your work.

    Managing Modems & Categories
    We have already created a Category for the General Inbound Faxes, and enabled that category for our General Fax User ID. The last step is to configure the modems to receive faxes into that specific category. To do that, navigate to the Configure, Modems selection in the drop down box.

    For each modem on the list, we want to assign that modem to the General Inbound fax category. For each modem on the list:
    • Select the modem on the list. This populates the Details area in the center of the screen. (The Device and Alias fields should have values.)
    • In the Contact field, enter the email address of the party who is to receive faxes that arrive on this line.
    The Fax system will forward all faxes received by this virtual modem to the email address you enter on this line. If more than one person needs to receive these faxes by email, it will be necessary to create a “distribution” type email address in the customer’s mail system that will forward to all the users who need to receive the faxes via email.
    • Select the General Inbound Faxes category in the Category Drop Down list box.
    • Save your Changes.
    Repeat these 4 steps identically for each of the four virtual modems on the list.

    Inbound Fax Process Review
    When a fax is received, it works something like this:
    1.The inbound fax call arrives at FreePBX via dedicated DID, and is Routed by Inbound Routes to the Custom Destination Fax (Hylafax)
    2.The custom Fax (Hylafax) destination sends the call to the custom context called custom-fax-iaxmodem, which contains all 4 of our virtual modems. The context will receive the fax on the first available virtual modem.
    3.The virtual modem will receive the fax into the Category we specified, and email it to the address specified in the Modem configurations.

    Web based users will be able to see the received fax in the Avantfax inbox because the General fax user ID has been configured to have access to the General Inbound Fax Category.

    It’s Fax Receive Testing Time!
    We have completed the install and basic configuration of the fax for the dedicated DID. Give it a try! Find a fax machine, and send a fax to the DID you assigned.

    It’s entertaining to watch Avantfax receiving the fax in real-time. Be logged into the avantfax ui, and observe the modem status indicators. (The page does NOT auto-refresh). You will see the fax come in, be recognized, and processed, and then hang up. Watching the process from the Asterisk CLI is also most entertaining and educational – as well as being the first place to go should you need to trouble shoot your fax system.

    In your web browser, navigate to the Avantfax inbox – and take a look at the fax. If your luck is anything like mine, the fax is amazingly clear and paginated perfectly. I have yet to send a fax with this system that didn’t have great clarity and readability.

    It’s Fax SEND Testing Time!
    We have also already done the configuration needed to send faxes, let’s test that also. In the Avantfax web ui, navigate to outbox, and select SEND.

    Explore the web interface – its very straightforward. You enter the fax destination phone number, and browse to your source document. Source documents must be PDF files, TXT files, Or TIFF ONLY. When you have finished filling out the send fax form, Click on SEND.

    Again, it’s interesting to watch the progress in the Asterisk CLI or in the Avantfax dashboard.

    Once you have successfully completed the above testing – you are done with the complete configuration! Congratulations! But DON’T stop reading just yet. You’ll miss out on one of the coolest abilities the system has to offer!

    Fax Work Flow
    One of the most important things about deploying any new technology, fax servers included, is getting the end user comfortable and successful in its use.

    While the more technical person among us may have no problems providing PDF files for the fax server to send – the average person may be bamboozeled at having to first creating a PDF file, then opening the Avantfax web ui, and uploading the PDF for faxing. We need something better, simpler, more intuitive.

    Exciting Print-to-Fax Capabilities
    We all know what we want. We want the end user to be able to print, from any windows application, directly to the fax server. No intermediate steps, no need to create a PDF. Just open your word processor, spreadsheet, or any other windows application, and print your document to the fax server. Well – OK. Let’s set that up now!

    First, download the Winprint HylaFAX driver From here, and save it to your workstation someplace you can find it again - such as your desktop.

    Like any printer driver, you must be logged into Windows as an administrator to install it.

    Preparing “Print to Fax” Function
    Locate the program you saved to your desktop, and double click it to start the installation. Follow all the prompts, and perform a default install.

    When complete, your system will have support for a new port type, called a "WinPrint HylaFAX Port."

    Installing the “Print to Fax” Program
    Configuration is not difficult, but there are several steps.

    1. On the Windows workstation, in Printers and Faxes, select “Add A Printer”.

    [IMG]

    2.Select "Local Printer", and uncheck the "Automatically detect and install my Plug and Play printer" box.

    [IMG]

    3.On the “Select a Printer Port” screen, select the radio button "create a new port type." You should see "Winprint Hylafax" as one of the options, normally found at the bottom of the list. (If it doesn't appear on the list at all, something went wrong with your installation.).


    [IMG]


    4.Next, a box will pop up for you to name the port. Accept the default name.

    [IMG]

    5.Next, select the printer type. The author recommends that we use the Apple LaserWriter 12/640 PS.

    [IMG]

    6. You can name the printer anything you want – but the name should make it obvious to the end user that its going to a “fax machine”.

    Do NOT select the printer as the default, unless that really makes sense for this windows workstation.

    When asked, Do not share the printer. Don't print a test page, we are not done configuring the printer yet.

    Configuring the “Print to Fax” Printer
    [FONT=&quot]In Windows, go to the Printers and Faxes (Windows XP) folder. Locate, and right click on the WinPrint HylaFAX Printer, and select PROPERTIES. Then select the PORTS tab[/FONT].

    [IMG]

    Click on the CONFIGURE PORTS button.

    [IMG]


    See HylaFAX / AvantFax for your PBXIAF! - Part 4
  4. tshif Guru

    HylaFAX / AvantFax for your PBXIAF! - Part 4

    HylaFAX / AvantFax for your PBXIAF! - Continued

    Configure with the following characteristics:
    HylaFAX Server Address: The IP or internal (not public) FQDN of your PBX
    Username: fax
    Password: faxuser
    Default Notify: the email address for which to send success, fail, and fax resubmitted email advisories. Usualy the email address of the workstations user.
    Modem: Leave BLANK
    Address Book Directory: Any location you wish; Local Hard drive is recommended, but mapped network drive space works also. The user logged into the Windows workstation must have read and write permissions to this location.
    Page Size: Usually US Letter
    Notification: As desired.

    Click OK to save your settings.

    Preparing the Firewall: Iptables
    In order to allow the Winprint HylaFAX program to reach the PBX from any workstation on the local subnet, we need to execute a command similar to this (from putty or your favorite tool):
    (This firewall rule was updated 3/6/09 10:30 AM)
    iptables -A INPUT -p tcp -m tcp -s 192.168.1.0/255.255.255.0 -j ACCEPT
    service iptables save
    service iptables restart

    Change the “ 192.168.1.0/255.255.255.0” to reflect your actual network subnet and subnet mask.

    It should be possible to tighten this iptable rule further by specifying which ports to open, but we have as yet been unable to determine which ports are used by the Winprint driver.

    You are now ready to test the Fax Print Driver.

    Testing the Print to Fax Function
    Any print job sent to this printer (even a Printer Test Page) will raise this dialog box:

    [IMG]


    The FAX number is completely unedited and unverified. You should enter the destination telephone number in the same format required by the outbound trunk in FreePBX.
    If you click on SAVE NUMBER, the number entered will be added to this workstations’ Fax Address Book. If this is the first number you have added, the Fax Address Book will be created in the location you specified when you installed the printer driver (Address Book Directory).
    You may enter a Notification email address other than the default if you have special needs for a particular fax.
    Clicking SEND will submit your fax to the fax Server. Within a second or two of clicking the SEND button, you should get a very small confirmation dialog box stating that the Fax has been submitted, and providing you with a job number. Be alert, sometimes this dialog box ends up behind other windows on the screen.

    Once you have received the confirmation dialog box, you should be able to monitor the fax status via the Avantfax web interface.
    Job Done!
    If there is enough interest, in the future we will put up more articles discussing more configuration options, and ways to create Private “departmental” faxes, and even use NVDetect to allow Faxes to share a regular extension line.

    Untill next time -
    tshif
  5. jpe Member

    I ran the installer and all went well, so far. Installing the webmin module gave a hiccup uploading from my dektop, so I used the 'install from http' option.

    Here is a link to MacHylaFax for us Mac users.

    I have run out of time, so I can't test it all.

    Thanks tshif

    bbl - JPE
  6. tshif Guru

    JPE;
    Totaly cool of you for posting the MacHylaFax link. I didn't know it was out there - its great that you found a solution to get all the great Mac users out there able to use the system to!
  7. martymoose New Member

    BLOODY RIPPER
    +1 For the thread to be a sticky
  8. nsumner New Member

    My one question on all of these fax solutions is we currently pay for a fax-email solution. The provider of our PRI will gladly give me tons of DIDs for free.

    That means I could assign say 555-1001 to me, 555-1002 to John, and 555-1003 to Sam.

    Obviously I then want these faxes to go to the users (and likely get deleted from the web interface after they are sent, or say every 2 weeks or soemthing).

    Can this be done?
  9. jroper Guru

    Hi

    Yes all of that can be configured without too much difficulty.

    I'm looking at some resource Philippe Lindeheimer has given me to incorporporate the extensions and the faxes facility together so you can use a shared DID for both FAX and personal DID.

    You could leave the faxes in Avantfax, as it has the facility to search on key words you give them, and to assign them ID numbers which may link in with your existing systems.

    You can of course archive and delete.

    There is also a facility to email the fax to you or someone else in avantfax, then of course you can delete it.

    Clearly, not only can you see the fax on the online viewer, but you can download it to your desktop as well.

    All in all, its a very nice business class solution.

    There is lots more documentation at www.avantfax.com, in particular, here http://www.avantfax.com/document-management.php

    Joe
  10. Speedy2k New Member

    I have installed Hylafax with the information you gav on this post and all went well, the only problem i got, is the IAX modem doesn't answer my call, here is the log from asterisk,

    Code:
    [2009-03-05 12:43:28] VERBOSE[4888] logger.c: -- Starting simple switch on 'Zap/1-1'
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:1] NoOp("Zap/1-1", "Entering from-zaptel with DID == ") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:2] Ringing("Zap/1-1", "") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:3] Set("Zap/1-1", "DID=s") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:4] NoOp("Zap/1-1", "DID is now s") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:5] GotoIf("Zap/1-1", "1?zapok:notzap") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Goto (from-zaptel,s,8)
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:8] NoOp("Zap/1-1", "Is a Zaptel Channel") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:9] Set("Zap/1-1", "CHAN=1-1") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:10] Set("Zap/1-1", "CHAN=1") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@from-zaptel:11] Macro("Zap/1-1", "from-zaptel-1|s|1") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@macro-from-zaptel-1:1] NoOp("Zap/1-1", "Entering macro-from-zaptel-1 with DID = s and setting to: 5147357641") in new stack
    [2009-03-05 12:43:29] DEBUG[4888] app_macro.c: Executed application: Noop
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@macro-from-zaptel-1:2] Set("Zap/1-1", "__FROM_DID=5147357641") in new stack
    [2009-03-05 12:43:29] DEBUG[4888] app_macro.c: Executed application: Set
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@macro-from-zaptel-1:3] Goto("Zap/1-1", "from-trunk|5147357641|1") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Goto (from-trunk,5147357641,1)
    [2009-03-05 12:43:29] DEBUG[4888] app_macro.c: Executed application: Goto
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: == Channel 'Zap/1-1' jumping out of macro 'from-zaptel-1'
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [5147357641@from-trunk:1] Set("Zap/1-1", "__FROM_DID=5147357641") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [5147357641@from-trunk:2] Gosub("Zap/1-1", "app-blacklist-check|s|1") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@app-blacklist-check:1] LookupBlacklist("Zap/1-1", "") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@app-blacklist-check:2] GotoIf("Zap/1-1", "0?blacklisted") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@app-blacklist-check:3] Return("Zap/1-1", "") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [5147357641@from-trunk:3] ExecIf("Zap/1-1", "1 |Set|CALLERID(name)=8199931177") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [5147357641@from-trunk:4] Set("Zap/1-1", "__CALLINGPRES_SV=allowed_not_screened") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [5147357641@from-trunk:5] SetCallerPres("Zap/1-1", "allowed_not_screened") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [5147357641@from-trunk:6] Goto("Zap/1-1", "custom-fax-iaxmodem|s|1") in new stack
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Goto (custom-fax-iaxmodem,s,1)
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Executing [s@custom-fax-iaxmodem:1] Dial("Zap/1-1", "IAX2/iax-fax0/s") in new stack
    [2009-03-05 12:43:29] DEBUG[4888] chan_iax2.c: prepending 4 to prefs
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- Called iax-fax0/s
    [2009-03-05 12:43:29] VERBOSE[3357] logger.c: -- Call accepted by 127.0.0.1 (format ulaw)
    [2009-03-05 12:43:29] VERBOSE[3357] logger.c: -- Format for call is ulaw
    [2009-03-05 12:43:29] VERBOSE[4888] logger.c: -- IAX2/iax-fax0-8414 is ringing
    [2009-03-05 12:44:06] VERBOSE[4888] logger.c: -- Hungup 'IAX2/iax-fax0-8414'
    [2009-03-05 12:44:06] VERBOSE[4888] logger.c: == Spawn extension (custom-fax-iaxmodem, s, 1) exited non-zero on 'Zap/1-1'
    [2009-03-05 12:44:06] VERBOSE[4888] logger.c: -- Hungup 'Zap/1-1'
    
    And when i log into the Avantfax web gui, i don't see the state of any modem cange like ringing or something, i don't understand what is really happening there? some help would be really welcome on this one thanx!
  11. jroper Guru

    Hi


    The way this works is that the call goes from ASterisk to IAXModem, the IAXModem to Hylafax.

    You need to be looking at the Hylafax to IAX modem link, everything is fine up to there.

    This could be the tones are not being set or received. The Hylafax logs should give you more information. I think they are in /var/log

    Joe
  12. Speedy2k New Member

    Here is the log i got from: iaxmodem-cfg.ttyIAX0

    Code:
    [2009-03-05 07:08:08] Registration failed.
    [2009-03-05 07:13:07] Terminating on signal 15...
    [2009-03-05 07:14:46] Registration failed.
    .......
    [2009-03-05 09:07:43] Registration failed.
    [2009-03-05 09:08:36] Terminating on signal 15...
    [2009-03-05 09:10:14] Registration failed.
    .......
    [2009-03-05 09:29:46] Registration failed.
    [2009-03-05 09:35:17] Registration timed out.
    ........
    [2009-03-05 09:50:02] Registration timed out.
    [2009-03-05 09:54:21] Registration failed.
    .......
    [2009-03-05 10:23:51] Registration failed.
    [2009-03-05 10:26:52] Terminating on signal 15...
    [2009-03-05 10:28:32] Registration failed.
    .......
    [2009-03-05 11:07:44] Registration failed.
    [2009-03-05 11:12:05] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    ..........
    [2009-03-05 11:25:24] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    [2009-03-05 11:25:41] Terminating on signal 15...
    [2009-03-05 11:27:23] Registration failed.
    [2009-03-05 11:32:10] Registration failed.
    [2009-03-05 11:32:18] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    [2009-03-05 11:32:23] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    [2009-03-05 11:32:28] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    [2009-03-05 11:37:05] Registration failed.
    ..........
    [2009-03-05 12:16:25] Registration failed.
    [2009-03-05 12:18:54] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    .......
    [2009-03-05 12:43:49] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    .............
    [2009-03-05 12:48:11] Unable to pass the full buffer onto the device file. 2015 bytes of 2052 written: Resource temporarily unavailable
    [2009-03-05 12:50:50] Registration failed.
    .........
    [2009-03-05 14:29:10] Registration failed.
    
    And here is the one from: iaxmodem

    Code:
    [2009-03-05 06:58:18] Modem started
    [2009-03-05 06:58:18] Modem started
    [2009-03-05 06:58:18] Modem started
    [2009-03-05 06:58:18] Modem started
    [2009-03-05 07:13:07] Terminating...
    [2009-03-05 07:13:07] iaxmodem process 28377 ended, status 0xF
    [2009-03-05 07:13:07] iaxmodem process 28378 ended, status 0xF
    [2009-03-05 07:13:07] iaxmodem process 28379 ended, status 0xF
    [2009-03-05 07:13:07] iaxmodem process 28380 ended, status 0xF
    [2009-03-05 07:14:38] Modem started
    [2009-03-05 07:14:38] Modem started
    [2009-03-05 07:14:38] Modem started
    [2009-03-05 07:14:38] Modem started
    [2009-03-05 09:08:36] Terminating...
    [2009-03-05 09:08:36] iaxmodem process 2873 ended, status 0xF
    [2009-03-05 09:08:36] iaxmodem process 2874 ended, status 0xF
    [2009-03-05 09:08:36] iaxmodem process 2875 ended, status 0xF
    [2009-03-05 09:08:36] iaxmodem process 2876 ended, status 0xF
    [2009-03-05 09:10:06] Modem started
    [2009-03-05 09:10:06] Modem started
    [2009-03-05 09:10:06] Modem started
    [2009-03-05 09:10:06] Modem started
    [2009-03-05 10:26:52] Terminating...
    [2009-03-05 10:26:52] iaxmodem process 2849 ended, status 0xF
    [2009-03-05 10:26:52] iaxmodem process 2850 ended, status 0xF
    [2009-03-05 10:26:52] iaxmodem process 2851 ended, status 0xF
    [2009-03-05 10:26:52] iaxmodem process 2852 ended, status 0xF
    [2009-03-05 10:28:24] Modem started
    [2009-03-05 10:28:24] Modem started
    [2009-03-05 10:28:24] Modem started
    [2009-03-05 10:28:24] Modem started
    [2009-03-05 11:25:41] Terminating...
    [2009-03-05 11:25:41] iaxmodem process 2847 ended, status 0xF
    [2009-03-05 11:25:41] iaxmodem process 2848 ended, status 0xF
    [2009-03-05 11:25:41] iaxmodem process 2849 ended, status 0xF
    [2009-03-05 11:25:41] iaxmodem process 2850 ended, status 0xF
    [2009-03-05 11:27:15] Modem started
    [2009-03-05 11:27:15] Modem started
    [2009-03-05 11:27:15] Modem started
    [2009-03-05 11:27:15] Modem started
    

    Do you know what can be the problem????
  13. gomonn Member

    Sorry, did not go through all the details, my question is "can this be tied to a MS Sharepoint server ?" (fax delivered to Sharepoint web page)

    Thanks!
  14. jroper Guru

    Hi

    this is probably a question better asked of the Hylafax / Avantfax team.

    Hylafax and Avantfax do not have to be installed on the Asterisk box, they can be configured as a standalone fax server using either Asterisk to deliver the calls via IAXMODEM and a erygood network connection (Good like crossover cable) or using Fax modems or brooktrout fax boards for faxing.

    Joe
  15. Speedy2k New Member

    A little update on my problem, i have try to send fax with Hylafax and it seems to work pretty well, but i still have the registration problem, like the log i got if someone can help me on this one, i would really like to make it work, this is a really nice add-on
    Thanx a lot!
  16. tshif Guru

    Try temporarily directing the zap line to one of your extensions, and make sure you can receive an inbound call on it that way. If not, theres no chance that faxing can work.
  17. Speedy2k New Member

    Yes, when i redirect the Zap FXO to my Zap FXS with the fax plugged in, there is no problem, it seems then the iaxmodem doesn't register with the PBX, does it need a register:xxxxxxx:xxxxx@127.0.0.1 line ??? i got a registration failure in my log from theiax mdem, but i can send from them??

    Thanx!
  18. mp1111 Member

    re Avantfax

    same issue here, except I don't have a card.... so i modified this line
    [from-fax]
    exten => _x.,1,Dial(ZAP/1/${EXTEN})
    exten => _x.,n,Hangup()

    to this
    [from-fax]
    exten => _x.,1,Dial(my_trunk/${EXTEN})
    exten => _x.,n,Hangup()

    when i try to send fax from the webpage there error says no dialtone.


    i have also the registration issue altough i've verified this:
    <snip
    An important security feature is that the IAX modems do not register with a user name and password, they authenticate based on the IP address that they come from, using the permit and deny statements. This completely prevents anyone surreptitiously connecting to them for purposes of wrong-doing.

    As a result, should you remove an iax2 modem context from the iax_custom.conf file, you must also remove the corresponding IAX modem from /etc/iaxmodem. Failure to do so will cause many thousands of registration attempts per second, forcing your processor utilization through the roof, and your PBX to its knees.


    NOTE: There is no need to remove any of the 4 IAX2 modems from the system – this information is provided as an advisory only
    snip>>

    can someone help?
  19. jroper Guru

    Hi

    If you don't have a ZAP card, then there is no need to force the outbound call via that custom channel. It will simply go out via Outbound routes, like any other call.

    You only need that to force the call out of a particular trunk.

    iax2 show peers at the asterisk CLI should confirm that your IAX modems are registered.

    You need to treat the IAX modems just like any other extension, because that's all they are.

    Joe
  20. tshif Guru

    :iagree: We only need to change the
    [from-fax]
    exten => _x.,1,Dial(my_trunk/${EXTEN})
    exten => _x.,n,Hangup()

    If we want control over which trunk is used. As Joe says, otherwise the normal outbound trunk logic is used.

    It seems that you may have a syntax error:
    exten => _x.,1,Dial(my_trunk/${EXTEN})

    Should be:
    exten => _x.,1,Dial(trunk technology/my_trunk_name/${EXTEN})

    You can select any trunk in this way.

    Tony

Share This Page