Automatic Disconnection of Inbound(in mysql)

We have an asterisk server. I wanted to have an automation script that will disconnection or cut the inbound and outbound service of a voip client/user. How am I going to do that if my sipuser and the extension.conf is located in Mysql db server. Is there anyone could help me to auto disconnect service scripts?

I really need this one. Thank you very much.

Best Regard,