* Begin monitoring channel to filename "test.gsm" * If it fails then echo Asterisk error */ $chan = 'SIP/868'; try { $ast->startMonitor($chan, 'test', 'gsm', 1); } catch (PEAR_Exception $e) { echo $e; } /** * Queues * List queues then add and remove a handset from a queue */ // Print all the queues on the server try { echo $ast->getQueues(); } catch (PEAR_Exception $e) { echo $e; } // Add the SIP handset 234 to a the applicants queue try { $ast->queueAdd('applicants', 'SIP/234', 1); } catch (PEAR_Exception $e) { echo $e; } // Take it out again try { $ast->queueRemove('applicants', 'SIP/234'); } catch (PEAR_Exception $e) { echo $e; }