Topic: Fax For Asterisk Integration [Comments: 43]
voicedata

Sat, 01/23/2010 - 15:03 | Fax For Asterisk Integration

The new version with FFA integration looks AWESOME. The problem is I am having trouble getting it to work.

I have done all of the steps here http://www.thirdlane.com/forum/how-to-install-and-use-digium-fax-for-ast... and according to digium's guide however, the Send Fax function in the user portal is not working for me. Neither is setting up an inbound route to go to Feature Extension for Fax For Asterisk.

When I try to send a fax to the inbound route I setup to receive faxes, I get an error 43 on a regular fax machine.

When I try to send a pdf as fax through the user portal, it gives no error but it just reloads the Send Fax page.

I am positive that FFA is installed correctly . I can go into asterisk and do a "fax show stats" command and it correctly shows the licenses that we installed.

Do you guys have any advice for correctly integrating Fax For Asterisk with PBX Manager??

eeman

Sun, 01/24/2010 - 03:54 | does tiff images work? maybe

does tiff images work? maybe your ghostscript is broken

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

voicedata

Mon, 01/25/2010 - 19:49 | My faxing is partially

My faxing is partially working...heres whats going on:

I do have some faxes that have been coming into my /var/spool/asterisk/fax directory. When I try to fax from a standard machine, it gives me a communication error. However, I can see that it did indeed start to create a file in the /fax directory, but that file is only 8 or 78 bytes in size.

As far as emailing a report, that does not work. Also, the Send Fax function does not send the fax or send me a report to my email.

This is funny because email works on the system, for example, voicemail to email works fine.

What could it be??

Is it absolutely necessary to completely remove the sandsp faxing modules to get FFA to work?

cbbs70a

Mon, 01/25/2010 - 20:29 | Yes.

Yes.

voicedata

Mon, 01/25/2010 - 21:28 | I have removed the spansp

I have removed the spansp modules.

Is there any specific location ghostscript must be installed to?

cbbs70a

Mon, 01/25/2010 - 22:03 | It should already be

It should already be installed at /usr/bin/gs. Just make sure you install it in the same place, wherever it is. Otherwise there will be problems if its installed in multiple locations. I've had good results with ghostscript-8.64-9.3. If you want, I made the rpms available at
http://www.voipbusiness.us/downloads.

FSD

eeman

Tue, 01/26/2010 - 08:34 | verify the 'fax show stats'

verify the 'fax show stats' command works for you from CLI.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

voicedata

Tue, 01/26/2010 - 16:33 | fax show stats works...it

fax show stats works...it shows my licenses and everything fine.

I was debating on updating gs just to see if it helps but I have a feeling its working fine. My voicemail to email works beautifully.

voicedata

Wed, 01/27/2010 - 21:14 | It seems as if it is working

It seems as if it is working now, since I removed the old fax extensions.

I am still having issues sending faxes through the user portal.

I also need to know which config file controls the email that is sent when a fax is received.
I tried looking through various configs and could not find it.

Thanks

eeman

Thu, 01/28/2010 - 01:47 | if you know how to read

if you know how to read dialplan check out the tl-faxsend script in the special_features.include file. It will step you through the entire fax sending process from the time it enters dialplan.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

cbbs70a

In the scenario where the PBX is only a fax server, what is the best version of Asterisk (1.6 branch) that you recommend with Digium's Fax for Asterisk modules? If it's only a fax server, then I don't really need to worry about all the features that are now broken in 1.6.
Thanks;
FSD

eeman

Thu, 01/28/2010 - 17:26 | 1.6 is the only branch that

1.6 is the only branch that will give you T.38 end-point support if your service is from a sip provider. If they are connecting via PRI then I dont think it makes much difference whether its 1.4 or 1.6. There is some issue I've noticed with 1.6.1.x branch and my FXS module at home where, while on a call, another call will come in and one of 3 things happen 1) full crash 2) one way audio 3) some horrible squealing sound. Aside from that i havent run into any other problem yet. I temporarily disabled call waiting on the FXS line until I can get digium to fix it.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

cbbs70a

Thu, 01/28/2010 - 17:32 | Voicedata; What does the

