Re: [asterisk-users] Dialplan checkup

2007-02-09 Thread Steve Murphy
On Fri, 2007-02-09 at 18:35 -0500, Barry Fawthrop wrote:
> Hi All
> 
> Curious will this work
> Std. PSTN line  ---x-- X100p
>|
>-- Fax Machine
> Using a standard "home phone" pstn line with a splitter connecting a fax 
> machine and X100 Asterisk Box
> Incoming Line: Can I have in the dial Plan
> [incoming]
> exten  => s,1,Wait(1)
> exten  => s,2,IfFax continue to ring, so that the Fax Machine gets it
> exten  => s,3,Answer
> exten  => s,4,Playback(Message)
> exten  => s,5,Dial(SIP/1000&SIP/2000&SIP/3000)
> exten  => s,6,Hangup()
> exten  => fax,1,Wait(30)
> exten  => fax,2,Wait(10)
> exten  => fax,3,Hangup()
>  
> I'm wanting the line to ring,
> If it is a fax coming in then Asterisk leaves the line alone and lets 
> the fax machine handle the call. 
> If it is a call then Asterisk answers, plays a greeting and rings the IP 
> phones?

First, the in s,3 you answered the line. If the fax machine doesn't
answer on the first ring, it never will, because once asterisk picks up
the line, there won't be any more ringing.

Second, when s comes to an end, it will listen for a response, and be
able to hear and respond to the fax tone. In this case, you hang up
before that happens. So the fax extension can't be activated.


> 
> Question is how does asterisk detect the call without answering?
> I'm not wanting Asterisk to handle the call if it is a fax if possible???
> 
> I look forward to your input,
> Thank You
> 
> Barry
> ___
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [asterisk-users] Dialplan checkup

2007-02-09 Thread Yuan LIU

From: Barry Fawthrop <[EMAIL PROTECTED]>
Date: Fri, 09 Feb 2007 18:35:43 -0500

Hi All

Curious will this work
Std. PSTN line  ---x-- X100p
  |
  -- Fax Machine
Using a standard "home phone" pstn line with a splitter connecting a fax 
machine and X100 Asterisk Box

Incoming Line: Can I have in the dial Plan
[incoming]
exten  => s,1,Wait(1)
exten  => s,2,IfFax continue to ring, so that the Fax Machine gets it
exten  => s,3,Answer
exten  => s,4,Playback(Message)
exten  => s,5,Dial(SIP/1000&SIP/2000&SIP/3000)
exten  => s,6,Hangup()
exten  => fax,1,Wait(30)
exten  => fax,2,Wait(10)
exten  => fax,3,Hangup()
I'm wanting the line to ring,
If it is a fax coming in then Asterisk leaves the line alone and lets the 
fax machine handle the call. If it is a call then Asterisk answers, plays a 
greeting and rings the IP phones?


Question is how does asterisk detect the call without answering?
I'm not wanting Asterisk to handle the call if it is a fax if possible???


My impression is no (reliable) way.  Asterisk doesn't do silent answer kind 
of stuff.


However, if you can be flexible, many FAX machines have silent answer and 
includes a feature to ring the hand set if it determines the call is not for 
FAX.  You may be able to find a model that allows ringing of an external 
phone set.


Yuan Liu


I look forward to your input,
Thank You

Barry



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-09 Thread Barry Fawthrop

Thanks Guys

I already have the fax machine a brother all-in-one Printer, scanner, fax.
I realize the s,3, answers the line
But How can I get s,2, to detect if it is a fax and take it from there 
without answering?


Or can someone explain what make an incoming goto  exten => s,..
   and what make it go to exten => fax,
How does this logic work??

Thanks again

Barry

Barry Fawthrop wrote:

Hi All

Curious will this work
Std. PSTN line  ---x-- X100p
  |
  -- Fax Machine
Using a standard "home phone" pstn line with a splitter connecting a 
fax machine and X100 Asterisk Box

