Mashing FOP XML and PHPAGI up in an xml script


Im trying to mash up my DND code when set from an Aastra handset vi an xml script

at the moment when the script is run it sets the light on and sets the ASTDB to the value SET for the relevent extension.

What I want to do now is set the LED and TEXT in FOP. I can do this via a userevent from the dialplan but just cant seem to work out a way of doing its from the script which uses PHPAGI.

if($action=='change') { # change DND status if($dnd==0) { $res = $as->Command('database put DND '.$user.' SET'); <<<<<<<<<<I NEED TO SET THE FOP LED VALUE HERE>>>>>>> $dnd=1; } else { $res = $as->Command('database del DND '.$user); $dnd=0; } }

reading the phpagi notes it looks like something like :-

$res = $as->send_request('ASTDB|Channel: SIP/2206-af91a490^Family: DND^Value: SET ^');

may do it but it doent seem to

Any Ideas ?