Voicedata;
What does the output of the CLI say? Also, Check to see if the callfile is still in /var/spool/asterisk/outgoing. If so, look at the file ownership. If the callfile is owned by root, that would be the problem.
Try sending the fax by dropping a callfile into the outgoing directory. First make sure the file has the correct owner and group (asterisk). Here is a typical example.

Channel: Local/5555551212@from-inside
MaxRetries: 12
RetryTime: 300
WaitTime: 60
Context: tl-faxsend
Extension: s
Priority: 1
Set: FILENAME=/tmp/101-2010-00-28-12-23-26.tiff
Set: STATIONID=5555551234
Set: CONFSUCCESS=1
Set: EMAILADDR=foo@foobar.com
Set: REMOTENUMBER=5555551212

cbbs70a

Thu, 01/28/2010 - 17:37 | EEman; Sorry. I should of

EEman;
Sorry. I should of been clearer. What I meant was 1.6.0, 1.6.1, 1.6.2? Or does it not really matter?
FSd

eeman

Thu, 01/28/2010 - 18:42 | somewhere in the later

somewhere in the later versions of 1.6.0 and 1.6.1 they did some major cleanup of t38 so make sure you at least run the latest of either branch. I am aware of no bugs at this time with the faxing module.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

voicedata

Thu, 01/28/2010 - 18:46 | FSD..Thanks for the help.

FSD..Thanks for the help. You were right, all of the files did indeed have the owner as root.

The files in /outgoing look to be in perfect format (aside from the owner). I dropped one back in there but will it auto send just by being in the /outgoing directory??

How can I fix it so that the owner is always asterisk??

Also, I looked in the features include file and saw the dialplan but could not determine how to edit the format of the email that is sent. I figured out how to do it for voicemail to email (in the voicemail.conf) but I can not figure this one out. Any insight would be greatly appreciated.

eeman

Thu, 01/28/2010 - 19:28 | I've always run my asterisk

I've always run my asterisk as user root in order to send correct qos headings etc. I'll see if theres a way to check directory ownership and make sure the created file gets changed to the same ownership as the directory.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

cbbs70a

Thu, 01/28/2010 - 20:22 | Yes, dropping the call file

Yes, dropping the call file in the directory initiates the call immediately. Whenever one of my custom apps creates a call file, I always get the owner and group of the outgoing directory and set the call file ownerships accordingly just like Eric said.
FSD

voicedata

Thu, 01/28/2010 - 21:00 | How about if I set the

How about if I set the permissions of the directory so that Others that are not in the group can read/write. Would that fix it?

I am a novice linux user so I do not know but perhaps there is a setting so that when a file is moved/copied to a certain directory, it automatically inherits the group/owner to match the group/owner of that directory.

voicedata

Thu, 01/28/2010 - 21:28 | I found this: Setting the

I found this:

Setting the SGID attribute on a directory : chmod g+s
If the SGID (Set Group Identification) attribute is set on a directory, files created in that directory inherit its group ownership. If the SGID is not set the file's group ownership corresponds to the user's default group.

In order to set the SGID on a directory or to remove it, use the following commands:

chmod g+s directory
chmod g-s directory

Would this work to make sure all files have the owner asterisk??

eeman

Thu, 01/28/2010 - 21:45 | thats group ownership... it

thats group ownership... it will make the file still owed by root but the group is owned by the directory owner.

If the file is created

-rw-rw-r-- root asterisk filename

then it will delete ok

if its

-rw-r--r-- root asterisk filename

then deleting it as user asterisk will confirm you want to delete a write protected file... not sure how asterisk handles that with a filepointer. Only way to know for sure is to experiment.

good RTFM'ing btw.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

voicedata

Fri, 01/29/2010 - 16:34 | Thanks for the information.

Thanks for the information. Wouldnt those commands, require that I go back and run them every time I want the fax to actually send?? There's gotta be a solution so that it can automatically send.

How is it setup for those that it actually works for?? What can be done so that the process is automated?

eeman

Fri, 01/29/2010 - 17:19 | those arent commands... do a

those arent commands... do a ls -l and you'll understand

How is it setup for those that it actually works for?? What can be done so that the process is automated?

I run asterisk with root user permissions

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

voicedata

Fri, 01/29/2010 - 17:47 | I see...it is the permissions

