public function connect($ariAddress, $amiAddress = null, $streamOptions = [], $clientOptions = [])
    {
        $this->ariClient->connect($ariAddress, $streamOptions, $clientOptions);
        $this->wsClient = $this->ariClient->getWsClient();
        $this->stasisApplicationName = $this->ariClient->getStasisApplicationName();

        if ($amiAddress !== null) {
            $this->amiClient = new AmiClient($this->ariClient->getWsClient(), $this->eventLoop, $this->logger);
            $this->amiClient
                ->connect($amiAddress)
                ->done();
        }
    }
public function connect($ariAddress, $amiAddress = null, $streamOptions = [], $clientOptions = [])
    {
        $this->ariClient->connect($ariAddress, $streamOptions, $clientOptions);
        $this->wsClient = $this->ariClient->getWsClient();
        $this->stasisApplicationName = $this->ariClient->getStasisApplicationName();

        if ($amiAddress !== null) {
            $this->amiClient = new AmiClient($this->ariClient->getWsClient(), $this->eventLoop, $this->logger);
            $this->amiClient
                ->connect($amiAddress)
                ->done();
        }
    }
public function connect ( $ ariAddress , $ amiAddress = null , $ streamOptions = [ ] , $ clientOptions = [ ] ) { $ this -> ariClient -> connect ( $ ariAddress , $ streamOptions , $ clientOptions ) ; $ this -> wsClient = $ this -> ariClient -> getWsClient ( ) ; $ this -> stasisApplicationName = $ this -> ariClient -> getStasisApplicationName ( ) ; if ( $ amiAddress !== null ) { $ this -> amiClient = new AmiClient ( $ this -> ariClient -> getWsClient ( ) , $ this -> eventLoop , $ this -> logger ) ; $ this -> amiClient -> connect ( $ amiAddress ) -> done ( ) ; } }
Connect to ARI and optionally AMI

@param string $ariAddress
@param string|null $amiAddress
@param array $streamOptions Example: ['ssl' => ['verify_peer' => false, 'verify_peer_name' => false]];
@param array $clientOptions Example: ['verify' => false];
Connect to ARI and optionally AMI