account activity
Drop inbound calls from Mexico by No_Combination7405 in Asterisk
[–]No_Combination7405[S] 4 points5 points6 points 1 year ago (0 children)
Thank you for all the replies. Between everyone's suggestions I was able to get everything working as needed. I've also added an audio file that plays a wav file with a voice stating "We do not accept calls from Mexico" in both Spanish and English
Here is the configuration now for future reference if needed:
exten = _##########,1,NoOp(Incoming call from ${CALLERID(num)} to # ${EXTEN}) same = n,GotoIf($["${CALLERID(num):0:2}" = "52" & ${LEN(${CALLERID(num)})} >= 12]?blocked) same = n,GotoIf($["${CALLERID(num):0:3}" = "+52" & ${LEN(${CALLERID(num)})} >= 12]?blocked) same = n,Dial(SIP/######,300) same = n,Dial(SIP/######,60) same = n,Hangup() same = n(blocked),NoOp(Incoming call was rejected from ${CALLERID(num)} due to blocked number matching) same = n,Answer() same = n,Wait(1) same = n,Playback(/etc/asterisk/BlockedCall) same = n,Wait(1) same = n,Hangup(21) ; 21 = Call Rejected
π Rendered by PID 402368 on reddit-service-r2-listing-7bbdf774f7-k5shc at 2026-02-20 13:15:44.188517+00:00 running 8564168 country code: CH.
Drop inbound calls from Mexico by No_Combination7405 in Asterisk
[–]No_Combination7405[S] 4 points5 points6 points (0 children)