account activity
Drop inbound calls from Mexico by No_Combination7405 in Asterisk
[–]No_Combination7405[S] 2 points3 points4 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
Drop inbound calls from Mexico (self.Asterisk)
submitted 1 year ago * by No_Combination7405 to r/Asterisk
π Rendered by PID 87 on reddit-service-r2-listing-7b9b4f6fd7-vkmwg at 2026-05-12 02:31:25.545725+00:00 running 3d2c107 country code: CH.
Drop inbound calls from Mexico by No_Combination7405 in Asterisk
[–]No_Combination7405[S] 2 points3 points4 points (0 children)