PAGI\Client\AbstractClient::dial PHP Method

dial() public method

(non-PHPdoc)
public dial ( $channel, array $options = [] )
$options array
    public function dial($channel, array $options = array())
    {
        $start = time();
        array_unshift($options, $channel);
        $result = new DialResult($this->exec('Dial', $options));
        $end = time();
        $result->setPeerName($this->getFullVariable('DIALEDPEERNAME'));
        $result->setPeerNumber($this->getFullVariable('DIALEDPEERNUMBER'));
        $result->setDialedTime($end - $start);
        $result->setAnsweredTime($this->getFullVariable('ANSWEREDTIME'));
        $result->setDialStatus($this->getFullVariable('DIALSTATUS'));
        $result->setDynamicFeatures($this->getFullVariable('DYNAMIC_FEATURES'));
        return $result;
    }

Usage Example

Example #1
0
 public function dial($channel, array $options = array())
 {
     $args = func_get_args();
     $this->assertCall('dial', $args);
     return parent::dial($channel, $options);
 }