[Asterisk-Dev] DID number not saved when incoming fax detected on Zap

Mark Hulber asterisk-admin at hulber.com
Tue Nov 29 04:28:43 MST 2005


Although I'm not actually using Asterisk to receive faxes, I do use it 
to detect when a rogue fax machine is calling so I can disconnect the 
calls.  I do this by not entering a context that answers and detects the 
fax before I have properly classified the incoming DID.  In the example 
below, calls enter the inbound context first for classification then go 
through the call router for processing.

[unlimitel-inbound] ; 649999999

   exten => 6479999999,1,Macro(setstamp,6479999999,unlimitel-inbound)
   exten => 6479999999,n,Goto(default,s,1)
   exten => i,1,Goto(default,s,1)
   exten => t,1,Goto(default,s,1)
   exten => h,1,Macro(rhangup)

[default]

    include => route-calls

[route-calls]

   exten => s,1,Noop(route-calls)
   exten => s,n,SetMusicOnHold(regular)
   exten => s,n,Set(MOHVAL=regular)
   exten => s,n(ans),Answer

   ; Banned
   exten => s/708857500X,ans+1,Goto(banned|1)    ;
   exten => s/9044898017,ans+1,Goto(banned|1)    ;
   exten => s/8883222785,ans+1,Goto(banned|1)    ;

   exten => s,ans+1,Goto(mainmenu,s,1)

   ; Banned
   exten => banned,1,Wait(2)
   exten => banned,n,Zapateller
   exten => banned,n,Playback(privacy-if-sales-call-contact-in-writing)
   exten => banned,n,Playback(spam)
   exten => banned,n,Macro(rhangup)

   ; Fax
   exten => fax,1,Macro(rhangup)

   ; Hangup
   exten => h,1,Macro(rhangup)

   ; Invalid
   exten => i,1,Goto(mainmenu,s,1)

   ; Timeout
   exten => t,1,Goto(mainmenu,s,1)


James Armstrong wrote:
> I have been fighting a problem with incoming faxes on our DID numbers. 
> I need to get the original NDID so I can route the fax to the person's 
> email address. The ${FAXEXTEN} is always 's' and I have been trying to 
> track down why. It looks like the chan_zap code detects the 'f' for 
> fax as the last digit of the incoming DTMF digits and immediately 
> routes the call to the fax extension before the ->exten has been set 
> with the incoming DID number. Is there a way for this to be fixed? I 
> tried to shorten the inter dtmf timer so the DID would come in and 
> timeout before the fax tone was detected but it looks like the code is 
> using a hardcoded inter digit timeout when faxdetect is enabled. There 
> is a two second gap between the last dtmf digit and the 'f' for fax 
> detect in the log, then the call is routed to the fax extension from 
> the zt_read function, which I think happens before the digit gets back 
> to the ast_waitfordigit() function in the ss_thread function which 
> builds the incoming extension.
>
> - James
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list