Disable Call Waiting

Hello All,
I am building a system in Asterisk 1.4 and it is almost finished
i am stuck with call waiting.
i am currently using polycom ip430’s and they have 3 registrations per login. I have created context to enable and disable the call waiting ,
I just need to work out how to tell if the called user is on a call or not.

OK i am a little further ahead if i use agi and ExtensionState i would be able to get it to work
is there a command that is simmilar in ael/2 or standard asterisk programming