SOAP Access

You can perform user and device maintenance through a SOAP API. No matter what language bindings you use (perl, c++, etc), you can use the Javadocs for the classes as a guide to what functions are available.

SOAP API

Perl Import Script

A simple perl script is installed called sipx_import.pl that is both an example script for creating your own perl script and as a functional utility for importing data in comma separated values files. It is configed by file sipx_import.dat file. Files are located in /usr/share/sipxpbx/bin for RPM installs and /usr/local/sipx/share/sipxpbx/bin for source based installs.

Installation

To use the import script. You'll need to install SOAP support for Perl

Perl libwww
Most perl distributions will have libwww support installed. If not see http://http://search.cpan.org
SOAP Lite Perl (tested with 0.55)
if you have CPAN.pm installed and are connected to the Internet
      
   perl -MCPAN -e 'install SOAP::Lite'
Otherwise you can download tarball
http://search.cpan.org/CPAN/authors/id/K/KU/KULCHENKO/SOAP-Lite-0.55.tar.gz
and follow instructions in README. When installing, warnings about MIME::Lite and MIME::Parser do not have any impact when running the example scripts

Example

Create a data file with comma separated values like the following. You can put the following example data into one file or several files. This sample data will create data in the "default" user and device groups. You change it to any groups you wish.

Create users in default user group

USER_CREATE,jlennon,1234,John,Lennon,111,,default
USER_CREATE,pmccartney,1234,Paul,McCartney,112,,default
USER_CREATE,gharrison,1234,Geore,Harrison,113,,default
USER_CREATE,ssutcliffe,1234,Stu,Sutcliffe,114,,default
USER_CREATE,rstar,1234,Ringo,Star,115,,default

Users need phones, here we create vendor specific devices, Pingtel's softphone and Pingtel's hard phone (hardphone not in production anymore).

DEVICE_CREATE,ff00000009a1,ixpressa_x86_win32,ixpressa1,default,John's Redhat
DEVICE_CREATE,ff00000009a2,ixpressa_x86_win32,ixpressa2,default,Paul's Gentoo
DEVICE_CREATE,ff00000009a3,ixpressa_x86_win32,ixpressa3,default,George's Win2K
DEVICE_CREATE,ff00000009a4,ixpressa_x86_win32,ixpressa4,default,Stu's WinXP
DEVICE_CREATE,00d01e006d8d,xpressa_strongarm_vxworks,xpressa1,default,Ringo's home phone

Phone's need to be told what user will be using them

DEVICE_ASSIGN,jlennon,ff00000009a1
DEVICE_ASSIGN,pmccartney,ff00000009a2
DEVICE_ASSIGN,gharrison,ff00000009a3
DEVICE_ASSIGN,ssutcliffe,ff00000009a4
DEVICE_ASSIGN,rstar,00d01e006d8d

User automatically get one line: username@domainname, but here we can give users addition lines

USER_CREATELINE,jlennon,PROVISION,DISABLE,sip:fanclub@pingtel.com
USER_CREATELINE,pmccartney,PROVISION,DISABLE,sip:bookings@pingtel.com

To import the data, edit the sipx_import.data with the appropriate data, you'll definitely have to change the ADMIN_PASSWORD value. Then run the following command:

  perl sipx_import.pl datafile.csv
Last modified: Wed Nov 3 13:08:15 EST 2004