I'm using Slackware 11. I unistalled the package that provides libtiff 3.8..... and installed the most current 3.7.... for lib tiff. I downloaded asterisk 1.4 beta3 and the 1.4 beta2 addons and untared them. created a simlink: ln -s asterisk-1.4.0-beta3 asterisk I've compiled spandsp from as follows cd /usr/src wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.3pre24.tgz tar -xzvf spandsp-0.0.3pre24.tgz cd spandsp-0.0.3 ./configure make make install I downloaded the rxfax, txfax, and patch files as folows: cd /usr/src/asterisk/ wget http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/app_rxfax.c wget http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/app_txfax.c wget http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/asterisk.patch I tried to apply the patch but it failed so I applied it by hand. did ./configure make menuselect selected the fax rxfax and txfax applications and saved/exited (x option). next make make install make samples no errors for any above cleaned up the sip.conf and extensions.conf to only have one "trunk" line defined and DID to the fax context in extensions.conf I can successfully have a fax machine call the asterisk box, it answer the call and start the rxfax application. Unfortunately it doesn't do anything. here is the console log of recieving a fax call: asterisk -vvvvvvvvvvvvvvr Connected to Asterisk SVN-branch-1.4-r46117M currently running on saster (pid = 12516) Verbosity is at least 14 -- Executing [(asteriskfaxnumber)@dids-inbound:1] Goto("SIP/xx.xxx.xx.xx-0821ec78", "incomingfax|fax|1") in new stack -- Goto (incomingfax,fax,1) -- Executing [fax@incomingfax:1] Set("SIP/xxx.xxx.xx.xx-0821ec78", "FAXFILE=/tmp/recievedfax.tif") in new stack -- Executing [fax@incomingfax:2] RxFAX("SIP/xxx.xxx.xx.xx-0821ec78", "/tmp/recievedfax.tif") in new stack saster*CLI> and that is where it just sits. no further messages. the target file does not exist and the directory should have acceptable rights. ls -ld /tmp drwxrwxrwt 10 root root 568 2006-11-20 10:47 /tmp/ the fax machine just sits there sending the fax beeps for about 30 seconds before timing out. when i call from a regular phone all i get is silence. I also tried initiating a fax to the fax machine. converted a pdf to /tmp/test.tif chmod 666 /tmp/test.tif created a fax.call and moved it into /var/spool/asterisk/outgoing/ that successfully initiated the call and txfax app. however the txfax still did nothing I tried a loop back to the asterisk server with the basic same results. here is the console log: -- Attempting call on SIP/sipfaxline/(asteriskfaxnumber) for out_fax@outgoingfax:1 (Retry 1) -- Executing [(asteriskfaxnumber)@dids-inbound:1] Goto("SIP/xxx.xxx.xx.xx-08237608", "incomingfax|fax|1") in new stack -- Goto (incomingfax,fax,1) -- Executing [fax@incomingfax:1] Set("SIP/xxx.xxx.xx.xx-08237608", "FAXFILE=/tmp/recievedfax.tif") in new stack -- Executing [fax@incomingfax:2] RxFAX("SIP/xxx.xxx.xx.xx-08237608", "/tmp/recievedfax.tif") in new stack [Nov 20 14:00:57] NOTICE[19864]: pbx_spool.c:341 attempt_thread: Call failed to go through, reason 0 -- Attempting call on SIP/sipfaxline/(asteriskfaxnumber) for out_fax@outgoingfax:1 (Retry 2) -- Executing [(asteriskfaxnumber)@dids-inbound:1] Goto("SIP/xxx.xxx.xx.xx-0824ddf8", "incomingfax|fax|1") in new stack -- Goto (incomingfax,fax,1) -- Executing [fax@incomingfax:1] Set("SIP/xxx.xxx.xx.xx-0824ddf8", "FAXFILE=/tmp/recievedfax.tif") in new stack -- Executing [fax@incomingfax:2] RxFAX("SIP/xxx.xxx.xx.xx-0824ddf8", "/tmp/recievedfax.tif") in new stack [Nov 20 14:01:13] NOTICE[19869]: pbx_spool.c:341 attempt_thread: Call failed to go through, reason 0 saster*CLI> the sip.conf file has the relivent setting for the connection being used: [sipfaxline] type=friend nat=never host=xxx.xxx.xx.xx disallow=all allow=ulaw dtmfmode=auto context=dids-inbound canreinvite=yes nat=never I do not have any hardware phone or audio cards in the machine. I don't think this should matter from what I've read to at least get some results. Once I prove the concept I'll get some hardware for quality purposes. I had a real had time trying to find how to patch asterisk 1.4 for spandsp until I finally ran across the files that I listed above that I downloaded. Hopefully this post will also help others that are having a hard time just getting everything compiled, as I did!!!! I've done quite a bit of reading of posts but this is my first time posting. Thanks in advance for any ideas. Dave
daveasterisk
2006-Nov-21 16:33 UTC
[asterisk-users] Re: Spandsp rxfax txtax fails no errors
Is there anyone who can help with this? rxfax and txfax when called in the extensions do nothing and no error are generated that I can find. Thanks Dave daveasterisk wrote:> I'm using Slackware 11. > I unistalled the package that provides libtiff 3.8..... > and installed the most current 3.7.... for lib tiff. > > I downloaded asterisk 1.4 beta3 and the 1.4 beta2 addons and untared > them. > created a simlink: > ln -s asterisk-1.4.0-beta3 asterisk > > I've compiled spandsp from as follows > > cd /usr/src > wget > http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.3pre24.tgz > tar -xzvf spandsp-0.0.3pre24.tgz > cd spandsp-0.0.3 > ./configure > make > make install > > I downloaded the rxfax, txfax, and patch files as folows: > > cd /usr/src/asterisk/ > wget > http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/app_rxfax.c > > wget > http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/app_txfax.c > > wget > http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/asterisk.patch > > > I tried to apply the patch but it failed so I applied it by hand. > > did > > ./configure > make menuselect > > selected the fax rxfax and txfax applications and saved/exited (x > option). > next > > make > make install > make samples > > no errors for any above > > cleaned up the sip.conf and extensions.conf to only have one "trunk" > line defined and DID to the fax context in extensions.conf > > > I can successfully have a fax machine call the asterisk box, it answer > the call and start the rxfax application. Unfortunately it doesn't do > anything. > here is the console log of recieving a fax call: > > asterisk -vvvvvvvvvvvvvvr > Connected to Asterisk SVN-branch-1.4-r46117M currently running on > saster (pid = 12516) > Verbosity is at least 14 > -- Executing [(asteriskfaxnumber)@dids-inbound:1] > Goto("SIP/xx.xxx.xx.xx-0821ec78", "incomingfax|fax|1") in new stack > -- Goto (incomingfax,fax,1) > -- Executing [fax@incomingfax:1] > Set("SIP/xxx.xxx.xx.xx-0821ec78", "FAXFILE=/tmp/recievedfax.tif") in new > stack > -- Executing [fax@incomingfax:2] > RxFAX("SIP/xxx.xxx.xx.xx-0821ec78", "/tmp/recievedfax.tif") in new stack > saster*CLI> > > and that is where it just sits. no further messages. > the target file does not exist and the directory should have acceptable > rights. > > ls -ld /tmp > drwxrwxrwt 10 root root 568 2006-11-20 10:47 /tmp/ > > the fax machine just sits there sending the fax beeps for about 30 > seconds before timing out. when i call from a regular phone all i get is > silence. > > I also tried initiating a fax to the fax machine. > converted a pdf to /tmp/test.tif > chmod 666 /tmp/test.tif > created a fax.call and moved it into /var/spool/asterisk/outgoing/ > that successfully initiated the call and txfax app. > however the txfax still did nothing > I tried a loop back to the asterisk server with the basic same results. > here is the console log: > > -- Attempting call on SIP/sipfaxline/(asteriskfaxnumber) for > out_fax@outgoingfax:1 (Retry 1) > -- Executing [(asteriskfaxnumber)@dids-inbound:1] > Goto("SIP/xxx.xxx.xx.xx-08237608", "incomingfax|fax|1") in new stack > -- Goto (incomingfax,fax,1) > -- Executing [fax@incomingfax:1] Set("SIP/xxx.xxx.xx.xx-08237608", > "FAXFILE=/tmp/recievedfax.tif") in new stack > -- Executing [fax@incomingfax:2] RxFAX("SIP/xxx.xxx.xx.xx-08237608", > "/tmp/recievedfax.tif") in new stack > [Nov 20 14:00:57] NOTICE[19864]: pbx_spool.c:341 attempt_thread: Call > failed to go through, reason 0 > -- Attempting call on SIP/sipfaxline/(asteriskfaxnumber) for > out_fax@outgoingfax:1 (Retry 2) > -- Executing [(asteriskfaxnumber)@dids-inbound:1] > Goto("SIP/xxx.xxx.xx.xx-0824ddf8", "incomingfax|fax|1") in new stack > -- Goto (incomingfax,fax,1) > -- Executing [fax@incomingfax:1] Set("SIP/xxx.xxx.xx.xx-0824ddf8", > "FAXFILE=/tmp/recievedfax.tif") in new stack > -- Executing [fax@incomingfax:2] RxFAX("SIP/xxx.xxx.xx.xx-0824ddf8", > "/tmp/recievedfax.tif") in new stack > [Nov 20 14:01:13] NOTICE[19869]: pbx_spool.c:341 attempt_thread: Call > failed to go through, reason 0 > saster*CLI> > > the sip.conf file has the relivent setting for the connection being used: > > [sipfaxline] > type=friend > nat=never > host=xxx.xxx.xx.xx > disallow=all > allow=ulaw > dtmfmode=auto > context=dids-inbound > canreinvite=yes > nat=never > > I do not have any hardware phone or audio cards in the machine. I don't > think this should matter from what I've read to at least get some > results. Once I prove the concept I'll get some hardware for quality > purposes. > > I had a real had time trying to find how to patch asterisk 1.4 for > spandsp until I finally ran across the files that I listed above that I > downloaded. > Hopefully this post will also help others that are having a hard time > just getting everything compiled, as I did!!!! > > I've done quite a bit of reading of posts but this is my first time > posting. > Thanks in advance for any ideas. > > Dave > >
On Mon, Nov 20, 2006 at 02:25:30PM -0800, daveasterisk wrote:> -- Executing [fax@incomingfax:2] > RxFAX("SIP/xxx.xxx.xx.xx-0821ec78", "/tmp/recievedfax.tif") in new stack > saster*CLI> > > and that is where it just sits. no further messages. > the target file does not exist and the directory should have acceptable > rights.I'm not well-familiar with rxfax, but I recall it has a 'debug' option. Could you try using it? One other sanity check: make sure you're not out of disk space: df /tmp -- Tzafrir Cohen icq#16849755 jabber:tzafrir@jabber.org +972-50-7952406 mailto:tzafrir.cohen@xorcom.com http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
daveasterisk
2006-Nov-29 14:36 UTC
[asterisk-users] Re: Spandsp rxfax txtax fails no errors
Thanks for the response!!! I enabled debuging in the menuselect configuration for compiling asterisk 1.4 beta3. In logging.conf enabled debug loggin to the /var/log/asterisk/debug file and to the console. Restarted (not just reload) asterisk and there is plenty of general debugging info in the debug log file. I also am calling the fax apps with debug argument as follows exten => fax,n,rxfax(${FAXFILE}|debug) and exten => fax,n,rxfax(${FAXFILE}|debug) Looking at the code in app_rxfax.c and app_txfax.c there should be plenty of information in the debug log on failure or success. However I haven't found any debug log information that should be generated. It is like it just does a return 0 at the beginning of the application. I found some documentation on the system() call that says that the dial plan will jump to n+101 priority if the return value is not 0. So I setup the dial plan: [outgoingfax] exten => out_fax,1,Wait(2) exten => out_fax,2,txfax(${TXFAX_NAME}|caller|debug) exten => out_fax,3,system(echo sent fax file ${TXFAX_NAME} > /tmp/fax.log ) exten => out_fax,4,Hangup exten => out_fax,103,system(echo failed fax file ${TXFAX_NAME} > /tmp/fax.log ) exten => h,1,Hangup() No /tmp/fax.log file created at all. asterisk -rdddddddvvvvvvvvvvvvvvvvv -- Executing [out_fax@outgoingfax:1] Wait("SIP/inettrunk-081e8100", "2") in new stack -- Executing [out_fax@outgoingfax:2] TxFAX("SIP/inettrunk-081e8100", "/tmp/test.tif") in new stack [Nov 29 13:26:13] DEBUG[28613]: pbx_spool.c:391 scan_service: Delaying retry since we're currently running ' }+@ }+@ol/asterisk/outgoing/fax.call' [Nov 29 13:26:24] DEBUG[28613]: pbx_spool.c:391 scan_service: Delaying retry since we're currently running '/var/spool/asterisk/outgoing/fax.call' [Nov 29 13:26:35] DEBUG[28613]: pbx_spool.c:391 scan_service: Delaying retry since we're currently running 'h?,z+@ol/asterisk/outgoing/fax.call' From this it looks like it just gets stuck in the TxFAX app. Thanks!> On Tue, Nov 21, 2006 at 03:33:57PM -0800, daveasterisk wrote: > >> > Is there anyone who can help with this? >> > rxfax and txfax when called in the extensions do nothing and no error >> > are generated that I can find. >> > > I asked something similar on the list a while ago, got no answers and > took a look at the code myself and learned a little bit. Before > I used System(tiff2pdf....) to detect errors, which > wasn't so elegant, but worked well anyway. > > The description looks like this: > > *CLI> show application RxFAX > -= Info about application 'RxFAX' =- > > [Synopsis] > Receive a FAX to a file > > [Description] > RxFAX(filename[|caller][|debug]): Receives a FAX from the channel into the > given filename. If the file exists it will be overwritten. The file > should be in TIFF/F format. > The "caller" option makes the application behave as a calling machine, > rather than the answering machine. The default behaviour is to behave as > an answering machine. > Uses LOCALSTATIONID to identify itself to the remote end. > LOCALHEADERINFO to generate a header line on each page. > Sets REMOTESTATIONID to the sender CSID. > FAXPAGES to the number of pages received. > FAXBITRATE to the transmition rate. > FAXRESOLUTION to the resolution. > Returns -1 when the user hangs up. > Returns 0 otherwise. > > > If you read the code, a return value of -1 means error and 0 > means success, although not clearly stated so in the message > above. So far, that is what you would expect, but return values > are not testable in * dial plans, as far as I know. > > I modified app_rxfax.c to set FAXSTATUS to ERROR or SUCCESS and > got it working, but then I discovered that the four return variables > listed above are set only on success. I think that FAXPAGES > would be the best to use for error checking. But still, you > will not get a reason for the failure... > > There is a line in the code: > > ast_log(LOG_DEBUG, "Fax receive not successful - result (%d) %s.\n", result, t30_completion_code_to_str(result)); > > that shows us that written information on the type of error *is* available. > These message are in the spandsp code I suppose. > > Regards: H?kan