I see...it is the permissions for the files. But is there a way for me to setup inheritable permissions so that all files automatically get the asterisk owner??

Running asterisk as root sounds like another solution. How can I make this change??

Please excuse me being a linux newbie...I'm trying to learn. Thanks for all your patience and help.

macjacfish

Fri, 01/29/2010 - 18:15 | Thanks for the RPM...I

Thanks for the RPM...I downloaded it to the root and tried rpm -U ghostscrip... and I get a "No such file or directory" error...

Am I doing the update wrong and if so can you tell me the correct procedure?

cbbs70a

Sat, 01/30/2010 - 14:59 | As far as the RPM

As far as the RPM installation goes, I honestly have no idea. If you try it with a -v, it may give you some output that's meaningful.
FSD

cbbs70a

Sat, 01/30/2010 - 15:02 | Voicedata; Ultimately, a

Voicedata;
Ultimately, a real fix is going to have to come from Thirdlane. Changing the perms on /var/spool/asterisk/outgoing should work, but its only a temporary fix.
FSD

voicedata

Sun, 01/31/2010 - 11:24 | FSD, Thanks for all your

FSD,
Thanks for all your continued help.

Is it a bug in the application or is it something that could be remedied with a fresh install??

What specific permissions would make it work temporarily?

cbbs70a

Mon, 02/01/2010 - 20:15 | I did some testing on my own

I did some testing on my own and I was not able to originate a call using a root-owned call file even with the outgoing directory mode 777. That makes sense now that I think about it. If you really need this feature to work right away, then I think you have two options. The first is to be really, really nice to Alex and try to persuade him to issue a bug fix quickly. The second would be to run Asterisk as root (Eric does this). But, in my opinion, if you are not Unix/Asterisk savvy, then I do not suggest the second option at all. I do not feel comfortable giving you a list of Unix commands to run in order to accomplish this in the event that something breaks. Yeah, it would be trivial to fix anything that breaks, but not if you are not technically savvy enough. Perhaps someone will write a small shell script that will make all the necessary changes automatically. Hint?
Regards;
FSD

eeman

Mon, 02/01/2010 - 20:26 | different iso's did it

different iso's did it differently... executing asterisk with the -U and -G options was the wrong way to do it and they eventually stopped that method and went to the /etc/asterisk/asterisk.conf method, which in 1.4.22 + allowed one to retain some permissions for tos settings. At risk here are the directories asterisk actually has to write to, /var/spool/asterisk/* dirctories as well as /var/log/asterisk/*. Going from root to some other non-privileged user required an ownership change. Changing _to_ a root user wont break anything since the root owned process can prettymuch do anything it wants to. The problems would only appear after changing back to the non-privileged user. that /etc/init.d/pbxportal script went through all the directories and re-owned them as 'asterisk'. I usually replace that with the stock asterisk systemV script. It would be trivial for a user to alter pbxportal to replace asterisk with root as the user/group when it does its permissions setup.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

diffen

Mon, 02/01/2010 - 23:55 | Hello Im sorry but i have to

Hello

Im sorry but i have to ask, the fax for asterisk function does that work so that you send a email to number@domain of your asterisk and attach a .pdf file. then the asterisk sends the attachment as a fax to the number?

br

jörgen

Best regards

Jörgen Andersson

Svenska IP-Telefonibolaget AB

eeman

Tue, 02/02/2010 - 03:36 | no its an upload page. if you

no its an upload page. if you are going through the trouble of emailing a pdf why the hell arrent you mailing it directly to the recipient, lol.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

diffen

Tue, 02/02/2010 - 08:13 | hehe in sweden many companies

hehe in sweden many companies still want to use their faxes when receiving orders and so on. dont ask me why :)=

Best regards

Jörgen Andersson

Svenska IP-Telefonibolaget AB

eeman

Tue, 02/02/2010 - 12:27 | they are mistakenly led to

they are mistakenly led to believe its a binding contract even though its been case law, over and over, that a fax is proof of nothing. Now that the FCC, with backing by AT&T, is making plans to switch the entire PSTN over to voip; it's going to be the final nail in the coffin for faxing. If faxing survives that shift, it will only be because it stopped being faxing and started being something entirely new that just looks like faxing on the surface (like some peer to peer negotiated IP transfer).

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