Incoming Line: Can I have in the dial Plan
[incoming]
exten  => s,1,Wait(1)
exten  => s,2,IfFax continue to ring, so that the Fax Machine gets it
exten  => s,3,Answer
exten  => s,4,Playback(Message)
exten  => s,5,Dial(SIP/1000&SIP/2000&SIP/3000)
exten  => s,6,Hangup()
exten  => fax,1,Wait(30)
exten  => fax,2,Wait(10)
exten  => fax,3,Hangup()
I'm wanting the line to ring,
If it is a fax coming in then Asterisk leaves the line alone and lets 
the fax machine handle the call. If it is a call then Asterisk 
answers, plays a greeting and rings the IP phones?


Question is how does asterisk detect the call without answering?
I'm not wanting Asterisk to handle the call if it is a fax if possible???

I look forward to your input,
Thank You

Barry


___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-09 Thread Yuan LIU

From: Barry Fawthrop <[EMAIL PROTECTED]>
Date: Fri, 09 Feb 2007 21:49:17 -0500

Thanks Guys

I already have the fax machine a brother all-in-one Printer, scanner, fax.
I realize the s,3, answers the line
But How can I get s,2, to detect if it is a fax and take it from there 
without answering?


It is not about dial plan.  Your original plan should work if you can get 
Asterisk/Zaptel to do "silent answer" (in priority 2).  Otherwise nothing is 
going to work.  On the other hand, all Brother IntelliFAX support silent 
answer (something they call intelligent ring or the like).  See if your 
machine has an TAD (telephone answering device) port - and old Brother I 
used had this.


If yes, you can enable silent answer on the FAX, then connect your 
X100P/Asterisk to this TAD port.  FAX machines usually monitors for FAX tone 
for 2 rings.  Some machines also cut off ring to TAD before it determines it 
the call is not for FAX; if not, simply program your Asterisk to wait for a 
few seconds before doing anything.  This should give you the same 
functionality.


Yuan Liu


Or can someone explain what make an incoming goto  exten => s,..
   and what make it go to exten => fax,
How does this logic work??

Thanks again

Barry

Barry Fawthrop wrote:

Hi All

Curious will this work
Std. PSTN line  ---x-- X100p
  |
  -- Fax Machine
Using a standard "home phone" pstn line with a splitter connecting a fax 
machine and X100 Asterisk Box

Incoming Line: Can I have in the dial Plan
[incoming]
exten  => s,1,Wait(1)
exten  => s,2,IfFax continue to ring, so that the Fax Machine gets it
exten  => s,3,Answer
exten  => s,4,Playback(Message)
exten  => s,5,Dial(SIP/1000&SIP/2000&SIP/3000)
exten  => s,6,Hangup()
exten  => fax,1,Wait(30)
exten  => fax,2,Wait(10)
exten  => fax,3,Hangup()
I'm wanting the line to ring,
If it is a fax coming in then Asterisk leaves the line alone and lets the 
fax machine handle the call. If it is a call then Asterisk answers, plays 
a greeting and rings the IP phones?


Question is how does asterisk detect the call without answering?
I'm not wanting Asterisk to handle the call if it is a fax if possible???

I look forward to your input,
Thank You

Barry


___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-10 Thread Gordon Henderson

On Fri, 9 Feb 2007, Barry Fawthrop wrote:


Hi All

Curious will this work
Std. PSTN line  ---x-- X100p
 |
 -- Fax Machine



Question is how does asterisk detect the call without answering?
I'm not wanting Asterisk to handle the call if it is a fax if possible???


As other replys have indicated, it's probably not possible, but have you 
considered using spandsp & rxfax and have asterisk take the fax and email 
it to you?


Crude (but currently working) example here:

FaxFile=/var/tmp/fax
[EMAIL PROTECTED],[EMAIL PROTECTED]

office=Zap/4; Analogue phone on the TDM400 card.
kevin=IAX2/kevin; Kevins laptop
ken=IAX2/ken&SIP/ken; Kens laptop
officePhones=${office}&${kevin}&${ken}

[incoming]

exten => s,1,Noop(PSTN CALL from ${CALLERIDNUM})
exten => s,n,Goto(internal,incoming,1)

[internal]

