PHPDaemon\Clients\Asterisk\Connection::status PHP Method

status() public method

Variables: (Names marked with * are required) Channel: Name of the channel to query for status Variables: Comma ',' separated list of variables to include ActionID: Optional ID for this transaction Will return the status information of each channel along with the value for the specified channel variables.
public status ( callable $cb, string $channel = null ) : void
$cb callable
$channel string
return void
    public function status($cb, $channel = null)
    {
        $cmd = "Action: Status\r\n";
        if ($channel !== null) {
            $cmd .= 'Channel: ' . trim($channel) . "\r\n";
        }
        $this->command($cmd, $cb, ['event' => 'statuscomplete']);
    }