FreePBX 2.7: Fax For Asterisk Setup

RonRussell

Guru
Joined
Mar 22, 2008
Messages
112
Reaction score
4
Ward, Thanks a bunch for all that you and the PBIAF team do. As soon as I finish this post, I will paypal a contribution. But, back to my question. I will try installing with the Orgasmatron installer instead of the ISO and hopefully that gets fax working. Thanks again.
 
Joined
Dec 13, 2007
Messages
59
Reaction score
1
Even after reinstalling RxFax and required dependencies it still does not take over the call :(
MyKroFt,

have you had any luck getting your rxfax to work at this point? From the trace you provided, it appears that "everything on the FreePBX side" worked as it should as the call was delivered to rxfax which takes it out of our control until it returns from rxfax at which point we take it over for routing. The error message displayed and elapsed time to get to that error message seems to imply something is not going right with the actual faxing process itself, so if you are still having issues, did you change anything else? Upgrade Asterisk, run any piaf updates, etc?

Ron,
have you managed to get nv_fax installed on your build? From what you had described it sounds like the module was appropriately detecting you did not have it installed thus disabling that option. I can understand the confusion though, seems like we could have a status area in the fax module page that shows what is installed for detection as well as reception to help understand why some options may not be available. That would be a good feature request to send our way so the thought does not get lost. If you still run into problems once it is installed, it would be really helpful to file a ticket and show us what the CLI shows as installed , "module show like fax" should show all relevant modules. It's possible, if someone were to change the name of the module, that the code may not detect it so we need would need to see what it is called where the problem is.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
Should look like this:

pbx*CLI> module show like fax
Module Description Use Count
app_nv_faxdetect.so Newman's fax detection application 0
app_rxfax.so Trivial FAX Receive Application 0
app_txfax.so Trivial FAX Transmit Application 0
3 modules loaded


You might also want to look at some of the tips in our Best of Nerd Vittles tutorial.
 
Joined
Dec 13, 2007
Messages
59
Reaction score
1
pbx*CLI> module show like fax
Module Description Use Count
app_nv_faxdetect.so Newman's fax detection application 0
app_rxfax.so Trivial FAX Receive Application 0
app_txfax.so Trivial FAX Transmit Application 0
3 modules loaded
That is correct, it is picked up by this:

PHP:
$response = $astman->send_request('Command', array('Command' => $module_show_command.'app_nv_faxdetect'));
$fax['nvfax']= preg_match('/[1-9] modules loaded/', $response['data']) ? true : false;
which translated says that if we find at least 1 (and up to 9...) modules loaded, then nvfax detect is loaded.

This is used to decide whether you can choose that option and thus whether it is disabled or not:
PHP:
$html.='<option value="nvfax"'.($fax['detection'] == 'nvfax' ? 'SELECTED' : '').($fax_detect['nvfax']?'':'disabled').'>'. _("NVFax").'</option>';
In the past, we just let you choose it regardless, and thus let you crash and burn by that choice if there was not nvfax installed as Asterisk would try to execute a non-existent instruction.
 

RonRussell

Guru
Joined
Mar 22, 2008
Messages
112
Reaction score
4
On my system described earlier in this post I get this:

pbx*CLI> module show like fax
Module Description Use Count
0 modules loaded

I have not had a chance to install a new system using Orgasmatron.
 
Joined
Dec 13, 2007
Messages
59
Reaction score
1
Ron,

that would definitely explain why FreePBX is doing what it is doing and probably not generating any of the dialplan either since there are no fax modules to receive it.

Now it would be nice to see what MyKroFt comes back with. So far it looks like the new module is doing everything is should, though being software and given the size of the test matrix, I'm sure there are undiscovered bugs still hiding in there.:D

Btw - if no one ever picked up on it, it was no accident that the original feature code number of 666 was chosen to call the system fax:devil:.
 

AGUJMCHALE

New Member
Joined
Sep 29, 2009
Messages
7
Reaction score
0
sorry for getting to the party late as always, but is there a fix for the FAX issue...have a same scenario.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
Code:
pbxrena*CLI> module show like fax
Module                         Description                              Use Count 
app_txfax.so                   Trivial FAX Transmit Application         0         
app_nv_faxdetect.so            Newman's fax detection application       0         
app_rxfax.so                   Trivial FAX Receive Application          0         
3 modules loaded
pbxrena*CLI>
they are loaded

here is what is really interesting and I will paste log from it also when i get to work here shortly

I installed FFA, 1 free license installed everything looks ok according to the install readme

but FFA does the same thing and RxFax - it never takes over the call and all you keep hearing is asterisk sending out the ringing when it starts listening for a fax. FFA eventually times out as well.... :idea:
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
On my system described earlier in this post I get this:

pbx*CLI> module show like fax
Module Description Use Count
0 modules loaded

I have not had a chance to install a new system using Orgasmatron.

Just follow instructions from the NV article Ward posted above - download the fax.pbx script file, run it - and it will install everything in less than 5 min

Myk
 
Joined
Dec 13, 2007
Messages
59
Reaction score
1
Code:
pbxrena*CLI> module show like fax
Module                         Description                              Use Count 
app_txfax.so                   Trivial FAX Transmit Application         0         
app_nv_faxdetect.so            Newman's fax detection application       0         
app_rxfax.so                   Trivial FAX Receive Application          0         
3 modules loaded
pbxrena*CLI>
they are loaded

here is what is really interesting and I will paste log from it also when i get to work here shortly

I installed FFA, 1 free license installed everything looks ok according to the install readme

but FFA does the same thing and RxFax - it never takes over the call and all you keep hearing is asterisk sending out the ringing when it starts listening for a fax. FFA eventually times out as well.... :idea:
MyKroFt,
it was pretty clear from your original trace that they were all loaded. However that trace plus your new information points to something else on your system inhibiting your ability to receive the fax. Bad phone line, incompatible fax machine sending the fax, something similar. Given that you have the same problem with spandsp and FFA, it most likely rules out any yum update or change that PIAF may have done.

In your original post, rxfax had taken control. That it's "in the hands of Asterisk/spandsp" until it returns from that application and our dialplan can take it over. It is failing in that application and from your description failing in FFA as well.

Try with a different fax machine or by changing some other variable to see if you get any further.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
Your not following what I am saying - BOTH RxFax and FFA are executed - but do not take over the phone line (zap) - ex they don't send out the answering fax tones for the fax machine to see.

and Asterisk continues to send the fake ringing. Did 2.7 upgrade or modify spandsp maybe? Current verison isntalled is spandsp-0.0.4-9.pre15

This all started with the update to 2.7 - I can't go back because I need/want the backup module abilities....
 
Joined
Dec 13, 2007
Messages
59
Reaction score
1
FreePBX doesn't touch any Asterisk modules, not nv_fax, not spandsp, not rxfax, not app_fax, etc. Those are all in the PIAF domain or one of Ward's tutorials and install scripts.

can you try the following, I think I see what might be the issue (though if this is the issue, it baffles me why it is working on a bunch of other system):

in your dialplan in ext-fax (in extensions_additional.conf), can you make the following change. Currently it should look something like this:
Code:
exten => s,1,Macro(user-callerid,)
exten => s,n,Noop(Receiving Fax for: ${FAX_RX_EMAIL} , From: ${CALLERID(all)})
exten => s,n(receivefax),ReceiveFAX(${ASTSPOOLDIR}/fax/${UNIQUEID}.tif)
can you change that to the following (the crux is the addition of StopPlayTones):
Code:
exten => s,1,Macro(user-callerid,)
exten => s,n,Noop(Receiving Fax for: ${FAX_RX_EMAIL} , From: ${CALLERID(all)})
exten => s,n(receivefax),StopPlayTones
exten => s,n,ReceiveFAX(${ASTSPOOLDIR}/fax/${UNIQUEID}.tif)
If that gets you working, can you make sure to go file a bug on our tracker so that it is picked up as soon as possible and attended to? (The tracker informs us of new bugs, this forum I have to come and check on which doesn't happen for hours to days often...)

thanks for checking on that.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
That fixed it!!!

RxFax took right after after the

exten => s,n(receivefax),StopPlayTones

line and received it like a champ. Heading over to the bug tracker now

Thank you!

Myk
 
Joined
Dec 13, 2007
Messages
59
Reaction score
1
MyKroFt,

I'm really glad it's up and working for you, and thanks for the testing. Btw, since you indicated you pulled 2.7 because of the backup, please make sure to report anything back to FreePBX that you may find. Backup is one of those areas where the bugs are not reported until it is too late, so hopefully you have done some testing.

So ... it looks like either you hit one of those ~31 combinations that we have not been able to test, or I was grossly underestimating the test matrix because I forgot to multiply those 31 times the number of different cards on the market:cryin:. (Well that's a bit of an exageration since some of those 31 do not involve zap or dahdi, but it still would end up increasing the test matrix significantly, into the hundreds and maybe even thousands!).

In either case, all I can say is this was a good old fashion "equal opportunity software bug" that clearly did not discriminate between FFA or spanddsp. So much for conspiracy theories:cool2b:...
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
Glad I was able to help in a small way. Would have never found it if I would have not been faxing from my laptop with the speaker monitor on until connect as I could hear the ringing but not the other side of the fax tones.

And I have to admit, its a cheap clone card, but I have to make it as cheap as possible (out of my own pocket) for hardware until I convince home office this is the way to go. Considering I have had no long distance for over a year now :)

IAX to IAX box linking via vpn is nice (thanks Ward)

I will look into the backup module more closely and double check it is doing what it is supposed to do etc.

Thanks again

Myk
 

RonRussell

Guru
Joined
Mar 22, 2008
Messages
112
Reaction score
4
Just follow instructions from the NV article Ward posted above - download the fax.pbx script file, run it - and it will install everything in less than 5 min

Myk

I am confused (everyone LOL) with the directions in Ward's two links.

Ron,
You can use either the Orgasmatron installer or the tips in this Nerd Vittles article for NVfax support.

In Orgasmatron installer I follow this link Fax Module using nvFax which leads to this link Nerd Vittles article which says "How It Works. There are two pieces to the new faxing mechanism. For inbound faxing, you simply set FreePBX to use NVfax to listen for a fax tone on inbound trunks." The problem here is that NVfax is not an option.

And of course the Nerd Vittles article is the same link that I arrived at by following the first link.

Surely the answer is right in front of my eyes but I can't seem to see it ??
 

RonRussell

Guru
Joined
Mar 22, 2008
Messages
112
Reaction score
4
Thanks MyKroFt, I knew the answer was right there. I followed your advice and installed Wards fax.pbx script file on my test server running FreePBX 2.5.2.2 and now I get this:

pbx*CLI> module show like fax
Module Description Use Count
app_nv_faxdetect.so Newman's fax detection application 0
app_rxfax.so Trivial FAX Receive Application 0
app_txfax.so Trivial FAX Transmit Application 0
3 modules loaded
 

RonRussell

Guru
Joined
Mar 22, 2008
Messages
112
Reaction score
4
However, on my production machine which is running FreePBX 2.7.0.1, installation of Wards fax.pbx script file did not have the same results. I get this:

pbx*CLI> module show like fax
Module Description Use Count
0 modules loaded

Here is the status of this server:
PBX in a Flash Version 1.4 Daemon Status
********************************************************************
* Asterisk * ONLINE * Zaptel * ONLINE * MySQL * ONLINE *
* SSH * ONLINE * Apache * ONLINE * Iptables * ONLINE *
* Fail2ban * OFFLINE * IP Connect* ONLINE * Ip6tables * OFFLINE *
* BlueTooth * ONLINE * Hidd * OFFLINE * NTPD * ONLINE *
* Sendmail * OFFLINE * Samba * OFFLINE * Webmin * ONLINE *
* Ethernet0 * ONLINE * Ethernet1 * N/A * Wlan0 * N/A *
********************************************************************
* Running Asterisk Version : Asterisk 1.4.21.2
* Asterisk Source Version : 1.4.21.2
* Zaptel Source Version : 1.4.12.1
* Libpri Source Version : 1.4.10
* Addons Source Version : 1.4.7
********************************************************************
pbx.localhost.com on 192.168.xxx.xxx - eth0
CentOS release 5.2 (Final) :32 Bit Kernel: 2.6.18-92.1.22.el5

To conclude:

***My test server was installed with PIAF ISO 1.4 and then the FreePBX modules were upgraded to 2.5.2.2. I then installed Wards fax.pbx script file. NVfax is available as an option for inbound routes.

***My production server was installed with PIAF ISO 1.4 and then the FreePBX modules were upgraded to 2.7.0.1. I then installed Wards fax.pbx script file. NVfax is NOT available as an option for inbound routes.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
ok, run the fax.pbx - but route it to a log file and post here ex : ./fax-pbx > fax-pbx.log

and we will figure it out

Myk

ps or we can get together on the phone sometime tomorrow (sunday) and get it figured out for you.

Let me know
 

Members online

No members online now.

Forum statistics

Threads
25,810
Messages
167,752
Members
19,240
Latest member
nikko
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.
Top