Retrieve available DNs

Version 1
    This document was generated from CDN thread

    Created by: Joachim Bolz on 21-09-2009 02:12:55 PM
    Hi all,
    is there somebody out there who would like to give a "poor voip administrator" (without much programming skills...) a quick hint how to achive the following aim... ;-)
    What I actually want to achive is this:
    I want to assign directory numbers from within a certain range (e.g. 33000 - 34999) to new devices.
    Therefore I am looking for an easy way to check out, which DNs are already in use and subtract these numbers from the defined range in order to just display the numbers which are still free to use...
    I already found a way, how to check the numbers which are in use.
    This is done by a SOAP request, which I am able to send to my communications manager via the CURL tool.
    (you'll find the SOPA request below)
    So far, this works as expected. In fact, it responds with all DNs which are already in use.
    But now, I would like to get the "still free to use" DNs displayed, rather than the "already in use" DNs.
    I assume, this could be done by some JAVA (or alternative programming language) code...
    But as I mentioned, this is not my strongest skill.. :-(
    I would be more than happy, if someone could give me some hints or provide me with some sample programming code...
    Thanks in advance,
    Here is my SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">
        <axlapi:executeSQLQuery xmlns:axlapi="" xmlns:axl="" xmlns:xsi="" sequence="1" xsi:schemaLocation=" axlsoap.xsd">
          <sql>Select dnorpattern from numplan where dnorpattern like '33___' or dnorpattern like '34___'</sql>