select scid from imeitable where scid_date > last 8 minutes (randomly pick 1 entry)
lookup its last 7 digits of its gsm number from scid_gsm
eg if scid=555555 select right(gsm_number,7) from scid gsm where scid=555555
prefix that number with digits 592 (i need to vary this in some cases, put as a variable on top of script)
top of script should have
Min_call_sec=
Max_call_sec=
when script is called,
..................