wiki:QuteComWebServices

Version 7 (modified by chris-mac, 3 years ago) (diff)

--

QuteCom Web Services is a web application (PHP + Symfony) designed to help QuteCom community experiment with Custom Account and XCAP Contacts List - see #247

Please note: it is not meant to be used in a production environment (intentionally all passwords are stored in clear text etc.), but should be treated as development tool only.

QuteCom Web Services use Asterisk as a SIP registrar server.

Installation

Requirements

Requirements:

  • MySQL
  • Apache - mod_rewrite enabled
  • Asterisk (installation of Asterisk is beyond the scope of this document)
  • PHP
  • PHP CLI

Web Application

Obtain application files from the repository:

cd /var/www
hg clone http://hg.qutecom.org/qutecom-webservices

Run installation script:

cd qutecom-webservices
./install.sh

Add Apache configuration directives as printed by install.sh script, for example:

<VirtualHost *:443>

  SSLEngine on
  SSLCertificateFile /var/www/qutecom-webservices/etc/certs/server.crt
  SSLCertificateKeyFile /var/www/qutecom-webservices/etc/certs/server.key

  DocumentRoot /var/www/qutecom-webservices/web

  DirectoryIndex index.php

  <Directory /var/www/qutecom-webservices/web>
    AllowOverride All
  </Directory>

</VirtualHost>

Asterisk

Backup you existing Asterisk config files (if any):

mv /etc/asterisk /etc/asterisk.bak

Create symbolic links to QuteCom Web Services config files:

ln -s /var/www/qutecom-webservices/etc/asterisk /etc/asterisk
ln -s /var/www/qutecom-webservices/etc/init.d/asterisk /etc/init.d/asterisk

Testing

Open you web browser and type the following address:

https://your_server_ip_here/

If all went fine, you should see web page similar to:

Now start QuteCom (compiled with CUSTOM_ACCOUNT ON and ENABLE_XCAP_SUPPORT ON), select "QuteCom Account" - see (1) in the figure below. Type test@example.com into field (2) and secret into field (3) and finally click 'Connect' button.

Usage

To manage your users and contacts use two scripts located in bin directory.

Users

Usage: ./bin/user [OPTION] [ARG] ...

Available options:
 -l
  List all users

 -a email 'User Name' password [currency_iso] [balance]
  Adds new user

 -d user_id
  Deletes user

Contacts

Usage: ./bin/contact [OPTION] [ARG] ...

Available options:
 -l
  List all contact

 -a FirstName LastName GroupName [tel] [mobile] [email]
  Adds new contact

 -d user_id
  Deletes contact

Attachments (3)

Download all attachments as: .zip