From: Jon Langseth <jon.langseth@lilug.no>
Date: Tue, 24 Jan 2012 12:56:14 +0000 (+0100)
Subject: Updating som doc'
X-Git-Url: https://git.defcon.no/?a=commitdiff_plain;h=4e306b275f8a9e6285118fa2ef7c9c63789bdc47;p=hermes

Updating som doc'
---

diff --git a/api/config.php.sample b/api/config.php.sample
index 4701355..d6cb579 100644
--- a/api/config.php.sample
+++ b/api/config.php.sample
@@ -3,24 +3,28 @@
 function get_config()
 {
 	return array(
-		'auth_backend' => 'permitall',
 		'sql_server' => 'localhost',
 		'sql_username' => 'dbusername',
 		'sql_password' => 'dbuserpass',
+
 		'kamailio_db' => 'kamailio',
+		'hermes_db' => 'hermes',
+
 		'kamailio_domain_table' => 'domain',
 		'kamailio_subscriber_table' => 'subscriber',
 		'kamailio_alias_table' => 'dbaliases',
 		'kamailio_domain_table' => 'domain',
-		'hermes_db' => 'hermes',
+
 		'hermes_users_table' => 'users',
 		'hermes_phones_table' => 'phones',
 		'hermes_servers_table' => 'servers',
+		'numbers_table' => 'number_pool',
 		'apikeys_table' => 'apikeys',
 		'authorizations_table' => 'authorizations',
 		'sessionkeys_table' => 'sessionkeys',
+
+		'auth_backend' => 'permitall',
 		'sessionkey_lifetime' => 5, // Minutes
-		'numbers_table' => 'number_pool',
 		'standard_dialplan' => '(*xx*.|xxx.)',
 		'default_domain' => 'hig.no',
 		'permit_multiple_e164alias' => false,
diff --git a/doc/README b/doc/README
index 8af719f..f7ab0bd 100644
--- a/doc/README
+++ b/doc/README
@@ -1,5 +1,5 @@
 ABOUT HERMES
--------------------------
+------------------------------------------------------
 
 Hermes is a framework for managing a Kamailio SIP VoIP infrastructure.  It is
 designed to manage user accounts, SIP aliases, E164 phone number aliases and
@@ -11,11 +11,31 @@ not on Kamailio server management.
 
 
 CONFIGURING THE FRONTEND/UI
--------------------------
+------------------------------------------------------
 TBD
 
+DATABASE PREREQUESTITES FOR THE API
+------------------------------------------------------
+
+Hermes expects that Kamailio is installed and configured to use MySQL backing,
+with teh Siremis SQL structure, with subscribers in a 'subscribers' table, and
+aliases stored in 'dbaliases'. An SQL structure script for the tables used by
+Hermes is included in doc/sql-data/structure-kamailio.sql That file is included
+as a guide to verify the Kamailio configuration, and as a structure to use in
+development/testing as a replacement for a real Kamailio installation.
+
+Hermes itself requires a MySQL database on the same MySQL server, with the
+structure defined in doc/sql-data/structure-hermes.sql
+A database must be created, and the structure loaded prior to configuring
+the API.
+
+
+You may also choose to load the sample data. Note that the sample data does
+include a R/W API key, tied to the host 10.0.2.5. Replacing the IP
+address of that key may be used to boot-strap authorizations...
+
 CONFIGURING THE API
--------------------------
+------------------------------------------------------
 
 The API needs to be configured separately from the UI.
 API configuration is done by creating the PHP file
@@ -29,11 +49,7 @@ sql_username	-> Username for MySQL access
 		Needs RW access to kamailio and provision db's
 sql_password	-> Password for the above username
 kamailio_db	-> Database name of kamailio db.
-provision_db	-> Database name of provision db.
-
-standard_dialplan -> Dialling pattern to use for new users
-default_domain	  -> What domain should always be listed first
-permit_multiple_e164alias -> Currently not used ...
+hermes_db	-> Database name of hermes db.
 
 The following configuration options define SQL table names
 for respective data-sets, values for the sample-data.sql
@@ -42,8 +58,31 @@ are listed... :
 kamailio_domain_table		(domain)
 kamailio_subscriber_table	(subscriber)
 kamailio_alias_table		(dbaliases)
-provision_users_table		(users)
-provision_phones_table		(phones)
-provision_servers_table		(servers)
+kamailio_domain_table		(domain)
+hermes_users_table		(users)
+hermes_phones_table		(phones)
+hermes_servers_table		(servers)
 numbers_table			(numbers)
+apikeys_table			(apikeys)
+authorizations_table		(authorizations)
+sessionkeys_table		(sessionkeys)
+
+Configuration parameters not related to database:
+
+auth_backend
+ -> Backing store plugin for API user auth.
+
+sessionkey_lifetime
+ -> The amount of time an auth_key is valid in an API session. 
+    Aka max ping-interval.
+
+standard_dialplan 
+ -> Dialling pattern to use for new users
+
+default_domain	  
+ -> What domain should always be listed first
+
+permit_multiple_e164alias -
+ -> Currently not used ...
+