voicedata

Tue, 03/16/2010 - 22:05 | I see that the new Thirdlane

I see that the new Thirdlane came out. I'm sure the Send Fax bug has been fixed but unfortunately for me, my update contract ran out a couple weeks before the update. Now, I'm stuck with having to shell out a grand if I want to get the update.

Is there any way that I can manually fix the configuration so that the User Portal Send Fax will work??

dlapid

Sat, 04/10/2010 - 22:53 | Fax Send doesn't work

Hello,

We just installed FFA, it seems to be working fine for fax-to-email, and 'fax show stats' works and we can see our licenses, but sending out faxes wont work. We get an error '3RD_FRM_CHECK_ERROR'.

Anyone know how to resolve this?

Thanks,

Doron

eeman

Sat, 04/10/2010 - 22:57 | usually thats a codec

usually thats a codec problem... you cant fax over any codec besides g711 for inband faxing.. you'll need to turn off everything but ulaw on your outbound trunk.

this is asterisk 1.4?

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

dlapid

Sat, 04/10/2010 - 23:05 | Thanks for the fast response,

Thanks for the fast response, eeman!

It is Asterisk 1.6.0.6
PBX Manager 6.0.1.78
User Portal 2.1.4.78

g711u is the only codec allowed. Does FFA - Send Fax support T.38? or is it required?

Any other ideas?

-Doron

cbbs70a

Sat, 04/10/2010 - 23:14 | Sometimes its more efficient

Sometimes its more efficient to open a trouble ticket with Digium. I mean thats what you paid for, right? When you open the trouble ticket, tell them you want to be connected to an engineer now, while you are on the phone. When you're connected to an engineer, make them log into your system right there on the spot. In my experience, don't cut those guys one inch of slack, otherwise your trouble ticket will be open for weeks without resolution.
FSD

eeman

Sat, 04/10/2010 - 23:15 | ahh, yea that particular

ahh, yea that particular version didnt auto-negotiate t38.. they fixed it in later versions.. thats why the different res_fax modules for pre 1.6.0.14:

modify this line in tl-faxsend

change

exten => s,n,SendFAX(${FILENAME},${OPTIONS})

to

exten => s,n,SendFAX(${FILENAME},z${OPTIONS})

that should initiate your t38

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

dlapid

Mon, 04/12/2010 - 08:34 | Thanks, eeman! Those edits

Thanks, eeman! Those edits made it work!

Is there a way I could specify which trunk to use for FFA calls? I want to route fax calls to a different trunk than voice calls.

-Doron

eeman

Mon, 04/12/2010 - 11:50 | when we designed the module,

when we designed the module, we had to look at the fact that so many customers set their trunks up differently and in some cases set up different trunks for different tenants. In addition to the trunk itself there are lots of variables as to how the call is manipulated (ie prepending or striping digits). In addition to that the users themselves are known to enter numbers differently (11 digit vs 10 digit vs 7 digit). As a result we designed the module to use pre-existing dialplan patterns as the best way to deliver the fax.

For you to achieve a goal of different trunks, you would have to create a unique pattern in outbound routes and assign that trunk to that pattern (for example dialing 8 in front of the number). This, of course, would create a pattern like _81NXXNXXXXXX. The downside to this method, is that training will be required to get your customer to always put in a 12 digit pattern that starts with an 8 in order for this trunk to get utilized.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

owenc

Mon, 05/03/2010 - 23:35 | Still permission issues with 6.0.1.81

I've upgraded to 6.0.1.81 and it has fixed the issues with the call files. However, I'm still having issues with the faxes themselves.

Everything actually works but the sendfax script is unable to delete the /tmp/tenant-date.tiff files when it is done.

The files are owned by root and set as 644. Apparently the sendfax script is run as asterisk so they aren't able to delete the tiff files.

What is sort of weird is the script doesn't just fail to do the delete like I'd expect but rather the sendfax script just hangs.

For now I've just commented out the rm command from the script but that isn't ideal, especially since these tiff files are world readable.

iyewo

I want to implement fax server on asterisk. I am new to this fax project and would greatly appreciate from you guys who have implmented it with success stories. Step-by-step guide is an added plus. Thanks.