OK, I see that you are processing the CDR/SMDR information that is coming off the RMX port of the Hicom 300. You are looking through that information for certain call patters and would like to block phones that exhibit that pattern.
There are a couple of problems inherent witht his concept. The first one is that the data that comes out of the port is generated after the call is completed, so you will not be able to block a call in progress. That may not be your intent - you may just want to block the phone because the person violated a rule of some kind.
You can deactivate a phone by using the AMO DEA-DSSU and also provide the rest of the information the command needs (offtype = DI, type = stno, extension #, and svc). A typical example of this command in one string would be: DEA-DSSU

I,STNO,5555,; The last comma allows the "svc" parameter to default and the semi-colon ends the command.
Ordinarily you could probably do this through the same port that the CDR data is coming out, but that will probably be a hassle and mess up your data stream. You could probably create some kind of shell script in procomm to log you in, choose the right menu item for Direct AMO (assuming you have access), and send the command, but you would then have to figure out how to pass the data from one piece of software to the other.
There are a lot of other variables here that could affect your ability to login and it would be very difficult to plan for all of them. I have processed the CDR data through a spreadsheet macro for reporting purposes, but I think you might be biting off a bit more than you can chew here.
Since it is already after the fact when you find out, why don't you consider having your software, upon detection of a phone call matching your critera, send an E-mail to that person's supervisor or warn some other administrator that action needs to be taken and let someone intervene to stop the behavior? That might be a simpler task.