[asterisk-users] Handling multiple fax machines and the fax extension, and general call routing
arkda
thrills3k3r at gmail.com
Thu May 22 14:59:40 CDT 2008
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080522/d3ea94f8/attachment.htm
More information about the asterisk-users
mailing list