-Re: [Asterisk-Users] help with detecting fax.---fixed.

2004-12-11 Thread Ariel Batista
 Original Message 
From: Ariel Batista
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.  Also you need
to have the fax lines in the context that all calls from the pstn
side come in. In my case it was inbound.

[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]
I am adding the notes as what we did to fix this problem in case
someone else needs these fixes.  Note this problem is due to what I
feel is a bug in asterisk. But there is a work around. Here you need
to add an extra line which is not really used. Asterisk will work if
you add this to it.
exten = s,1,NoOp
exten = s,2,Dial(zap/1)

Instead of
exten = s,1,Dial(Zap/1)
We now actually have it going to spandsp now and it's working from
the macro. 

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})
;
I am calling it with this setup.
exten = 2019,1,Macro(followme,Sip/101,16502468900)
I have fixed the problem. See notes below.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] help with detecting fax.

2004-12-10 Thread Ariel Batista



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,Answerexten = 
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 stack002 -- Executing Answer("Zap/1-1", 
"") in new stack003 -- Accepting call from '6502468901' to '2019' on channel 0/1, span 
1004 -- 
Executing Wait("Zap/1-1", "10") in new stack005 -- Redirecting Zap/1-1 to fax 
extension006 == 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 stack009 -- Channel 0/1, span 1 got 
hangup010 
== Spawn extension (inbound, fax, 2) exited non-zero on 
'Zap/1-1'011 -- Hungup 'Zap/1-1'


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users