';
-flush privileges;
-exit
+For the account manager to work, you need a mysql database with a user that has read/write access.
### 4. Configure XMLRPC server
------------------------------
-# The RPM package has installed XMLRPC configuration files in /etc/flexisip-account-manager/
-# Edit these files with the correct values
+The RPM package has installed the configuration files in `/etc/flexisip-account-manager/`
-vim /etc/flexisip-account-manager/xmlrpc.conf
-vim /etc/flexisip-account-manager/internationalization.conf
+Each file name should be explicit on which settings it contains. If you have any doubt, leave the default value.
+At least you MUST edit the following file and fill the values you used in previous step:
-# Create the necessary tables in the database using our script
+`nano /etc/flexisip-account-manager/db.conf`
-cd /opt/belledonne-communications/share/flexisip-account-manager
-php xmlrpc.php create_tables
-php xmlrpc.php create_algo_table
+Now you can create the necessary tables in the database using our script:
-# For remote provisioning create a default.rc file on /opt/belledonne-communications/ and set the values you want
-# Client side, set the provisioning uri to the same host but to provisioning.php instead of xmlrpc.php
+`php /opt/belledonne-communications/share/flexisip-account-manager/tools/create_tables.php`
-### 5. Miscellaneous
+### 5. Install OVH SMS gateway dependency (optionnal)
+
+To install OVH SMS PHP API create a `composer.json` file in `/opt/belledonne-communications/`:
+
+`echo '{ "name": "XMLRPC SMS API", "description": "XMLRPC SMS API", "require": { "ovh/php-ovh-sms": "dev-master" } }' > /opt/belledonne-communications/share/flexisip-account-manager/composer.json`
+
+Then download and install [composer](https://getcomposer.org/download/).
+
+Finally start composer:
+
+`cd /opt/belledonne-communications/share/flexisip-account-manager/ && composer install`
+
+### 6. Miscellaneous
--------------------
-# To install OVH SMS PHP API create composer.json in /opt/belledonne-communications/
+- For remote provisioning create a `default.rc` file in `/opt/belledonne-communications/` and set the values you want
+client side, set the provisioning uri to the same host but to `provisioning.php` instead of `xmlrpc.php`.
-echo '{ "name": "XMLRPC SMS API", "description": "XMLRPC SMS API", "require": { "ovh/php-ovh-sms": "dev-master" } }' > /var/www/html/composer.json
+- If SELinux forbids mail sending you can try this command:
+`setsebool -P httpd_can_sendmail=1`
-# Then execute the following command
+- On CentOS firewalld might be running:
+`firewall-cmd --state`
-cd /opt/belledonne-communications && composer install
+- If it is running you can add a rule to allow https traffic:
+`firewall-cmd --zone public --permanent --add-port=444/tcp && firewall-cmd --reload`
-# If you have not installed an OVH SMS API you might need to comment out the following lines in xmlrpc-sms.php
+- If you use the standard https port (443) or http (80) the following command might be better:
+`firewall-cmd --zone public --permanent --add-service={http,https} && firewall-cmd --reload`
-require __DIR__ . '/vendor/autoload.php';
-use \Ovh\Sms\SmsApi;
-
-# if SELinux forbids mail sending you can try this command
-
-setsebool -P httpd_can_sendmail=1
-
-# On CentOS firewalld might be running:
-firewall-cmd --state
-
-# If it is running you can add a rule to allow https traffic
-firewall-cmd --zone public --permanent --add-port=444/tcp && firewall-cmd --reload
-
-# If you use the standard https port (443) or http (80) the following command might be better
-firewall-cmd --zone public --permanent --add-service={http,https} && firewall-cmd --reload
-
-# Also it can listen on IPv6 only
-# To fix that, edit the ssl.conf in /etc/httpd/conf.d/ dir and add/set: Listen 0.0.0.0:444 https
+- Also it can listen on IPv6 only.
+To fix that, edit `/opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf` and add/set: `Listen 0.0.0.0:444 https`
diff --git a/conf/accounts.conf b/conf/accounts.conf
new file mode 100644
index 0000000..f06b110
--- /dev/null
+++ b/conf/accounts.conf
@@ -0,0 +1,58 @@
+?;:[]{}\|
+ */
+define("GENERATED_PASSWORD_CHARACTERS", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789``-=~!@#$%^&*()_+,./<>?;:[]{}\|");
+
+/*
+ * The length of the passwords that will be generated.
+ *
+ * Default value: 8
+ */
+define("GENERATED_PASSWORD_LENGTH", 8);
+
+/*
+ * If set to True, a created account will automatically be activated and it's expiration date set to now + TRIAL_DURATION_DAYS,
+ * otherwise expiration date for trial will be set when account is activated via a different xml rpc call.
+ */
+define('AUTO_ACTIVATE_ACCOUNT', False);
+
+/*
+ * Send an email to activate the account when it is created.
+ */
+define('SEND_ACTIVATION_EMAIL', True);
+
+/*
+ * Send a sms to activate the phone account when it is created.
+ */
+define('SEND_ACTIVATION_SMS', True);
+
+/*
+ * If false, creating an account with an email that is already used for another account will trigger an error
+ */
+define('ALLOW_SAME_EMAILS_ON_MULTILPLE_ACCOUNTS', True);
+
+/*
+ * If true, when an account creation request is received for an existing number, assumes recover procedure
+ */
+define('RECOVER_ACCOUNT_IF_EXISTS', False);
+
+?>
\ No newline at end of file
diff --git a/conf/auth.conf b/conf/auth.conf
new file mode 100644
index 0000000..e174879
--- /dev/null
+++ b/conf/auth.conf
@@ -0,0 +1,34 @@
+
\ No newline at end of file
diff --git a/conf/db.conf b/conf/db.conf
new file mode 100644
index 0000000..58b318d
--- /dev/null
+++ b/conf/db.conf
@@ -0,0 +1,87 @@
+
\ No newline at end of file
diff --git a/conf/emails.conf b/conf/emails.conf
new file mode 100644
index 0000000..edb9341
--- /dev/null
+++ b/conf/emails.conf
@@ -0,0 +1,56 @@
+Start your sip.linphone.org serviceHello,
Activation pending for using your Linphone account.
Please use the link bellow to activate your account :
%link%
Regards,
The Linphone team.