SipX ConfigServer SOAP API
From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia
The SOAP API for sipXconfig lets you perform many operations offered by sipXconfig in a programmatic way and without interacting with the sipXconfig WEB UI. The sipXconfig API is extended all the time and offers most of the functionality available in the Web UI.
I can think of at least 3 cases where you might want to use it:
- You are integrating sipXecs with your company's IT infrastructure: In this case you probably have some kind of Enterprise Web Portal (i.e. an Intranet) and you want to connect sipXecs functionality to it. You can call it a mashup.
- You are looking to automate or script some processes: Adding or importing users, upgrading phones. assigning phones to groups and many more
- You do not like the sipXconfig UI and want to replace it with something different
You can use SOAP in may ways: Usually it involves getting WSDL, which is a formal API definition, and generate bindings in your favorite language (Python, Perl, Ruby, Java, etc.). Pick the language with good SOAP client support. Strictly speaking you can also send low level SOAP requests but most modern SOAP client libraries let you operate on a higher level.
Contents |
Resources for building SOAP clients
- Unit tests - Written in ruby, uses SOAP4R and wsdl2ruby for easy API.
- Source
- Sample Code - Written in Perl Using SOAP::Lite
- Sample Code - Written in Python Using SOAPpy
Every sipXconfig installation already publishes the SOAP API on URLs like this:
https://yourdomain:8443/sipxconfig/services/*Service
See the documentation above to get a list of all the services
Clients
Ruby
To build ruby client bindings, follow this part of the instruction steps when building sipxconfig. Bindings will be available in
sipXconfig/web/dist/ruby-bindings
Perl
Install SOAP for perl
perl -MCPAN -e 'install SOAP::Lite'
Then you can adapt the sample script to your needs.
Generating API documentation
wsdldoc from bluetetra is used to generate the API documention from the WSDL
command line:
java -jar $WsdlDocDir/wsdldoc.jar \ -title "sipXconfig SOAP API v3.2" \ -dir `pwd`"/ws-api-3.2" \ http://sipxecs.sipfoundry.org/rep/sipXecs/main/sipXconfig/web/src/org/sipfoundry/sipxconfig/api/sipxconfig.wsdl
