Action depending on originating number?

Ex Girlfriend logic is really easy to implement.

I use it to block unwanted calls to my extension.
exten => 7001/5203825968,1,Goto(RING) ; Specific Allow
exten => 7001/Anonymous,1,Goto(RING) ; Specific Allow
exten => 7001/_480NXXXXXX,1,Goto(RING); Pattern Match
exten => 7001/_520NXXXXXX,1,Goto(RING); Pattern Match
exten => 7001/_602NXXXXXX,1,Goto(RING); Pattern Match
exten => 7001/_623NXXXXXX,1,Goto(RING); Pattern Match
exten => 7001/_928NXXXXXX,1,Goto(RING); Pattern Match
exten => 7001,1,NoOP()
same => n,Ringing()
same => n,Wait(16)
same => n,Voicemail(${EXTEN}@kiniston,u)
same => n,Hangup()
same => n(RING),Gosub(sub-stdexten,${EXTEN},1(SIP/${EXTEN}kiniston))