4 ms·
1. The following macro does the captcha: [macro-captcha] exten => s,1,Answer exten => s,n(retry),Wait(2); exten => s,n,Set(pin3=${RAND(100,999)}); exten => s,n
by hwstar 11y ago
1. The following macro does the captcha:
[macro-captcha]
exten => s,1,Answer
exten => s,n(retry),Wait(2);
exten => s,n,Set(pin3=${RAND(100,999)});
exten => s,n,Playback(reallivehuman);
exten => s,n,Wait(1);
exten => s,n,SayDigits(${pin3});
exten => s,n,Read(pinent,,4)
exten => s,n,GotoIf($["${pin3}" = "${pinent}"]?ok:retry)
exten => s,n(ok),Playback(queue-thankyou);
2. The whitelist jumps around the Captcha macro in the incoming context:
exten => 6199111111,n,GotoIf($["${CALLERID(num)}" = "2024561414"]?whitelist)
exten => 6199111111,n,Macro(captcha); * Do captcha
exten => 6199111111,n(whitelist),Goto(inbound-calls-main,s,1);
This also buys me peace and quiet during the few days leading up to election day. (Political robocalls are what caused me to implement it).
- fapjacks 11y agoPerfect! Your hard work has subsequently been stolen and implemented elsewhere. Thank you!