[Asterisk-Users] help with detecting fax.

Ariel Batista arielb27 at hotmail.com
Sat Dec 11 17:44:12 MST 2004


I have Spandsp working fine. Asterisk sees a fax on the zap port and redirects the call to the fax-in area.

This works if I have a simple dialing rules that goes answers first and waits 10 secs then goes to the next item. If it hears a fax it goes to the right place. Here is a sample that works.

[incoming]

exten => 2019,1,Goto(test,s,1)

[test]

exten => s,1,answer
exten => s,2,wait(5)
exten => s,3,Macro(stdexten,Sip/101)

exten => fax,1,Goto(fax-in,s,1)

[fax-in]

exten => s,1,Dial(zap/1)

But if I use this following macro it just detects the fax then goes to congestion instead of the fax extenstion.

[macro-followme]
;
; Standard single line follow me then to voicemail
; $ARG1 first device to dial to. $ARG2 2nd device to dial.
;
exten => s,1,Answer
exten => s,2,Wait(5)
exten => s,3,Dial(${ARG1},20)
exten => s,4,Dial(Zap/g1/${ARG2})
exten => s,5,Voicemail(u${MACRO_EXTEN})
exten => s,104,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?105:107)
exten => s,105,Dial(Zap/g1/${ARG2})
exten => s,106,Voicemail(b${MACRO_EXTEN})
exten => s,107,Voicemail(u${MACRO_EXTEN})
 
exten => fax,1,Goto(fax-in,s,1)
;
I am calling it with this setup.
exten => 2019,1,Macro(followme,Sip/101,16502468900)
Here is the error I get.  And yes I have exten fax,1,Goto(fax-in,s,1) in the inbound context as well.

-- Executing Macro("Zap/1-1", "followme|Sip/101|16502468900") in new stack
002  -- Executing Answer("Zap/1-1", "") in new stack
003  -- Accepting call from '6502468901' to '2019' on channel 0/1, span 1
004  -- Executing Wait("Zap/1-1", "10") in new stack
005  -- Redirecting Zap/1-1 to fax extension
006  == Spawn extension (macro-followme, fax, 0) exited non-zero on 'Zap/1-1' in macro 'followme'
007  == Spawn extension (inbound, fax, 1) exited non-zero on 'Zap/1-1'
008  -- Executing Congestion("Zap/1-1", "") in new stack
009  -- Channel 0/1, span 1 got hangup
010  == Spawn extension (inbound, fax, 2) exited non-zero on 'Zap/1-1'
011  -- Hungup 'Zap/1-1'



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041210/432f0d26/attachment.htm


More information about the asterisk-users mailing list