[asterisk-users] Handling multiple fax machines and the fax extension, and general call routing

Steve Totaro stotaro at totarotechnologies.com
Thu May 22 15:07:31 CDT 2008


On Thu, May 22, 2008 at 3:59 PM, arkda <thrills3k3r at gmail.com> wrote:
> Hi,
>
> I've been trying to implement a fax solution using a TDM880 (8 analog ports,
> FXS). I have a PRI circuit that terminates on a TE120 at the same server.
> The server is running Asterisk 1.4.18.
>
> The idea is to have seven fax machines, each with a different number,
> connected directly to the TDM880. Zaptel/Zapata are configured and work
> properly (1-24 is the TE120, 25-32 is the TDM880). Voice calls are working
> great, and a single fax machine works well.
>
> I seem to be having some difficulty with my dialplan when using the fax
> extension, however. Here is an abbreviated example of my dialplan:
>
> extensions.conf
>
> [internal]
> exten => 2001,1,Dial(SIP/2001)
> exten => 2002,1,Dial(SIP/2002)
>
> ; dial out
> exten => _1NXXNXXXXXX,1,Dial(Zap/G2/${EXTEN})
>
> exten => fax,1,Goto(${EXTEN})
>
> ; fax machines
> exten => 1000,1,Answer()
> exten => 1000,n,Wait(3)
> exten => 1000,n,Dial(Zap/25)
>
> exten => 1001,1,Answer()
> exten => 1001,n,Wait(3)
> exten => 1001,n,Dial(Zap/26)
>
> exten => 1002,1,Answer()
> exten => 1002,n,Wait(3)
> exten => 1002,n,Dial(Zap/27)
>
> [external]
>
> exten => 2001,1,Goto(internal,2001,1)
> exten => 2002,2,Goto(internal,2002,1)
>
> exten => fax,1,Goto(internal,${EXTEN},1)
>
> exten => 1000,1,Answer()
> exten => 1000,n,Wait(3)
> exten => 1000,n,Goto(internal,1000,1)
>
> exten => 1001,1,Answer()
> exten => 1001,n,Wait(3)
> exten => 1001,n,Goto(internal,1001,1)
>
> exten => 1002,1,Answer()
> exten => 1002,n,Wait(3)
> exten => 1002,n,Goto(internal,1002,1)
>
> -----------------------------------
>
> My PRI provider only hands off the last 4 digits, so the above works well
> for voice calls. The fax detection extensions DO detect faxes properly
> (faxdetect=both is set in zapata.conf), however I'm not sure how to route
> them to the proper line (Zap/25, etc.) if I route the calls into a catch all
> extension such as 's'. The above doesn't work since the $[EXTEN} variable
> gets changed from the dialed number, such as '1001', to 'fax' and dives into
> a loop. By changing the fax extension lines to something like this:
>
> exten => fax,1,Dial(Zap/25)
>
> I can get a single line to dial and receive without any problems, but this
> obviously will not work for multiple fax machines.
>
> What's the best method for properly routing numbers that get routed into a
> catch all extension, such as 's'? I've been digging around in the Asterisk:
> TFOT v2 and on Google, but I haven't been able to find an example of this.
>
>
exten => fax,1,Dial(Zap/25,5)
exten => fax,n,Dial(Zap/26,5)
exten => fax,n,Dial(Zap/27,5)

Timeout on 5 seconds roll to the next line.

Thanks,
Steve Totaro



More information about the asterisk-users mailing list