That will work, it is essentially the same solution I suggested, but it's a slow plodding way, and doesn't take care of CFB and CF (always)
an automated "turn them all off" might be a oneliner:-
rasterisk -x 'database show'|grep -r "^/CF"|cut -d ":" -f1|awk -F/ '{print "rasterisk -x \" database del " $2 " " $3 "\"" }' > sh.tmp;sh sh.tmp;rm sh.tmp
add another grep <extension> pipe before the > redirection for just one extension.
modify ingredients to suit, maybe turn it into a shell script or cron job, but I'm glad you are fixed now.
dicko