sipXworks PHP API

Table of contents.

Introduction

VoiceWorks sipXworks PHP API encapsulates a subset of sipXconfig and sipXconfig-agent (ACD) SOAP API.
The project offers a single noarch RPM for download that works with all RedHat's family distros both with sipXecs 3.10 and 4.0 (I hope)

Extras

PHP API comes with a few example scripts and a httpd context with example page that shows ACD Queue Statistics

Features

  • sipXconfig (a lot of missing features)
    • User management
      • Add/Del user
      • Add/Remove user to/from group
      • Search for users
    • Phone management
      • Restart phone
      • Add lines
      • Add Polycom phones
  • sipXacd
    • Access Queue Statistics
    • Access Agent History

Installation

  • Download the RPM
  • Install it
    yum install --nogpgcheck sipxworks-phpapi-1.0-183.noarch.rpm
    sipXecs 4.0 ISO
    sipXecs 4.0 ISO has no centos-release package installed hence no way to install sipxworks-phpapi dependencies. If You happen to hit this problem with yum not being able to fetch php then install the missing repository data with:
    rpm -ivh http://mirrors.kernel.org/centos/5.3/os/i386/CentOS/centos-release-5-3.el5.centos.1.i386.rpm
    

    or for X86_64 ISOs :

    rpm -ivh http://mirrors.kernel.org/centos/5.2/os/x86_64/CentOS/centos-release-5-2.el5.centos.x86_64.rpm
    
  • restart sipXecs (restarting httpd should be enough)
    service sipxecs restart
  • modify /usr/local/sipxworks-phpapi/php/api/sipxglobals.php
    <?php
      class SIPXAPIGLOBALS {
        public static $password = 'changeme';
        public static $sipXconfigWSDL = '/usr/local/sipxworks-phpapi/php/api/wsdl/sipxconfig.wsdl';
        public static $sipXconfigAgentWSDL = '/usr/local/sipxworks-phpapi/php/api/wsdl/sipxconfig-agent.wsdl';
        public static $fakestats = false;
      }
    ?>
    
    set $password with Your supervisor account password
    set $faksestats to false
  • play with examples @ /usr/local/sipxworks-phpapi/php/examples
    [root@sip1 examples]# php cli_testapi.php 
    Cleaning up..
    Adding user sipXworks001
    Adding user sipXworks002
    Adding user sipXworks003
    Adding user sipXworks002 to group voiceworksapitest
    Removing user sipXworks002 from group voiceworksapitestother
    Deleting user sipXworks001
    Deleting user sipXworks002
    Deleting user sipXworks003
    
  • Go to http://localhost:8112/acd/queuestats.php for some queue stats.
    localhost can be Your sipxecs IP/FQDN.

    Changelog

  • 1.0-194 : 2009-05-13
    1. added missing sipxsql.php,logger.php,pgsql.php to the RPM
    2. fixed sipxglobals.php template to include fakestats constant
  • 1.0-186 : 2009-05-06
    1. added SIPXSQL class for direct access to sipXconfig SQL storage
    2. added ?user=xyz parameter to example ACD wallboard page show only the user's queues
  • 1.0-184 : 2009-05-02
    1. added page refresh of 30seconds
    2. added queue list filtering
  • 1.0-183 : 2009-05-01
    1. initial release

Labels

sipxworks sipxworks Delete
sipxecs sipxecs Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.