[asterisk-users] Simple Call Screener

MFH asterisk-admin at hulber.com
Thu Jul 10 06:13:45 CDT 2008


This is what I use.  The Read does have a default timeout but you should 
be able to put your own.

extensions.conf:

   exten => 
s,n(dial),Dial(SIP/sipura2_1&SIP/sipura1_1&SIP/sipura2_2&SIP/spa942_3&SIP/aastra480_3,20,mtTM(screen))
   exten => s,n(vmail),Voicemail(123 at default)


[macro-screen]

   exten => s,1,Wait(0.2)
   exten => s,n,Read(ACCEPT,screen-callee-options,1)
   exten => s,n,GotoIf($[${ACCEPT} = 1]?ok:cont)
   exten => s,n(ok),Noop
   exten => s,s+2(cont),Set(MACRO_RESULT=CONTINUE)




> I'm trying to build a simple accept/reject screening app for inbound calls that * forwards to my cell phone.  Basically I want * to announce the caller ID and then let me press 1 to accept the call or 2 to reject the call and send the outside party to voicemail.
>
> I've been messing around with variation of the script below... can anyone tell me what I'm doing wrong?  It's got to be something obvious that I've overlooked.
>
> Thanks!!!
>
> [main]
> exten => s,1,Answer
> exten => s,n,Ringing
> exten => s,n,Wait(1)
> exten => s,n,Dial(SIP/+1... at bandwidth.com_outbound,120,gM(screen))
> exten => s,n,PlayBack(vm-goodbye)
> exten => s,n,Hangup
>
> [macro-screen]
> exten => s,1,Wait(1)
> ;exten => s,n,SayDigits(${CALLERID(num)})
> exten => s,n,Set(TIMEOUT(digit)=5)
> exten => s,n,Set(TIMEOUT(response)=30)
> exten => s,n,Background(accept-reject)
>
> exten => 1,1,Set(MACRO_RESULT=CONTINUE)
> exten => 2,1,PlayBack(vm-goodbye)
> exten => 2,2,Hangup
>
> exten => s,6,Wait(10)
> exten => i,1,Goto(TT_VO,s,1)






More information about the asterisk-users mailing list