I have managed to get spandsp working, and if I dial a specific extension I can receive faxes. WhooHoo. However, I was wanting to use the "fax detect" option in order to allow individuals to receive faxes, but can't get that to work. Given the following extensions (mainly copied from examples on the wiki), why is the call simply passed onto the sip device rather than being detected as a fax ? Asterisk CVS-HEAD-02/02/05-07:11:04 built by asterisk on a i686 running Linux Spandsp is 0.2pre9 Incoming lines are E1 line 30 channels PRI. Many thanks. Julian. ============== exten => 442781,1,Goto(fax,1,1) ; dialling this number works exten => 442781,2,Hangup() exten => _4427XX,1,Answer() ; dialling any number in here does not exten => _4427XX,2,Macro(dialsip,${EXTEN:3}) exten => _4427XX,3,Hangup() exten => fax,1,Goto(fax,1,1) [macro-faxreceive] exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) exten => s,2,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN}) exten => s,3,rxfax(${FAXFILE}) exten => s,103,SetVar(EMAILADDR=jmls@tessera.co.uk) exten => s,104,Goto(3) [fax] exten => 1,1,Macro(faxreceive) exten => h,1,system(/usr/sbin/mailfax ${FAXFILE} ${EMAILADDR} \ "${CALLERIDNUM} ${CALLERIDNAME}") exten => h,2,Hangup()
Asterisk wrote:> I have managed to get spandsp working, and if I dial a specific > extension I can receive faxes. WhooHoo. > > However, I was wanting to use the "fax detect" option in order to > allow individuals to receive faxes, but can't get that to work. > > Given the following extensions (mainly copied from examples on the > wiki), why is the call simply passed onto the sip device rather than > being detected as a fax ? > > Asterisk CVS-HEAD-02/02/05-07:11:04 built by asterisk on a i686 > running Linux > > Spandsp is 0.2pre9 > > Incoming lines are E1 line 30 channels PRI. > > Many thanks. > > Julian. > > ==============> > exten => 442781,1,Goto(fax,1,1) ; dialling this number works > exten => 442781,2,Hangup() > > exten => _4427XX,1,Answer() ; dialling any number in here does notadd this: exten => _4427XX,2,Wait(3) \/ exten => _4427XX,3,Macro(dialsip,${EXTEN:3}) exten => _4427XX,4,Hangup()> > exten => fax,1,Goto(fax,1,1) > > [macro-faxreceive] > exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) > exten => s,2,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN}) > exten => s,3,rxfax(${FAXFILE}) > exten => s,103,SetVar(EMAILADDR=jmls@tessera.co.uk) > exten => s,104,Goto(3) > > [fax] > exten => 1,1,Macro(faxreceive) > > exten => h,1,system(/usr/sbin/mailfax ${FAXFILE} ${EMAILADDR} \ > "${CALLERIDNUM} ${CALLERIDNAME}") > exten => h,2,Hangup() > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Hmm, a little more digging got me further : I found the option faxdetect=both needed to be set in zapata.conf. Put this in. Works like a charm. Well, almost - the phone rang for about three rings before the autodetect kicked in and started the fax receive. Getting there .. Julian. Asterisk wrote:> I have managed to get spandsp working, and if I dial a specific > extension I can receive faxes. WhooHoo. > > However, I was wanting to use the "fax detect" option in order to allow > individuals to receive faxes, but can't get that to work. > > Given the following extensions (mainly copied from examples on the > wiki), why is the call simply passed onto the sip device rather than > being detected as a fax ? > > Asterisk CVS-HEAD-02/02/05-07:11:04 built by asterisk on a i686 running > Linux > > Spandsp is 0.2pre9 > > Incoming lines are E1 line 30 channels PRI. > > Many thanks. > > Julian. > > ==============> > exten => 442781,1,Goto(fax,1,1) ; dialling this number works > exten => 442781,2,Hangup() > > exten => _4427XX,1,Answer() ; dialling any number in here does not > exten => _4427XX,2,Macro(dialsip,${EXTEN:3}) > exten => _4427XX,3,Hangup() > > exten => fax,1,Goto(fax,1,1) > > [macro-faxreceive] > exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) > exten => s,2,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN}) > exten => s,3,rxfax(${FAXFILE}) > exten => s,103,SetVar(EMAILADDR=dummy@dummy.co.uk) > exten => s,104,Goto(3) > > [fax] > exten => 1,1,Macro(faxreceive) > > exten => h,1,system(/usr/sbin/mailfax ${FAXFILE} ${EMAILADDR} \ > "${CALLERIDNUM} ${CALLERIDNAME}") > exten => h,2,Hangup() > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Yes. It just never gets there. I have tested spandsp and associated libs by using: exten => s,2,Goto(fax,s,1) and it works fine. * just won't auto detect the fax call. On Tue, 08 Feb 2005 10:16:26 +1100, Howard Lowndes <lannet@lannet.com.au> wrote:> On Tue, 2005-02-08 at 09:49, Brian Dingman wrote: > > I am having the same problems. No matter what I try, * won't detect > > faxes. I have faxdetect=both in zaptel.conf and my extensions.conf > > looks like this: > > > > [fromPSTN] > > exten => s,1,Answer > > exten => s,2,DigitTimeout(2) > > exten => s,3,ResponseTimeout(10) > > exten => s,4,Wait(3) > > exten => s,5,Background(custom/ivr-greeting) > > > > exten => i,1,Wait(1) > > exten => i,2,Background(pbx-invalid) ; "That's not valid, try again" > > exten => i,3,Goto(s,5) > > > > exten => t,1,Background(goodbye) > > exten => t,2,Hangup > > > > exten => fax,1,Goto(fax,s,1) > > Apologies. I meant "You do have a context called "Fax"...?"
Thank you. Worked like a charm. I never would have caught that on my own. On Mon, 07 Feb 2005 23:06:54 -0500, Roger Gulbranson <roger@gulbranson.com> wrote:> On Mon, 2005-02-07 at 19:39 -0500, Brian Dingman wrote: > > Here is my zapata.conf file for grins > > > > [channels] > > ; > > ; X100P plugged into PSTN > > ; > > context=fromPSTN > > signalling=fxs_ks > > echocancel=yes > > echocancelwhenbridged=yes > > echotraining=yes > > relaxdtmf=yes > > rxgain=4.5 > > txgain=0.0 > > immediate=no > > busydetect=no > > callprogress=no > > musiconhold=default > > usecallerid=no > > callerid="Incoming" <000-000-0000> > > ;callerid=asreceived > > channel => 1 > > faxdetect=both > > The faxdetect=both must be BEFORE the channel => 1 > >