exten => incoming,1,Set(DB(100/lnd)=${CALLERIDNUM})
exten => incoming,n,Answer()
exten => incoming,n,Wait(3)
exten => incoming,n(enter),BackGround(if-u-know-ext-dial)
exten => incoming,n,BackGround(or)
exten => incoming,n,BackGround(pls-hold-while-try)
exten => incoming,n,WaitExten(10)
exten => incoming,n,Ringing()
exten => incoming,n,Dial(${officePhones},15,on)
exten => incoming,n,VoiceMail(100&101&102,us)
exten => incoming,n,Hangup()

exten => fax,1,Set(LOCALSTATIONID=My Fax Machine)
exten => fax,n,RxFax(${FaxFile}.tif)
exten => fax,n,System(/bin/echo ${REMOTESTATIONID} > ${FaxFile}.csid)
exten => fax,n,System(/bin/echo ${CALLERIDNUM} > ${FaxFile}.cidn)
exten => fax,n,System(/usr/bin/tiff2pdf ${FaxFile}.tif > ${FaxFile}.pdf)
exten => fax,n,System(/usr/bin/mpack -s "FAX From 
[${REMOTESTATIONID}:${CALLERIDNUM}]" ${FaxFile}.pdf ${FaxDestinationEmail})
exten => fax,n,Hangup()

exten => i,1,Wait(1)
exten => i,n,Playback(pbx-invalid)
exten => i,n,Goto(internal,incoming,enter)

exten => t,1,Hangup()

--
Gordon

___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [asterisk-users] Dialplan checkup

2007-02-10 Thread Robert Jenkins
Hi,
As far as I understand,
Fax detection works by the fax machine sending a specific tone down the
line.

Until the phone has been answered, there is no audio path so the receiving
end cannot know what type of call it is.

The stand-alone fax switch devices that appear from the calling end to work
without answering actually answer the call then, if it's not a fax call,
generate the ring signal for the phone themselves.

The way it works with a Fax machine designed to work with a separate
answering machine is either:
The fax has an internal 'fax switch' function that generates a ring to the
external device, or

the fax waits for the answering machine to pick up the line, then 'snoops'
the audio for the fax identification tony and takes over the call if it
detects it.

Either way, you cannot determine if it's a fax call without answering it.


If your machine has a 'through' phone outlet for an answering machine (and
the fax uses the snooping method of fax detection), you should be able to
use this for the Asterisk trunk and as long as the Asterisk box *always*
answers at some point, either via someone receiving the call or voicemail /
IVR kicking in.

Once the call is answered, the fax would be able to detect any tone on the
line and take over if required, dropping the line out to the asterisk
system.


Robert Jenkins.


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Barry Fawthrop
> Sent: 10 February 2007 02:49
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Dialplan checkup
> 
> Thanks Guys
> 
> I already have the fax machine a brother all-in-one Printer, 
> scanner, fax.
> I realize the s,3, answers the line
> But How can I get s,2, to detect if it is a fax and take it 
> from there without answering?
> 
> Or can someone explain what make an incoming goto  exten => 
> s,..
> and what make it go to exten => 
> fax,
> How does this logic work??
> 
> Thanks again
> 
> Barry
> 
> Barry Fawthrop wrote:
> > Hi All
> >
> > Curious will this work
> > Std. PSTN line  ---x-- X100p
> >   |
> >   -- Fax Machine
> > Using a standard "home phone" pstn line with a splitter 
> connecting a 
> > fax machine and X100 Asterisk Box Incoming Line: Can I have in the 
> > dial Plan [incoming] exten  => s,1,Wait(1) exten  => s,2,IfFax 
> > continue to ring, so that the Fax Machine gets it exten  => 
> s,3,Answer 
> > exten  => s,4,Playback(Message) exten  => 
> > s,5,Dial(SIP/1000&SIP/2000&SIP/3000)
> > exten  => s,6,Hangup()
> > exten  => fax,1,Wait(30)
> > exten  => fax,2,Wait(10)
> > exten  => fax,3,Hangup()
> > I'm wanting the line to ring, If it is a 
> fax coming in 
> > then Asterisk leaves the line alone and lets the fax machine handle 
> > the call. If it is a call then Asterisk answers, plays a 
> greeting and 
> > rings the IP phones?
> >
> > Question is how does asterisk detect the call without answering?
> > I'm not wanting Asterisk to handle the call if it is a fax 
> if possible???
> >
> > I look forward to your input,
> > Thank You
> >
> > Barry
> 
> ___
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 

___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-10 Thread Barry Fawthrop

Hi Gordon
Following you dial plan
How does Asterisk know to move from s,2,  to either incoming,1,  or fax,1,
The only jump I recognize it Goto(internal,incoming,1) which should take 
all calls to incoming,1, and not fax,1,


OT: is spandsp & rxfax handled by astlinux ?

Thanks again

Barry

Gordon Henderson wrote:


[incoming]

exten => s,1,Noop(PSTN CALL from ${CALLERIDNUM})
exten => s,n,Goto(internal,incoming,1)

[internal]

exten => incoming,1,Set(DB(100/lnd)=${CALLERIDNUM})
exten => incoming,n,Answer()
exten => incoming,n,Wait(3)
exten => incoming,n(enter),BackGround(if-u-know-ext-dial)
exten => incoming,n,BackGround(or)
exten => incoming,n,BackGround(pls-hold-while-try)
exten => incoming,n,WaitExten(10)
exten => incoming,n,Ringing()
exten => incoming,n,Dial(${officePhones},15,on)
exten => incoming,n,VoiceMail(100&101&102,us)
exten => incoming,n,Hangup()

exten => fax,1,Set(LOCALSTATIONID=My Fax Machine)
exten => fax,n,RxFax(${FaxFile}.tif)
exten => fax,n,System(/bin/echo ${REMOTESTATIONID} > ${FaxFile}.csid)
exten => fax,n,System(/bin/echo ${CALLERIDNUM} > ${FaxFile}.cidn)
exten => fax,n,System(/usr/bin/tiff2pdf ${FaxFile}.tif > ${FaxFile}.pdf)
exten => fax,n,System(/usr/bin/mpack -s "FAX From 
[${REMOTESTATIONID}:${CALLERIDNUM}]" ${FaxFile}.pdf 
${FaxDestinationEmail})

exten => fax,n,Hangup()

exten => i,1,Wait(1)
exten => i,n,Playback(pbx-invalid)
exten => i,n,Goto(internal,incoming,enter)

exten => t,1,Hangup()


___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-10 Thread Gordon Henderson

On Sat, 10 Feb 2007, Barry Fawthrop wrote:


Hi Gordon
Following you dial plan
How does Asterisk know to move from s,2,  to either incoming,1,  or fax,1,
The only jump I recognize it Goto(internal,incoming,1) which should take all 
calls to incoming,1, and not fax,1,


In this particular installation (live & running), incoming calls from the 
analogue cards end up in [incoming] so I use Goto to get them to 
Goto(internal...) There is another incoming call source (an external SIP 
account) which also just Goto's the same place.



So what happens then is that when asterisk answers the call, it will 
listen for a calling fax machine - just like combined fax/phone machines 
do. If it hears a fax tone, then it jumps to fax,1 in the same context,

otherwise it just carries on. It only does this if you have:

faxdetect=incoming  ; Fax detection

in /etc/asterisk/zapata.conf

The jump to fax,1 happens "by magic", but I've found that I need 2-3 
seconds to let asterisk "listen" to the incoming line for the fax 
identifiaction beep. The down-side of this is that callers get 3

seconds of silence before the anouncement is made.

Have a look at this page for more:

http://www.voip-info.org/wiki-Asterisk+fax#SpanDSPSendingandReceivingFaxeswithAster

and then scroll down the the section headed:

  Asterisk as a fax/voice switch


OT: is spandsp & rxfax handled by astlinux ?


I don't know - I build systems from scratch myself rather than use 
astlinux, trixbox, etc. I had to compile spandsp (0.0.2) and patch-in 
rxfax/txfax to asterisk 1.2.13. The instructions for doing this are on the 
spandsp site - http://www.soft-switch.org/ not brilliant, but they got me 
through (but I have had a great many years experience building & 
installing software on Linux and other unix systems though)


But you could always run up a command line with asterisk -r and type in:

  show application RxFAX

and see if it's supported... I get:

dsx*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.
... etc.



Gordon





Thanks again

Barry

Gordon Henderson wrote:


[incoming]

exten => s,1,Noop(PSTN CALL from ${CALLERIDNUM})
exten => s,n,Goto(internal,incoming,1)

[internal]

exten => incoming,1,Set(DB(100/lnd)=${CALLERIDNUM})
exten => incoming,n,Answer()
exten => incoming,n,Wait(3)
exten => incoming,n(enter),BackGround(if-u-know-ext-dial)
exten => incoming,n,BackGround(or)
exten => incoming,n,BackGround(pls-hold-while-try)
exten => incoming,n,WaitExten(10)
exten => incoming,n,Ringing()
exten => incoming,n,Dial(${officePhones},15,on)
exten => incoming,n,VoiceMail(100&101&102,us)
exten => incoming,n,Hangup()

exten => fax,1,Set(LOCALSTATIONID=My Fax Machine)
exten => fax,n,RxFax(${FaxFile}.tif)
exten => fax,n,System(/bin/echo ${REMOTESTATIONID} > ${FaxFile}.csid)
exten => fax,n,System(/bin/echo ${CALLERIDNUM} > ${FaxFile}.cidn)
exten => fax,n,System(/usr/bin/tiff2pdf ${FaxFile}.tif > ${FaxFile}.pdf)
exten => fax,n,System(/usr/bin/mpack -s "FAX From 
[${REMOTESTATIONID}:${CALLERIDNUM}]" ${FaxFile}.pdf ${FaxDestinationEmail})

exten => fax,n,Hangup()

exten => i,1,Wait(1)
exten => i,n,Playback(pbx-invalid)
exten => i,n,Goto(internal,incoming,enter)

exten => t,1,Hangup()


___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users


___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-12 Thread Barry Fawthrop

Thanks all for your input.
Based on the comments given I guess I could
replace the X100p for a TDM22B and then connect the Fax machine to the 
TDM22B

and in the dial plan hae
exten => fax,1,Dial(SIP/40) (being the TDM port) and then it will ring 
the fax machine
and pass the call in from the PSTN line through the TDM card to the fax 
machine?


Right, this is possible also or use an ATA if not a TDM card ?/

Thanks All

Barry



Barry Fawthrop wrote:

Hi All

Curious will this work
Std. PSTN line  ---x-- X100p
  |
  -- Fax Machine
Using a standard "home phone" pstn line with a splitter connecting a 
fax machine and X100 Asterisk Box

Incoming Line: Can I have in the dial Plan
[incoming]
exten  => s,1,Wait(1)
exten  => s,2,IfFax continue to ring, so that the Fax Machine gets it
exten  => s,3,Answer
exten  => s,4,Playback(Message)
exten  => s,5,Dial(SIP/1000&SIP/2000&SIP/3000)
exten  => s,6,Hangup()
exten  => fax,1,Wait(30)
exten  => fax,2,Wait(10)
exten  => fax,3,Hangup()
I'm wanting the line to ring,
If it is a fax coming in then Asterisk leaves the line alone and lets 
the fax machine handle the call. If it is a call then Asterisk 
answers, plays a greeting and rings the IP phones?


Question is how does asterisk detect the call without answering?
I'm not wanting Asterisk to handle the call if it is a fax if possible???

I look forward to your input,
Thank You

Barry
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users



--
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dialplan checkup

2007-02-12 Thread Gordon Henderson

On Mon, 12 Feb 2007, Barry Fawthrop wrote:


Thanks all for your input.
Based on the comments given I guess I could
replace the X100p for a TDM22B and then connect the Fax machine to the TDM22B
and in the dial plan hae
exten => fax,1,Dial(SIP/40) (being the TDM port) and then it will ring the 
fax machine
and pass the call in from the PSTN line through the TDM card to the fax 
machine?


It might work better if you use Dial(Zap/4) where 4 is the port on the TDM 
card... Also make sure the fax machine answers immediately and goes into 
fax reception mode immediately.



Right, this is possible also or use an ATA if not a TDM card ?/


Possibly. However faxing is very intolerant of packet loss, jitter, phase 
of the moon and so on. Remember you are carrying an encoded analogue 
signal in digital form, so make sure you do not use a "lossy" codec (ie. 
G711 only) and while you or I may be quite tolerant of the odd click, and 
packet drop, an analogue modem signal (Which is what a fax communication 
is) is not tolerant at all.


Gordon
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users