[asterisk-users] Dialplan checkup

Gordon Henderson gordon+asterisk at drogon.net
Sat Feb 10 15:41:21 MST 2007


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
>


More information about the asterisk-users mailing list