07. Testing

    Table of contents

    Testing

    Once Noojee Fax is up and running you will want to do a few basic tests to ensure that it is operating correctly.

    Firstly check the Noojee Fax logs for any errors.

    The Noojee Fax installation includes a testing jar (test/NoojeeTest.jar) which contains a simple test application which is designed to connect to an SMTP Gateway and send a test message.
    I recommend that you run Noojee Fax from a console during the initial phase of testing as it makes it easier to observe any errors as they happen Once you have completed a round of testing with Noojee Fax running from the console you can then retest it with Noojee Fax running as a daemon.
    Alternatively you can just run Noojee Fax as a daemon and use the *nix 'tail' command to view the log file (logs/asterfax.log) under the Noojee fax install directory.

    The test application can be found in the 'test' subdirectory where you installed Noojee Fax to (usually '/usr/lib/Noojee fax/test').
    The test directory is designed to allow you to run tests from the local machine but to also copy the test directory to another machine in order do remote testing. In either case you must run the test with the working directory set to the test directory.

    Test setup
    During testing it can help if you monitor the Asterisk logs files as this can sometimes provide some insite into what is occuring.
    To monitor the logs run the following command from the command prompt:

    tail -f /var/log/asterisk/full

    Your run the tests by using the supplied script test/test.sh.

    Test 1
    Start by running a test on the same machine as the Noojee Fax gateway.

    cd /usr/lib/Noojee fax/test
    ./test.sh  <Your email address> <fax no@fax.local>

    e.g.
    ./test.sh fred@somedomain.com.au 5551234@fax.local
    The test application takes two mandatory and two optional parameters:

    <From Address> - mandatory - the email address to send error messages to.
    <Fax Number> -  mandatory - the phone number @faxlocal to send the fax to.
    <Host> - optional - default localhost
    <port> - optional - default 25

    Running the test should tell you whether the Noojee Fax Gateway is responding correctly.
    Check the Noojee Fax logs (logs/noojeefax.log) for any errors.

    Test 2
    Next copy the entire test directory to another machine and repeat the test. In this case you will need to supply the phone number and host.
    Check the Noojee Fax logs (logs/noojeefax.log) for any errors.

    Test 3
    If that works then perform a test using a standard  mail client.
    Depending on how you have configured Noojee Fax to run you may or may not need to change the email clients configuration.
    Refer here for details.
    You can now use your mail client to send a fax directly to Noojee Fax. Simply compose a standard email message and set the To address as described above.
    Check the Noojee Fax logs (logs/noojeefax.log) for any errors.

    Test 4
    If that works its time to try sending a PDF. Once again compose an email using your standard email client and this time attach a PDF file.
    Note: the body of your message will be ignored.
    Check the Noojee Fax logs  (logs/noojeefax.log) for any errors.

    If the PDF fails to send then you probably have a problem with ghost script.
    Check the Noojee Fax logs  (logs/noojeefax.log) for any errors.

    Test 5 Using your standard email client again send another email message this time attaching one of the supported file attachment types such as MS-Word or OpenOffice Write. You should repeat this test for each of the file types you want to use within your organization.
    Check the Noojee Fax logs (logs/noojeefax.log) for any errors. If you need more instructions refer to the Installation instructions .

    And finally:
    Check the Noojee Fax logs (logs/noojeefax.log) for any errors. Yes I know I'm repeating myself but some things just need to be repeated :)
    Check the Noojee Fax logs (logs/noojeefax.log) for any errors.

    Noojee Fax won't send a fax If you have tried all of the above testing I'm not certain that your problem is an Noojee Fax problem as opposed to an Asterisk problem. So I would like you to try a couple of things to isolate the issue. 
    In case you aren't aware Asterisk supports what are referred to call files (sorry if I'm teaching to suck eggs but I prefer not to make assumptions about peoples knowledge levels). 
    A call file is a simple text file which can be used to instruct Asterisk to dial a number. 
    The call file (once created) is copied into the asterisk outgoing spool (usually /var/spool/asterisk/spool). Note don't create the file in this directory, you must used the supplied script test/call files/call.sh.
    The script copies the files and sets the permissions on the files so that asterisk has access to them. 
    The script assumes that asterisk has been installed under an account call asterisk. 
    The test script take a single argument which is the name of the call file. 
    You will also need to set the execute permission on the script file by executing: 
    chmod a+x call.sh 


    Test setup Start by making the call script executable by running:
    cd /usr/lib/noojeefax/test/call files
    chmod a+x call.sh

    Test 1 Make a simple call from a SIP phone to your land line.
    You will need to start by editing the call file test/call files/sip-to-external.call.
    The sample call file looks like this:
    Channel: Zap/1/5551234
    MaxRetries: 3
    RetryTime: 40
    WaitTime: 25
    Context: from-internal
    Extension: 2000
    Priority: 1

    Line 1 contains the Asterisk channel to use Zap/1 and the phone number to dial 5551234. You need to change both of these values to suit you configuration. I would recommend changing the phone number to you desk phone so that you can here it ring. If you pick it up you should here a standard Asterisk message telling that the person at extension xxx is busy.
    Line 6 contains the extension number of the SIP phone you need to change this to a valid extension number.

    run the script by typing the following at the command prompt:
    cd /usr/lib/noojeefax/test/call files
    ./call.sh sip-to-external.call

    Test 2
    The second call file fax-to-external.call.

    Channel:Zap/1/5551234
    MaxRetries: 0
    WaitTime: 20
    Priority: 1
    Application:txfax
    Data:/usr/lib/noojeefax/test/attachments/testpage.tif|caller
    Context: from-internal

    Again you will need to change the Channel and phone number to suite your configuration. Obviously the phone number you select should have a fax attached. Note: it is some times useful to set the phone number to your desk phone and answer the call. You can then hear if the fax tones are being played. In this sample there is no extension instead we are going to run the Application txfax to send an actual fax.

    run the script by typing the following at the command prompt:
    cd /usr/lib/noojeefax/test/call files
    ./call.sh fax-to-external.call

    If all of that fails they please make a copy of config/Noojee Fax.xml, logs/noojeefax.log, and the Asterisk log files and post them to the Noojee Fax forums along with any other relevant details and either myself or one of the other experienced Noojee Fax users will assist you in getting Noojee Fax working.

    Tag page (Edit tags)
    • No tags
    Page statistics
    1183 view(s), 3 edit(s), and 8212 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments