<commit_before># NOTE

It's a very early development stage for a FusionPBX api using laravel.

# Installation

## Introduction

It's assumed you follow FusionPBX installation manual and have your Debian server running.

The API will be accessible at your server under port 444 (you are free to change it)

The main steps would be:

* Fix adminer notice (optional)
* Install additional packaged
* Get the API code and place it to your server
* Update .env file
* Add nginx virtual host
* Setup firewall
* Get and upload apple VOIP push certificate



## Fix adminer notice (optional)

`nano /var/www/fusionpbx/app/adminer/index.php`

Replace `function permanentLogin() {` with `function permanentLogin($j = false) {`


### Install additional packages


#### Install nodejs

```
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs php7.0-mbstring build-essential
```

#### Install composer

```
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
```

#### Install Laravel socket dependencies

For Debian

```
apt-get install libzmq3-dev php-pear pkg-config supervisor
pecl install zmq-beta
touch /etc/php/7.0/cli/conf.d/21-zeromq.ini
echo extension=zmq.so\n > /etc/php/7.0/cli/conf.d/21-zeromq.ini
```

## Install API project files

```
# cd /var/www
# git clone <EMAIL>:gruz/fusionpbx-api.git laravel-api
# cd laraverl-api
# composer update
# cp .env.example .env
# chown -R www-data:www-data laravel-api
```
<commit_msg>Readme update<commit_after># NOTE

It's a very early development stage for a FusionPBX api using laravel.

# Installation

## Introduction

It's assumed you follow FusionPBX installation manual and have your Debian server running.

The API will be accessible at your server under port 444 (you are free to change it)

The main steps would be:

* Fix adminer notice (optional)
* Install additional packaged
* Get the API code and place it to your server
* Update .env file
* Add nginx virtual host
* Setup firewall
* Get and upload apple VOIP push certificate



## Fix adminer notice (optional)

`nano /var/www/fusionpbx/app/adminer/index.php`

Replace `function permanentLogin() {` with `function permanentLogin($j = false) {`


### Install additional packages


#### Install nodejs

```
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs php7.0-mbstring build-essential
```

#### Install composer

```
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
```

#### Install Laravel socket dependencies

For Debian

```
apt-get install libzmq3-dev php-pear pkg-config supervisor php-dev
pecl install zmq-beta
touch /etc/php/7.0/cli/conf.d/21-zeromq.ini
echo extension=zmq.so\n > /etc/php/7.0/cli/conf.d/21-zeromq.ini
```

## Install API project files

```
# cd /var/www
# git clone <EMAIL>:gruz/fusionpbx-api.git laravel-api
# cd laraverl-api
# composer update
# cp .env.example .env
# chown -R www-data:www-data laravel-api
```

{'fraction_non_alphanumeric': 0.11735700197238659, 'fraction_numerical': 0.009861932938856016, 'mean_word_length': 3.939935064935065, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1236600', 'n_tokens_mistral': 1065, 'n_tokens_neox': 969, 'n_words': 332}