Want to setup FAX to email
No you do not...flaky at best...
FAX over VoIP is not there yet...and unless you you have REAL IP and HAVE the corrrect DNS entery's you will not be sending out to better half of the email servers in the world...(and tighten up each day..
local email server from some home dsl / cable modem service will be reject by most real email servers...
If really want to waste your time then hit the WiKi tons of stuff there..
Well I think that BubbaPCGuy has a pretty negative attitude, I have a voip line feeding my fax machine, and it works great! My provider was a big help in getting it set up correctly. Are you planning on having inbound fax over a pots line fed into trixbox, or do you want direct voip faxing?
Running Asterisk 1.2.7.1
Have not used the e-mail voicemails yet.
The install-pdf went great!
Sendmail is running but not setup to forward to my regular mail server. I looked in the admin mailbox and there are daily logs from Asterisk.
From: root
To: root@asterisk1.local
Will have to study this.
I think BubbaPCGuy is right. I myself has tried fax over VOIP and found the result very disappointing. Faxing into a Zaptel is supposed to be close enough to faxing into a fax machine, but this is far from true. I received broken fax still.
Read more at http://aussievoip.com.au/wiki/index.php?page=TB-Fax2Email
Look it does work, but not worth the trouble for most folks..
I have it working using Ulaw on 1.2.7 something...I get maybe 85 ~ 90 % of all hits completed about like a old pots fax witha dirty line
but since the change it the system setup some time back it has gone down hill...somewhere along the line something within the Asterisk / zaptel something has changed
read the forums..read the WiKi...
I was just looking to save the OP some time by pointing out it has MANY ISSUEs and reading the forum will perpare the OP to get at it or chose to forget it.
I spend hours tweaking the setup to have it go south on Zaptel update, so as I said "No you really do not want it"
(You want it just not under the current state of things)
You can get it working and will be so Happy...but the day you do a little update and ALL FAX's stop coming in you will wish you never heard of TrixBox and fax to email...
or your box is put on the SORBs list and blocked from 70 % of all email servers (aol, hotmail, Bellsouth, many others)
using sendmail the asterisk server should relay email via a real email server with the correct RDNS / MX records
Some corrections, I actually had Asterisk installed before, but have since done a clean install of Trixbox 1.1 and upgraded it.
Have a local pots line I want Trixbox to answer for voice and FAX's
When it receives a fax it can then email it to me.
I got the Sendmail working okay now.
My problem is when a fax is calling into Trixbox over the pots line it never answers, just rings my extension.
I have General settings, fax receive set to 'system'
What I'm I doing wrong?
rrobson,
I'm right there with you. I would like to accept fax transmissions on a designated Zap channel (g1). I have set this up in the inbound routes using this channel. Fax settings using system option, designating an appropriate email address and using NVfax option for detection. Finally, I have designated a custom app for the destination using "custom-tofax,s,1" and specifying
[custom-toFax]
exten => s,1,Goto(ext-fax,in_fax,1)
in extensions_custom.conf.
Experimenting with different settings and testing I cannot get trixbox to answer a fax call.
All calls just go to voicemail. At least I get a new email everytime I get a voicemail from the fax :)
wmsunder
TDM04B
aastra 480i CT
AMD Athlon 1.26ghz
512MB
As I said in my first on this thread..No you really do not want this..
Does the trixbox Freepbx have the 666 to test faxing??
If so what happens when you dial it.
-- Accepting AUTHENTICATED call from 192.168.10.90:
> requested format = ulaw,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw|alaw|gsm),
> priority = mine
-- Executing Goto("IAX2/5100-5", "ext-fax|in_fax|1") in new stack
-- Goto (ext-fax,in_fax,1)
-- Executing StopPlayTones("IAX2/5100-5", "") in new stack
-- Executing GotoIf("IAX2/5100-5", "1?3:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,3)
-- Executing Macro("IAX2/5100-5", "faxreceive") in new stack
-- Executing Set("IAX2/5100-5", "FAXFILE=/var/spool/asterisk/fax/1155256017.68.tif") in new stack
-- Executing Set("IAX2/5100-5", "EMAILADDR=bubba@someplace.com") in new stack
-- Executing RxFAX("IAX2/5100-5", "/var/spool/asterisk/fax/1155256017.68.tif") in new stack
-- Executing System("IAX2/5100-5", "tiff2ps -2eaz /var/spool/asterisk/fax/1155256017.68.tif | ps2pdf - /var/spool/asterisk/fax/1155256017.68.tif.pdf") in new stack
install-pdf is not working in trixbox 1.1.1
Any comment on this?
I just installed trixbox 1.1.1 a few days ago from scratch.
All went well including ZAPHFC. Up to now everything I tried workd well. Some bugs I had with AHH 2.8 just went away. Thanks for the great job.
jakob
bubbapcguy wrote:
FAX over VoIP is not there yet...and unless you you have REAL IP and HAVE the corrrect DNS entery's you will not be sending out to better half of the email servers in the world...(and tighten up each day..
Bubba, this TOTALLY and COMPLETELY unrelated to VoIP faxing.
It has nothing to do with "real IPs" or DNS entries, but rather the inclusion of dialup/DSL/cablemodem IP blocks on antispam blackhole lists on the net which most ISPs use with their mailservers (which is a good thing for reasons I won't bore you with). This is the cause of your inability to deliver mail to many destinations on the net, and it's supposed to be like this. In actual fact, some ISPs (Bell Sympatico among others) drop all SMTP traffic to everywhere but their own mail servers, to enforce this.
There is, however, one simple and correct fix.
Home subscribers should not be attempting to send email directly to the recipient's MX themselves. They (and you, and me) should be sending *ALL* outgoing email to their (your, my) ISP's mail server.
I know this can be configured in Sendmail, but I strongly dislike Sendmail (to put it mildly). Apparently, Sendmail configuration files are easy to deal with if you're fluent in Klingon or Aramaic, but not so easy otherwise (and they're very, very easy to break in any case).
It's really easy to set this up in Postfix (a MUCH more secure and easier-to-use MTA than Sendmail). Continuing the easy tradition, the procedure to switch from Sendmail to Postfix is also really easy; I highly recommend everyone do it:
service sendmail stop
rpm -e --nodeps sendmail
yum -y install postfix
service postfix start
Then just put the following line into /etc/postfix/main.cf:
relayhost = your.isp.mailserver.goes.here
So Bell Sympatico subscribers, for example, would use:
relayhost = smtp1.sympatico.ca
Then do this to cause Postfix to reload its configuration files:
service postfix reload
So don't piss on other people's parties because you can't get it working. Ask for help, just like rrobson did.
First of all, "install-pdf" seems to be deprecated in Trixbox 1.1.1; the command doesn't exist on my installation, but rather Trixbox is already turning fax TIFFs into PDFs automatically, so it seems as though the PDFing is now turned on by default (which is nice).
To configure Asterisk to listen for faxes on an inbound route, go to the Inbound Routes page, pick any route on which you want to listen for incoming faxes as well as voice calls (so you can pick on a DID-by-DID basis whether or not to listen for incoming faxes), and configure the fax handling as follows:
Fax Extension: FreePBX Default
Fax Email:
Fax Detection Type: NVFax
Pause After Answer: 6
This 6-second pause is the length of time NVFax will sit and play ringback to the caller while listening for the ~0.5-second 1,100 Hz fax CNG tone that calling fax machines make about every 3.5 seconds; 6 seconds is the length of the North American ring cycle (2 seconds on, 4 seconds off), so this will just sound like one more ring to callers. So, even though your Asterisk box will have already answered and is listening for a fax machine, they won't know that. Also, leaving the window this big is sure to catch them all.
Okay, back on track now: save your changes to the inbound route, then go to the General Settings page and set up the "Fax Machine" settings as follows:
Extension of fax machine for receiving faxes: system
Then, obviously, set the "Email address to have faxes emailed to" to whatever email address you want the fax PDF's to go to.
Don't forget to properly set the value for the "Email address that faxes appear to come from"; use a real email address such as your own, in case any messages bounce, among other reasons.
Then save your changes on the General Settings page. Don't click the red bar yet.
Now, edit /etc/asterisk/vm_general.inc and change the "serveremail=" line to reflect the same (from) email address; this is used for email VM notifications, and should also be a real-world email address.
Go back to the web GUI and click the red bar, because you're done. Now you'll have everything set up to receive faxes with Trixbox -- it works perfectly for me using a VoIP trunk.
It should be noted that fax data will be corrupted if a compressing codec is used (G.729, etc); only the two flavours of G.711, mu-law (PCMU) and a-law (PCMA), will work. Receiving faxes using a POTS trunk and an FXO adapter, like an SPA-3000 for example, should also work fine as long as the SPA-3000 uses G.711 between itself and Asterisk, although I've never tested that myself.
Okay, I'll stop typing now. This was from memory (with a bit of double-checking for wording and settings locations), so I may have left a step out, but it looks complete at first glance.
Let me know how this works out for you!
FAX over VoIP is not there yet
not related??? How so?? FoIP is flaky is it not?? Once the fax comes in what do 999 % of the folks want??? WHy sent to a email addy or two, right??
So I am sure that is related...
OH I have it working and I am one of those email admin who block email ..SORBS..
I only host on static IP and yes it all has to do with dyn ip or home account's...
those folks maybe wasting time because they are blocked / on the list and spinning their wheels hacking away at sendmail thinking they are having the problem, when in fact it is upstream..
I have no problem as we run real email server's QMAIL all our boxes use the QMAIL as a smart server.
alexburke, this is great information! I actually got the box to answer a fax call! Now it processes about half of the test page, then disconnects, not sure what's going on with that. Here are some of my observations with fax...on my system anyway:
I agree with you that PostFix is the way to go for sending emails. Once I got rid of Sendmail, loaded up PostFix and set my mail server, I was up and running. The system is now sending voicemails to email just great!
I have two lines coming in to TrixBox. Both of these are out of a Vonage Linksys ATA. Basically they "look" like pots lines to TrixBox and are connected to a Digium TDM04B card (4fxo ports). On the network side I have an Aastra 480i CT. Voice quality is great, voicemail works really well and all other functions seem to be operating as designed. (still working on the hours rules) TrixBox is an outstanding system!
What I discovered in my testing tonight is that I could not get TrixBox to answer incoming fax calls if I had the Zaptel channels designated in the incoming routes. I did this because one of the lines will receive incoming fax calls and also handle outgoing voice calls. I set the "voice" route up as "g0" and just left the "fax line" as
any DID/any CID, followed your instructions as written and the box answered the fax call!
The fax line incoming route destination is set as custom app with "custom-tofax,s,1" (w/o quotes) and
[custom-tofax]
exten => s,1,Goto(ext-fax,in_fax,1)
is set in extensions_custom.conf
Again, terrific information alexburke. I hope that many others are able to gain insight from this post.
wmsunder
Bubba, can you actually try putting your thoughts together before you post? I find your posts very difficult to read.
No, fax over IP isn't flaky, as long as it's done over G.711. Once the fax has been received by the Asterisk box and the channel is hung up, that's where fax over IP ends. Beyond that, it's simply sending an email with a PDF attachment, without having anything to do with faxing whatsoever. Sending the email is pretty straightforward too, as long as the box is configured to send it to the right mailserver!
You were blaming people's trouble reliably receiving email copies of received faxes on "real IPs" and DNS entries, when the problem probably was with direct-to-MX delivery of email. Solve that, and the rest generally solves itself (because Trixbox's fax support, at least with 1.1.1, *does* work out-of-the-box). The rest of my directions were just to be absolutely sure that everything was set up right in case people had been adjusting every fax setting in sight trying to get it to work.
The enduser *is* the one with the problem, because they're trying to directly deliver mail when they're on a dialup list or other such list (MAPS, SORBS, whatever you prefer). The upstream is doing the right thing by enforcing such rules, because they greatly cut down on spam sent by zombified PCs with broadband connections; a recent study mentioned some 70% of all spam worldwide is sent from such sources.
Your use of qmail matters not -- you'll have exactly the same problem if any of your IP addresses are on any antispam blacklists and you're not sending the email to your ISP's mailserver. You should always be sending email through your ISP's mailserver unless you have a compelling reason to not do so, and it sounds like you have no such reason.
Send your outgoing mail to your ISP's mailserver, and you won't ever have a problem with it.
So, yes, the problem *does* lie with Sendmail's configuration. IMHO, the next version of Trixbox should include Postfix instead of Sendmail, and there should be a UI element to set the user's ISP's mailserver, which would then stick a relayhost line into /etc/postfix/main.cf and then reload Postfix. Problem solved.
Yikes, what a hack -- converting your VoIP into analog then back into digital with a PCI card.
As I understand it, PCI VoIP cards are *really* sensitive to interrupt latency and bus contention. Basically, they're very demanding of the machine it's installed in. I don't have any experience with PCI VoIP stuff, so I'm not going to be able to be of much help with it.
Why are you using a custom destination? Just set the fax extension to "system" on the General Settings page, and let Trixbox handle it. It will* work!
*should :)
What I would recommend is figuring out what SIP username and password the ATA (presumably a PAP2) is using to register with the Vonage proxy (and the proxy address), and using those with Trixbox, cutting the ATA totally out of the picture (and the PCI card as well).
Since Vonage doesn't offer BYOD (bring-your-own-device) service, you have to tell them you want to use a SIP softphone with their service, and they might charge you a bit more per month. This way you'll get a working SIP username and password to use for your new Vonage SIP trunk in Asterisk. :)
You may wish to switch to a different upstream provider -- if you're in the US, you may wish to try Sixtel, because they're cheap and have DIDs in lots and lots of rate centers. I think they also do LNP, so you can keep your Vonage number if you're attached to it. Last time I checked, they also let you control your outbound caller ID, but don't abuse this. This does have legit uses, such as preserving the original caller ID on calls transferred out of your system, such as to a cellphone. (This is really handy, and Trixbox will do this out-of-the-box.)
rrobson wrote:
Dialed 666 from my extension and got a complete series of handshake Fax signals. Nothing else happened.
What is the 'Simulat Incoming FAX' supposed to do?
I did not see anything or I'm I looking in the wrong log.
That's exactly what it's supposed to do -- transfer you to the fax receiving bit. Basically, if it sounds like a fax machine, things should work when a real fax call comes in.
Follow my directions elsewhere in the thread, and you'll be up and running in no time.
Is it configured exactly as I mentioned in my detailed post in this thread?
If so, connect to the asterisk CLI and issue "set verbose 7", then try sending a fax to your system. Post the resulting debugging output here for us to look at (feel free to obfuscate any phone numbers etc which appear).
I think I'm getting closer while trying to receive a FAX.
Extension 201 rings 3 times now and stops. Wait a little bit and I get an email saying I've got voice mail.
Checking the voice mail I can now hear the fax handshake tones from the sending machine.
The sending machine just errored out on send.
Will switch to Postfix later.
Thanks for the help Alex
I see your into PGP
rob at rob-robson dot com
here you go... I tried faxing from standard pots to zap, and from pots to SIP here it the verbose output respectively (to zaptel card 1st, then to a SIP trunk)
[size=small]Verbosity was 1 and is now 7
-- Starting simple switch on 'Zap/1-1'
-- Executing NoOp("Zap/1-1", "Entering from-zaptel with DID == ") in new stack
-- Executing Set("Zap/1-1", "DID=s") in new stack
-- Executing NoOp("Zap/1-1", "DID is now s") in new stack
-- Executing GotoIf("Zap/1-1", "1?zapok:notzap") in new stack
-- Goto (from-zaptel,s,7)
-- Executing NoOp("Zap/1-1", "Is a Zaptel Channel") in new stack
-- Executing Set("Zap/1-1", "CHAN=1-1") in new stack
-- Executing Set("Zap/1-1", "CHAN=1") in new stack
-- Executing Macro("Zap/1-1", "from-zaptel-1|s|1") in new stack
-- Executing NoOp("Zap/1-1", "Returned from Macro from-zaptel-1") in new stack
-- Executing Goto("Zap/1-1", "ext-did|s|1") in new stack
-- Goto (ext-did,s,1)
-- Executing Set("Zap/1-1", "FROM_DID=s") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing PlayTones("Zap/1-1", "ring") in new stack
-- Executing NVFaxDetect("Zap/1-1", "6") in new stack
-- Executing Goto("Zap/1-1", "ivr-2|s|1") in new stack
-- Goto (ivr-2,s,1)
-- Executing Set("Zap/1-1", "LOOPCOUNT=0") in new stack
-- Executing Set("Zap/1-1", "__DIR-CONTEXT=default") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing Wait("Zap/1-1", "1") in new stack
-- Executing Set("Zap/1-1", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3
-- Executing Set("Zap/1-1", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing BackGround("Zap/1-1", "custom/Female_Main_Menu") in new stack
-- Playing 'custom/Female_Main_Menu' (language 'en')
-- Executing Hangup("Zap/1-1", "") in new stack
-- Hungup 'Zap/1-1'
-- Executing NoOp("SIP/##########-4cc7", "Catch-All DID Match - Found ########## - You probably want a DID for this.") in new stack
-- Executing Goto("SIP/##########-4cc7", "ext-did|s|1") in new stack
-- Goto (ext-did,s,1)
-- Executing Set("SIP/##########-4cc7", "FROM_DID=s") in new stack
-- Executing Answer("SIP/##########-4cc7", "") in new stack
-- Executing PlayTones("SIP/##########-4cc7", "ring") in new stack
-- Executing NVFaxDetect("SIP/##########-4cc7", "6") in new stack
-- Executing Goto("SIP/##########-4cc7", "ivr-2|s|1") in new stack
-- Goto (ivr-2,s,1)
-- Executing Set("SIP/##########-4cc7", "LOOPCOUNT=0") in new stack
-- Executing Set("SIP/##########-4cc7", "__DIR-CONTEXT=default") in new stack
-- Executing Answer("SIP/##########-4cc7", "") in new stack
-- Executing Wait("SIP/##########-4cc7", "1") in new stack
-- Executing Set("SIP/##########-4cc7", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3
-- Executing Set("SIP/##########-4cc7", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing BackGround("SIP/##########-4cc7", "custom/Female_Main_Menu") in new stack
-- Playing 'custom/Female_Main_Menu' (language 'en')
-- Executing Hangup("SIP/##########-4cc7", "") in new stack
houtrix*CLI>
[/size]
Yeah, at this point the MTA (Sendmail/Postfix) is not your problem.
Go over my walkthrough and set up the faxing as I recommend, then try again. Specifically, do not set the fax destination to an extension; you must set it to "System", or I can't help you. (You only set it to an extension if you actually have a physical fax machine connected to that extension.)
Let us know how it goes!
I cannot setup an Incoming route for FAX only.
Your tutorial suggest the appropriate Inbound route, I take that as "any DID / any CID"
But I could not get the radio buttons unchecked.
So I tried to create another Inbound route with the DID number 740773XXXX (xxxx=my fax number) Then I fill in the FAX handling as you describe:
freePBX default
my email
NVFax
6
But it will not let me submit until I pick a destination. So I can't save it.
What should be at ‘Set Destination’ ?
General Settings, FAX machine:
system
my email address
return address
rrobson wrote:
I cannot setup an Incoming route for FAX only.
You don't have to; that's the purpose of the Pause value. The inbound route will answer and listen for a fax machine for the number of seconds in Pause (I recommend 6) while playing ringback to the caller to sound like the call hasn't been answered yet. Then, if it IS a fax machine calling, redirect to the internal fax handler; if not, then proceed as normal to the destination (send the call to a ring group or IVR or whatever).
rrobson wrote:
Your tutorial suggest the appropriate Inbound route, I take that as "any DID / any CID"
But I could not get the radio buttons unchecked.
It's actually any one of your inbound routes that you already have set up. If you're using VoIP trunks, you'll probably have one inbound route for each DID (phone number) you have, so that they can be handled differently based on the number that was called to reach your Trixbox machine. So if you have three phone numbers and you only want to listen for incoming faxes on one of them, enable NVFax for only that one, and leave it turned off for the other two.
rrobson wrote:
So I tried to create another Inbound route with the DID number 740773XXXX (xxxx=my fax number)
That's the beauty of it -- you don't need a dedicated fax number anymore, because if the caller is a fax machine, it's answered as a fax call, and if the call is not a fax machine, then the call proceeds as though fax detection never took place (although we've had to answer the call to listen to it, so billing has begun). So again, if it's not a fax machine calling, we continue to the incoming route's destination as a normal voice call (ring group, IVR/Digital Receptionist, time conditions, whatever). So the destination you pick is for when the caller is NOT a fax machine.
I've added a bit of wording to my original how-to post to clarify this bit.
Do let us know how it goes!
Sorry to report I can't get Trixbox to accept FAX's. Will wait a few days and get a fresh start.
May try to get someone to look at it for me.
Very happy with the email now.
I followed your instructions on changing from Sendmail to Postfix and it was done in just a few minutes. All my little problems with sending mail to another server on the LAN went away. It could not have been easier.
What's happening when you try? Some output from the Asterisk CLI would help (do "set verbose 7" first please, then "set verbose 1" when you're finished capturing output).
What type of channel is the fax trying to come in on? SIP? Zap? IAX?
How do you have the inbound route (the one that the faxes are trying to come into) configured? How do you have the fax options on the General Settings page configured?
Please post this before waiting the few days. This is bugging me. :)
cvander wrote:
-- Executing NVFaxDetect("Zap/1-1", "6") in new stack
-- Executing Goto("Zap/1-1", "ivr-2|s|1") in new stack
This means that NVFax did not detect a calling fax machine, and has decided the call is voice.
cvander wrote:
-- Executing NVFaxDetect("SIP/##########-4cc7", "6") in new stack
-- Executing Goto("SIP/##########-4cc7", "ivr-2|s|1") in new stack
Likewise. No fax machine detected.
This is what's supposed to happen (verbosity 7; I just captured this now):
-- Executing Set("SIP/x.x.x.x-08af9598", "FROM_DID=nnnnnnnnnn") in new stack
-- Executing Answer("SIP/x.x.x.x-08af9598", "") in new stack
-- Executing PlayTones("SIP/x.x.x.x-08af9598", "ring") in new stack
-- Executing NVFaxDetect("SIP/x.x.x.x-08af9598", "6") in new stack
-- Executing Goto("SIP/x.x.x.x-08af9598", "ext-fax|in_fax|1") in new stack
-- Goto (ext-fax,in_fax,1)
-- Executing StopPlayTones("SIP/x.x.x.x-08af9598", "") in new stack
-- Executing GotoIf("SIP/x.x.x.x-08af9598", "1?3:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,3)
-- Executing Macro("SIP/x.x.x.x-08af9598", "faxreceive") in new stack
-- Executing Set("SIP/x.x.x.x-08af9598", "FAXFILE=/var/spool/asterisk/fax/1155658231.358.tif") in new stack
-- Executing Set("SIP/x.x.x.x-08af9598", "EMAILADDR=faxmailbox@domain.com") in new stack
-- Executing RxFAX("SIP/x.x.x.x-08af9598", "/var/spool/asterisk/fax/1155658231.358.tif") in new stack
-- Executing System("SIP/x.x.x.x-08af9598", "/var/lib/asterisk/bin/fax-process.pl --to faxmailbox@example.com --from trixbox@example.com --subject "Fax from anonymous " --attachment anonymous.pdf --type application/pdf --file /var/spool/asterisk/fax/1155658231.358.tif") in new stack
-- Executing Hangup("SIP/x.x.x.x-08af9598", "") in new stack
-- Executing Hangup("SIP/x.x.x.x-08af9598", "") in new stack
I'm thinking your fax machine is to blame; some fax machines are configured to NOT play the 1,100 Hz CNG tone when dialling out. After your fax machine dials and is waiting for the other end to answer, does it emit a beep on the line about every three or four seconds (generally you'll hear it because the speaker in it will let you hear the call progress)?
If not, NVFax will *never* detect it. It must play the CNG tone during the 6-second listening period (and since it's played every 3 to 4 seconds, a 6-second window should catch it). This is what it sounds like:
http://www.eicon.com/support/helpweb/dssdk/callingtone.wav
Such "quiet" fax machines wait until the other fax machine answers and starts its handshake before they make ANY sound (other than the DTMF needed to dial the call). Such machines will never be detected by Asterisk, and they should be thrown in the garbage (or, perhaps, reconfigured to send out the CNG tones; RTFM).
PM me with the number of your SIP DID and I'll try faxing you, on my nickel, from my fax machine (which, like 98% of fax machines on the market, DOES send out CNG tones).
Just don't tell my girlfriend i'm faxing others on the side, OK? :)
How often does your fax machine play the CNG tone? It should be every 3 or 4 seconds.
I'm just doing some tests, and my Asterisk box did actually miss the CNG tone once out of 10 or 12 test faxes. So increasing the delay to 9 (1.5 ring cycles, long enough to catch a second CNG if it somehow misses the first one played during the listening window) might be warranted.
I actually recall something about Zaptel fax detection being necessary on Zap trunks; apparently NVFax is only for SIP and IAX. Try the Zaptel fax detection method on the inbound route that comes in from your Zaptel trunk. (If you have only one route, make one for each trunk that handles incoming calls instead, and put the DID of each in there, so you and Asterisk can tell them apart.)
Hi Alex,
I followed your instruction for fax on trixbox 1.1.1 but still I can not get fax if I do 666 from one extension
In CLI I saw that it is sending a email with pdf attached but I do not receve that.
My TB is behind a linux server wich are my smtp server as well so I did modify relayhost = my smtplinux
Any clue what can be or how can I troubleshut that?
I realise since Trixbox 1.1.1, the [from-pstn] context has been replaced with [from-zaptel] for all Zap channels. Any call from Zap channel is therefore channelled to [from-zaptel], then if it is a catch-all inbound-route, it is channelled again to [ext-did]. Thus, the [ext-fax] placed in [from-pstn] context is avoided and all incoming faxes cannot be picked up.
The workaround is to included the following lines in the extensions_custom.conf file:
[ext-did-custom]
exten => fax,1,Goto(ext-fax,in_fax,1)
That works for me!
When I do a test dial 666 I get that on CLI
But in my email I do not find thise pdf
Even if I chek in /var/spool/asterisk/fax/ the folder it is empty
- Accepting AUTHENTICATED call from 192.168.50.145:
> requested format = g729,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw|alaw|gsm),
> priority = mine
-- Executing Goto("IAX2/206-8", "ext-fax|in_fax|1") in new stack
-- Goto (ext-fax,in_fax,1)
-- Executing StopPlayTones("IAX2/206-8", "") in new stack
-- Executing GotoIf("IAX2/206-8", "1?3:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,3)
-- Executing Macro("IAX2/206-8", "faxreceive") in new stack
-- Executing Set("IAX2/206-8", "FAXFILE=/var/spool/asterisk/fax/1155931968.3 31.tif") in new stack
-- Executing Set("IAX2/206-8", "EMAILADDR=cpaun@mydomain.com") in new stack
-- Executing RxFAX("IAX2/206-8", "/var/spool/asterisk/fax/1155931968.331.tif ") in new stack
-- Got SIP response 481 "Call Leg/Transaction Does Not Exist" back from 192. 168.50.103
-- Executing System("IAX2/206-8", "/var/lib/asterisk/bin/fax-process.pl --to cpaun@mydomain.com --from cpaun@mydomain.com --subject "Fax from 206 Tom" --attachment 206.pdf --type application/pdf --file /var/spool/asterisk/fax/1155931968.331.tif") in new stack
-- Executing Hangup("IAX2/206-8", "") in new stack
-- Executing Hangup("IAX2/206-8", "") in new stack
-- Hungup 'IAX2/206-8'
cpaun wrote:
When I do a test dial 666 I get that on CLI
But in my email I do not find thise pdf
Do you mean you don't get any email at all, or you get an email with no attachment?
Did you remove Sendmail and install Postfix as per my directions? Did you set the correct relayhost in /etc/postfix/main.cf and reload Postfix?
Take a look at /var/log/maillog and see what's happening there.
alexburke wrote:
"Fax Extension: FreePBX Default
Fax Email:
Fax Detection Type: NVFax
Pause After Answer: 6"
Alex,
First, thanks for all the help for newbies like me.
I am running TB 1.1.1 with a TDM400P (4 port) card. Using 2 PSTN lines currently, no VOIP yet.
I was noticing that the fax tone would be detected, but no email ever went out. Also, no VM emails were going out. So I followed your instructions to switch over to Postfix.
Now the same fax tone that was detected by sendmail is not detected by Postfix with your settings dialed in.
I triple-checked the settings and set the rings to 10 and tried ZAP instead of NVFax... still no luck. VM emails aren't going out either. I have a Comcast connection and the smtp.comcast.net works fine for me with all other outgoing emails from Outlook, etc. but needs authentication IIRC.
So I have 2 issues:
1) No fax has been detected since Postfix was installed
2) Outgoing emails aren't happening
Which logs should I access to troubleshoot this? I'm no big SSH buff yet. Just Amiga DOS, DOS and Telnet since 1984. I guess it's time for the Unix-verse!
TIA,
Steve Fischer
Sonoma, CA
Right you are Alexburke. What I can say is that you certainly know your stuff! I converted everyting over to digital. I signed up for vitelity service which has worked out just great. I know there are many other great providers out there but it was good to get some inside information on the one or two really great ones.
Taking into consideration your comments on interrupt (pci resource) contention, I removed the TDM400 (oh well, lesson well learned even if a good deal of money was spent), placed the network card in a known non-shared pci port, fired the machine up and it works like a charm.
Another thing that was tremendously helpful was your explanation of how trixbox sees fax configuration. It was very helpful to finally understand that you don't need to set a destination for the fax functionality in order for it to work rather that the destination is where the call goes if it is not detected as a fax call. Very good insight into how the system handles calls.
Thanks again for your extremely informative and helpful posts. I now begin work on outbound faxing using asterfax.
Thanks again alexburke.
wmsunder
izrunas wrote:
Simplified instructions:
http://www.trixbox.org/modules/newbb/viewtopic.php?topic_id=3167&forum=2
Thanks to everyone who took the time to create this. It seems to work well for most everyone... except me!
I have yet to have any email features (VM or fax) work with Trixbox 1.1.1. I had the fax tone working when the Sendmail was installed, but it hasn't worked once since installing Postfix.
I am using a TDM400 and two incoming PSTN FXO lines (no VOIP). My settings follow the above instructions to a T plus the following lines to the extensions_custom.conf file:
[ext-did-custom]
exten => fax,1,Goto(ext-fax,in_fax,1)
Still no workie.
Any suggestions?
Steve
One thing I would focus on right away is the pci resources contention with the TDM400 because as alexburke has said in his postings, this is a deal killer. The way i got around this was to refer to my motherboard manual to see which pci slot did not share resources with any other pci slot. You might try some troubleshooting steps with just the TDM400 plugged in (if possible on your system) to see if this helps.
Also, according to alexburkes postings, you should not need custom settings for faxing to work. Simply set fax detection to freePBX-default, detection type to nvfax and set your pause after answer to 6. Then in general settings, be sure the extension for recieving faxes to system and then set the email address to whatever real email address you want those faxes to go to.
When setting faxing in your inbound routes the destination that you designate is the destination that the system will send your call if it detects that the call IS NOT a fax. I would pull out your custom destination.
Have you installed webmin? I use it becuase I am still uncomfortable working with the linux command line. It is a very helpful tool and I think you will find that you can configure postfix from here also. As a final note are you certain that you uninstalled sendmail before you installed postfix? just a thought. good luck.
wmsunder
wmsunder wrote:
One thing I would focus on right away is the pci resources contention with the TDM400 because as alexburke has said in his postings, this is a deal killer. The way i got around this was to refer to my motherboard manual to see which pci slot did not share resources with any other pci slot. You might try some troubleshooting steps with just the TDM400 plugged in (if possible on your system) to see if this helps.
clip
Are you certain that you uninstalled sendmail before you installed postfix? just a thought.
wmsunder
wmsunder,
Thanks for the tips. I was under the impression that since Asterisk could see all the zaptel channels I was past IRQ issues... could such issues also cause horrid echo on PSTN lines? I have those too.
I'm certain that I followed the steps to uninstall sendmail... is there a way to see if it's still trying to run?
Thanks for the suggestions!
Steve
My pleasure.
I can say when I was using the TDM04B/pci configuration I was getting some mild echo and I was not able to get inbound faxing working. I too was able to see and work with all of the zaptel channels on the TDM (all four channels). I can't remember off the top of my head (because i'm on vacation) but as I recall, i have an asus A7N8X motherboard with 5 pci slots. While I was testing i had only two devices, the network card and the TDM04B. Now you would think that this would not be a problem but I think it was. Once I found out which pci slots were not sharing resources, the problem went away. Please have a look at the following quote from alexburke:
"As I understand it, PCI VoIP cards are *really* sensitive to interrupt latency and bus contention. Basically, they're very demanding of the machine it's installed in. I don't have any experience with PCI VoIP stuff, so I'm not going to be able to be of much help with it."
Now understand that I am no expert on the granular inner workings of bus communication but I would not be at all surprised if at least some of your echo may be a result of interrupt latency and I know for certain that you must get the TDM04B in an environment where you have little or no latency and where the bus that the card is installed in is shared with no other piece of hardware. This, in my opinion, is the only way you can verify that you are not beating your head against a wall.
good luck
wmsunder
Some basic homework to check if fax receiving is working can be summarised as follows:
Firstly, check faxdetect=incoming is in the zapata.conf, although it is enabled by default in zapata.conf, but is worth checking.
Secondly, dial 666 to test fax detection working.
Thirdly, make sure fax handling is enabled in the catch-all inbound route and there is a sufficient delay for Trixbox to pickup fax tone after answering. Set "pause after answer" to above 5.
Fourthly, issue an "asterisk -rvvvvv" and watch the output.
(this step will help you to see whether the exten => fax,1,Goto(ext-fax,in_fax,1) ever gets into action)
On the wiring side, http://www.voip-info.org/wiki/view/app_rxfax+and+app_txfax says
"if you can't get Asterisk to recognize an incoming call as a fax, check the wiring of your jacks. Reversed wires in an RJ-11 jack prevented Asterisk from recognizing the fax polling tones and caused the server to dump the call into a regular extension instead of recognizing it as a fax".
I have been following this thread at the biginning and made some progress also. Hope it helps others to trouble theirs "Alexburke wrote "I actually recall something about Zaptel fax detection being necessary on Zap trunks; apparently NVFax is only for SIP and IAX. Try the Zaptel fax detection method on the inbound route that comes in from your Zaptel trunk."
I got trixbox to answer using NVFax. I used ZAP, it didn't work but I was also sharing IRQ'S at that time. So now at least Trixbox is responding after IRQ is resolved. I also did polarity switch on my jac, crank up the tx and rx to 7.0, 7.0 as one user stated. Tif file was generated but it's not emailing me. My voice messages is emailing o.k.
Having so many combinations, not sure which setting did the trick, But one thing for sure, NVFax works for me with ZAP!
jthong555 wrote:
Tif file was generated but it's not emailing me. My voice messages is emailing o.k.
I would recommend ripping out Sendmail and replacing it with Postfix (and configuring it to use your ISP's mail server as your relayhost), which I go over in this post.
If you're running Trixbox 1.1.1, it should actually be converting the TIFF into a PDF, deleting the TIFF, then emailing you the PDF. If you see nothing in the debugs about converting to PDF (tiff2ps then ps2pdf, if I recall correctly), then you're probably running an old version of Trixbox; run "trixbox-update.sh update" twice to upgrade. Then restart the machine ("shutdown -r now") and try again.
Let us know how you make out!
Well i've tried most of the above instructions but seem to be having problems even getting Trixbox to detect a fax in the first place.
My setup is - Trixbox 1.1.1 all updated running on VMWare Server, with fixed ip and necessary ports forwarded on router.
I currently have 2 Sipgate accounts as trunks both forwarding (successfully) to mobiles.
I noticed in the logs (below) that NVFax was using ms instead of secs, so i've increased the figure from 6 (as recommended) to a lot higher (even tried 100000 at one point) but still no luck - every fax i try gets forwarded to my mobile.
It appears that the incoming call is being detected as slin, even though i have ulaw and alaw as the only codecs allowed.
I've setup Xlite and rang 666 and get a fax tone so something appears to be working, just not when i receive a fax! I've tried faxes from my laptop, and fax machine, and tpc.int.
I also copied the [ext-fax] commands and dropped them into my [ext-local] config for my extension - i actually received a fax tone, but then the fax just sat there and eventually timed out with an error.
Has anybody managed to get Trixbox working with Sipgate, or am i just flogging a dead horse?? :-)
Bugsy
Log below
Aug 24 18:54:44 DEBUG[2549] chan_sip.c: Allocating new SIP dialog for XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@gw02.uk.sipgate.net - INVITE (With RTP)
Aug 24 18:54:44 DEBUG[2549] chan_sip.c: Setting NAT on RTP to 0
Aug 24 18:54:44 DEBUG[2549] chan_sip.c: Checking SIP call limits for device XXXXXX
Aug 24 18:54:44 DEBUG[2549] chan_sip.c: build_route: Record-Route hop:
Aug 24 18:54:44 DEBUG[2549] chan_sip.c: build_route: Record-Route hop:
Aug 24 18:54:44 DEBUG[21546] pbx.c: Launching 'Set'
Aug 24 18:54:44 VERBOSE[21546] logger.c: -- Executing Set("SIP/XXXXXX-4de4", "FROM_DID=XXXXXX") in new stack
Aug 24 18:54:44 DEBUG[21546] pbx.c: Launching 'Answer'
Aug 24 18:54:44 VERBOSE[21546] logger.c: -- Executing Answer("SIP/XXXXXX-4de4", "") in new stack
Aug 24 18:54:44 DEBUG[21546] chan_sip.c: sip_answer(SIP/XXXXXX-4de4)
Aug 24 18:54:44 DEBUG[21546] pbx.c: Launching 'PlayTones'
Aug 24 18:54:44 VERBOSE[21546] logger.c: -- Executing PlayTones("SIP/XXXXXX-4de4", "ring") in new stack
Aug 24 18:54:44 DEBUG[21546] channel.c: Set channel SIP/XXXXXX-4de4 to write format slin
Aug 24 18:54:44 DEBUG[21546] channel.c: Scheduling timer at 160 sample intervals
Aug 24 18:54:44 DEBUG[21546] pbx.c: Launching 'NVFaxDetect'
Aug 24 18:54:44 VERBOSE[21546] logger.c: -- Executing NVFaxDetect("SIP/XXXXXX-4de4", "10000") in new stack
Aug 24 18:54:44 DEBUG[21546] app_nv_faxdetect.c: Preparing detect of fax (waitdur=10000ms, sildur=1000ms, mindur=100ms, maxdur=-1ms)
Aug 24 18:54:44 DEBUG[21546] channel.c: Set channel SIP/XXXXXX-4de4 to read format slin
Aug 24 18:54:44 DEBUG[21547] app_queue.c: Device 'SIP/XXXXXX' changed to state '4' (Invalid) but we don't care because they're not a member of any queue.
Aug 24 18:54:44 DEBUG[21548] app_queue.c: Device 'SIP/XXXXXX' changed to state '4' (Invalid) but we don't care because they're not a member of any queue.
Aug 24 18:54:44 DEBUG[21546] rtp.c: Ooh, format changed from unknown to ulaw
Aug 24 18:54:44 DEBUG[2549] chan_sip.c: Stopping retransmission on 'XXXXXXXXXXXXXXXXXXXXXXXXX@gw02.uk.sipgate.net' of Response 102: Match Found
Aug 24 18:54:44 DEBUG[21546] app_nv_faxdetect.c: Start of voice token!
Aug 24 18:54:46 DEBUG[21546] app_nv_faxdetect.c: Found qualified token of 549 ms
Aug 24 18:54:46 NOTICE[21546] app_nv_faxdetect.c: Redirecting SIP/XXXXXX-4de4 to talk extension
Aug 24 18:54:46 WARNING[21546] app_nv_faxdetect.c: Talk detected, but no talk extension
Aug 24 18:54:46 DEBUG[21546] channel.c: Set channel SIP/XXXXXX-4de4 to read format ulaw
Aug 24 18:54:46 DEBUG[21546] pbx.c: Launching 'Goto'
Aug 24 18:54:46 VERBOSE[21546] logger.c: -- Executing Goto("SIP/XXXXXX-4de4", "ext-local|700|1") in new stack
Aug 24 18:54:46 VERBOSE[21546] logger.c: -- Goto (ext-local,700,1)
Aug 24 18:54:46 DEBUG[21546] pbx.c: Launching 'Macro'
Aug 24 18:54:46 VERBOSE[21546] logger.c: -- Executing Macro("SIP/XXXXXX-4de4", "exten-vm|700|700") in new stack
Aug 24 18:54:46 DEBUG[21546] pbx.c: Launching 'Macro'
Aug 24 18:54:46 VERBOSE[21546] logger.c: -- Executing Macro("SIP/XXXXXX-4de4", "user-callerid") in new stack
Aug 24 18:54:46 DEBUG[21546] pbx.c: Expression result is '0'
Alex wrote "As I've mentioned, the Zaptel stuff is *very* touchy about interrupt latency and bus contention, which is why I don't use it. My PSTN line goes into an SPA-3000, and it works quite well (other than a DTMF misdetection problem with the latest firmware versions).
I did everything in your walkthrough by using postfix. 2 questions that I have are:
1. How much latency is too much. With default install of trixbox, it is at latency 32. Is that normal? I tried reinstalling and give it a different pci slot. still samething. latency 32.
2. I reinstall my trixbox v1.1 and before the updates, irq's are like 7,10,11. The TDM400p uses irq 7 . after I did the trixbox updates to v 1.1.1, everything got push up into the hundreds, ex. tdm400p becomes irq 177, nic card uses 169, vga uses 193.
I tried restalling and each time it happened after a trixbox update.
I am not sure if that's the reason why my trixbox doesn't even detect faxes anymore. On my earlier post, I did manage to get trixbox to receive the faxes but was having a hard time to tell trixbox to email them to me.. which lead me to the 3 question.
3.. under inbound routes on Fax Handling here is what I have:
Fax Exten: Freepbx default
Fax email : Should I put my email address here, you had it empty on your walkthrough. If I put my email address here then maybe it will email me??
Fax Detection type: NvFax ( I had that working before with tdm400p, didn't have to try zap as one user suggested)
Pause after answer: 6, I tried 10 and up
I will give this another go because fax to email is such a nice feature of trixbox. At this point, I am back in square 1, trying to make trixbox recognize faxes. But I did it once before, I know that I can do it again.
ps- I should have dumped the tdm400p and go with the sangnoma!!
jthong555 wrote:
1. How much latency is too much. With default install of trixbox, it is at latency 32. Is that normal? I tried reinstalling and give it a different pci slot. still samething. latency 32.
I don't know, because I don't use any PCI stuff.
jthong555 wrote:
2. I reinstall my trixbox v1.1 and before the updates, irq's are like 7,10,11. The TDM400p uses irq 7 . after I did the trixbox updates to v 1.1.1, everything got push up into the hundreds, ex. tdm400p becomes irq 177, nic card uses 169, vga uses 193.
Then it's misreading the system -- try "lspci -vv" to see what's really on what.
jthong555 wrote:
3.. under inbound routes on Fax Handling here is what I have:
Fax Exten: Freepbx default
Fax email : Should I put my email address here, you had it empty on your walkthrough. If I put my email address here then maybe it will email me??
Fax Detection type: NvFax ( I had that working before with tdm400p, didn't have to try zap as one user suggested)
Pause after answer: 6, I tried 10 and up
Leave blank what I said to leave blank. In my walkthrough, the email address is set in the General Settings page, not on the Incoming Route page. (Only set it on an incoming route if you want faxes on that DID to go somewhere other than normal.)
I just purchased myself a spa3102 because of having so much issues trying to get faxing to work. Did everything in this forum again that was related to the tdm400p, but is having a question about incoming: Do I still setup fax detection on incoming via freepbx or is setting it up in the spa3102 enough? Whenever I setup fax detection to NvFax, it killed my incoming main greeting. I had to disable it for incoming to work. Anybody?
Fax Extension: FreePBX Default
Fax Email:
Fax Detection Type: NVFax---(IF I SETUP TO THIS THEN IT DOESN't kick to IVR.)
Pause After Answer: 6
P.S It's probably a downhill battle from here because I don't have any issues dealing with the ZAP stuff. Just need a good Samaritan!
Need to get faxing working!
:-(
I have trixbox running with 2 fax systems on my production / business config and no prob.
I have an external hylafax server with iaxmodem for incoming routed from did
I also have a Cisco ATA 186 attached to a brother intellifax 4100e and both seem to be fine. I probably send 30-40 faxes a day and have yet to have any problems. Receiving about 20 pages a day roughly. Faxes get sent to my email no problemo. Pure VOIP install running ulaw through the wan and internally.
Maybe I'm the oddball case that doesn't have any problems.. heh.. who knows.. but It's pretty damn solid on my end.
I was having terrible trouble getting my TDM400P fxo card to receive faxes. I tried many of the fixes detailed here. It turned out that I didn't have the Gain on the card turned up high enough. Thanks to Kerry's excellent video tutorials I use ztmonitor in /usr/sbin to adjust the gain to a level that works well for both voice and fax. The gain is adjusted in zapata.conf.
I hope this helps someone.
Harry

Member Since:
2006-06-03