Callerid can only call once a day

i search for a config or script that a callerid can only call (variable)once a day, or once a week.
if callerid calls 2nd time then goes for example to another extension or ivr.