1A.
Method for Getting Available DID’s
This method
returns the list of available DID’s
in the form of an array. The user
is required to give User ID, Password,
Country code, Area code as arguments
and then get a list of available
DID’s for the area of the
country for which he’s provided
the code.
If
the user wants available DID’s
for the whole country and not just
for a particular area, then he should
supply ‘-1’ as the Area
code. In return, he’ll get
the list of available DID’s
for the whole country.
Now,
optionally user can provide a specific
Vendor ID to get the DID's, available
for sale by the Vendor (provide
'-1' or nothing if there is no defined
Vendor ID).
Method
Signature
sub getAvailableDIDS
($UserID, $Password, $CountryCode,
$AreaCode ,$VendorID,$VednorRatingFrom,$VendorRatingTo,$CountryID)
Example
Usage
We are providing
a sample code in PERL which accesses
and uses this service.
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response = SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetListServer.cgi')
-> getAvailableDIDS("65948","sdaf485","92","-1");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The first two arguments passed to
the method are user ID and password.
The third argument is the country
code and the fourth represents the
area code. In this case, we’ve
provided ‘92’ as the
country code that corresponds to
Pakistan and ‘-1’ in
place of the area code. This will
return the list of all available
DID’s for Pakistan with vendor
rating. In case you want available
DID’s for a specific area,
you’d have to provide the
area code for it.
Or
In
case user needs to get the available
DID's from particular Vendor:
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetListServer.cgi')
-> getAvailableDIDS("65948","sdaf485","1","-1","991199",1,5,224);
The
first two arguments passed to the
method are user ID and password.
The third argument is the country
code and the fourth represents the
area code. In this case, we’ve
provided ‘1’ as the
country code, and ‘-1’
in place of the area code. As
'1' represents several countries
including USA and Canada, you need
to provide the country ID as well
which comes from the WebGetCountriesServer.cgi
API.
This
will return the list of all available
DID’s for Dominican Republicwith
vendor rating 1 to 5. In case you
want available DID’s for a
specific area, you’d have
to provide the area code for it.
Important
Note: to distinguish between USA
and Canada, please provide '999'
as Country Code for Canada.
To distinguish in the countries
having same country codes, please
provide the
'Country ID' as additional argument,
comes from the API WebGetCountriesServer.cgi
Error
Codes
In
case of any incorrect information
provided by the user or in case
of no matching data, an error code
will be returned. Error codes correspond
to the following messages:
-1
= User ID does not exist.
-2 = Your Password is Incorrect.
-3 = There are no DID's for this
Area in our record.
-4 = The Area code does not exist.
-5 = There are no DID's for this
country in our record.
-6 = The Country Code does not exist.
1B.
Method
for Getting Available DID’s
Country List
This
method returns the list of available
DID’s country list by Vendor
Rating in the form of an array.
The user is required to give User
ID, Password, and Vendor Ratings
as arguments and he’ll get
a list of available DID’s
countries.
User
can supply Vendor Rating range to
get a list of available DID's countries
by Vendor Rating. If there is no
range is defined, then it will get
a list of DID's countries with all
vendor ratings.
Method
Signature
sub getDIDCountry
($UserID,$Password,$VRatingFrom,$VRatingTo)
Example
Usage
We are providing
a sample code in PERL that accesses
and uses this service.
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetDIDCountriesServer.cgi')
-> getDIDCountry("65948","sdaf485","1","6");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The first two arguments passed to
the method are user ID and password.
The third argument represents the
starting Rating and the fifth represents
the ending Rating. In this case,
we’ve provided ratings from
1 to Vendor Rating 6. This will
return the list of all available
DID’s country originations.
The return values are CountryName,
CountryCode and and CountryID (unique).
Error
Codes
In
case of any incorrect information
provided by the user or in case
of no matching data, an error code
will be returned. Error codes correspond
to the following messages:
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DIDs' country
avaiable in our record.
1C.
Method
for Getting Available DID’s
Area List By Country Code
This
method returns the list of available
DID’s Area list by country
code and Vendor Rating in the form
of an array. The user is required
to give User ID, Password, country
code and Vendor Ratings as arguments
and he’ll get a list of available
DID’s area list of that country.
User
can supply Vendor Rating range to
get a list of available DID's areas
by Vendor Rating and country code.
If there is no range is defined
than it will get a list of DID's
areas with all vendor ratings.
Method
Signature
sub
getDIDArea ($UserID,$Password,$CountryCode,$VRatingFrom,$VRatingTo,$Vendor,$MonthlyFrom,$MonthlyTo,$CountryID)
Example
Usage
We are providing
a sample code in PERL which accesses
and uses this service.
example
1:
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetDIDAreasServer.cgi')
-> getDIDArea("65948","sdaf485","92","5","9");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user id and password.
The third argument is the country
code, the fourth represents the
starting Rating and the fifth represents
the ending Rating. In this case,
we’ve provided ratings from
5 to Vendor Rating 9.
example
2:
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetDIDAreasServer.cgi')
-> getDIDArea("65948","sdaf485","1","5","9","8888","0.5","2.5",37);
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user id and password.
The third argument is the country
code, the fourth represents the
starting Rating and the fifth represents
the ending Rating. In this case,
we’ve provided ratings from
5 to Vendor Rating 9. 6th
and 7th is for the monthly rates
range of the DIDs. The last argument
is CountryID which comes from WebGetDIDCountriesServer.cgi.
You will have to give this country
ID, if you are gettng the area codes
of the country having counry code
'1', other then USA.
Important
Note: to distinguish between USA
and Canda, please provide '999'
as Country Code for Canda.
For other countries, please use
the CountryID comes from WebGetDIDCountriesServer.cgi
Error Codes
In
case of any incorrect information
provided by the user or in case
of no matching data, an error code
will be returned. Error codes correspond
to the following messages:
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DIDs' Areas
avaiable in our record.
1D.
Method
for Getting Available DID’s
Country Code Or Area Code by Vendor
Rating
This
method returns the list of available
DID’s by Vendor Rating in
the form of an array. The user is
required to give User Id, Password,
Country code, Area code and Vendor
Rating as arguments and he’ll
get a list of available DID’s
for the area of the country for
which he’s provided the code.
If
the user wants available DID’s
for the whole country and not just
for a particular area, then he should
supply only Country code (e.g.,
"44" for UK).
If he wants DID's for just one particular
area, he should supply Country code
with Area Code (DID Prefix, e.g.,
"4420" for UK, London).
In return, he’ll get the list
of available DID’s for desired
area.
Please
note user must supply area code
for US.
( e.g., "1567")
User
can supply Vendor Rating range to
get a list of available DID's by
Vendor Rating Rating. If there is
no range is defined, then it will
get a list of DIDs with all vendor
ratings. (limited display)
Method
Signature
sub getAvailableRatedDIDSbyCountryCode
($UserID,$Password,$CountryCode,$VRatingFrom,$VRatingTo,$Limit,$Vendors*,$MonthlyRateRangeFrom,$MonthlyRateRangeTo,$CountryID)
Example
Usage
We are providing
a sample code in PERL which accesses
and uses this service.
example
1:
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetAllRatedDIDS.cgi')
-> getAvailableRatedDIDSbyCountryCode("65948","sdaf485","1567","1","6");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user ID and password.
The third argument is the country
code (or DID Prefix), fourth represents
the starting Rating and the fifth
represents the ending Rating. 6th
is the no. of DIDs to display(max.
10 only), 7th for the Vendors*,
8th and 9th for monthly rate range.
10th for unique country id which
comes for API WebGetDIDCountriesServer.cgi.
In this case, we’ve provided
‘1567’ as the country
code which corresponds to US, from
Vendor Rating 1 to Vendor Rating
6. This will return the list of
all available DID’s US and
NW Ohio:Toledo.
*
= Multiple Vendors can be given
separated by 'comma'.
or
Use
following function to get a full
list of DIDs based on Country/AreaCode,Vendor
Rating Range and Price Range.
Method
Signature
sub getAvaiableDIDsByAll
($UserID,$Password,$CountryCode,$AreaCode,$VRatingFrom,$VRatingTo,$MinimumPrice,$MaximumPrice,
$Vendors, $CountryID)
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetAllRatedDIDS.cgi')
-> getAvaiableDIDsByAll("65948","sdaf485","1","567","1","6",1,4,211);
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user ID and password.
The third argument is the country
code (or DID Prefix), fourth is
area code, 5th represents the starting
Rating and the 6th represents the
ending Rating,7th and 8th are the
minimum and maximum price range.9th
for vendors* and 10th for unique
country id. In this case, we’ve
provided ‘1' and '567’
as the country/area code which corresponds
to US, from Vendor Rating 1 to Vendor
Rating 6, from US$1 to US$4. This
will return the list of all available
DID’s US and NW Ohio:Toledo.
As COuntry id for US is 211.
or
Use
following function to get a full
list of DIDs based on Country/AreaCode,Vendor
Rating Range and Price Range.
Method
Signature
sub
getDIDSbyCountryCodeAndPrice
($UserID,$Password,$CountryCode,$MinimumPrice,$MaximumPrice,$VRatingFrom,$VRatingTo,$CountryID)
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetAllRatedDIDS.cgi')
->getDIDSbyCountryCodeAndPrice("65948","sdaf485","1567",1,4);
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user ID and password.
The third argument is the country
code (or DID Prefix), fourth and
the fifth represents the minimum
and maximum price range. 6th adn
7th for VendorRating range and 8th
for country id. In this case, we’ve
provided ‘1' and '567’
as the country/area code which corresponds
to US, from US$1 to US$4. This will
return the list of all available
DID’s US and NW Ohio:Toledo.
or
Use
following function to get a list
of DIDs based on Country/AreaCode
and Free Minutes Range.
Method
Signature
sub
getAvailableRatedDIDSbyFreeMin
($UserID,$Password,$CountryCode,$AreaCode,$MinimumFreeMin,$MaximumFreeMin,$Vendors*,CountryID)
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetAllRatedDIDS.cgi')
->getAvailableRatedDIDSbyFreeMin("65948","sdaf485","1","567","2000","5000");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user ID and password.
The third argument is the country
code (or DID Prefix), fourth one
is area code and the fifth and sixth
represents the minimum and maximum
free minutes range range. 7th is
the vendos id and 8th for country
id.
In this case, we’ve provided
‘1' and '567’ as the
country/area code which corresponds
to US, from 2000 to 5000 minutes.
This will return the list of all
available DID’s US and NW
Ohio:Toledo.
Error
Codes
In
case of any incorrect information
provided by the user or in case
of no matching data, an error code
will be returned. Error codes correspond
to the following messages:
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DID's for
this Area in our record.
-10 = There is no area code defined
with US Country code.
-11 = Country code not provided.
-12
= Invalid Price Range
1E.
Method for Getting available
NXX list by NPA
This
method returns the list of available
available
NXX
by NPA and Vendor Rating in the
form of an array. The user is required
to give User ID, Password, NPA and
Vendor Ratings as arguments and
he’ll get a list of available
NXX list of that country.
Note:
Please note that this function works
only for USA.
Method
Signature
sub
getAvailableRatedNXX ($UserID,$Password,$CountryCode,$NPA,$VRatingFrom,$VRatingTo)
Example
Usage
We are providing
a sample code in PERL which accesses
and uses this service.
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response
= SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetListServer.cgi.cgi')
-> getAvailableRatedNXX("65948","sdaf485","1","567","1","9","");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
}
The
first two arguments passed to the
method are user id and password.
The third argument is the country
code, the fourth represents the
NPA, fifth starting Rating and the
sixth represents the ending Rating.
In this case, we’ve provided
ratings from 5 to Vendor Rating
9. This will return the list of
all available DID’s Area list
for Pakistan.
Error Codes
In
case of any incorrect information
provided by the user or in case
of no matching data, an error code
will be returned. Error codes correspond
to the following messages:
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DIDs' Areas
avaiable in our record.
2.
Method for Purchasing
a DID
By
using this method the user can purchase
a DID. The user has to provide user
id, password, DID Number (which
he wants to purchase), SIP URL or
IAX ,flag (0 for SIP URL or 1 for
IAX) and/or Vendor ID.
In
case of successful purchase, the
DID number itself would be returned.
Otherwise, an error code would be
returned which is described later.
Method
Signature
sub
BuyDIDByNumber ($UserID,$Password,$DIDNumber,$SIPorIAX,
$Flag,$VendorID)
Example
Usage
We are providing a sample code in
PERL that accesses and uses this
service.
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
print SOAP::Lite
-> uri('http://didx.net/BuyDID')
-> proxy('http://didx.net/cgi-bin/WebBuyDIDServer.cgi')
-> BuyDIDByNumber("954488","54dfg5","2607158","2607158@supertec.com","1")
-> result;
This
code requests to buy a DID number
‘2607158’, giving SIP
‘2607158@supertec.com’.
The last arguments tell the service
whether the user wants a SIP or
an IAX.
OR
print
SOAP::Lite
-> uri('http://didx.net/BuyDID')
-> proxy('http://didx.net/cgi-bin/WebBuyDIDServer.cgi')
-> BuyDIDByNumber("954488","54dfg5","2607158","2607158@supertec.com","1","88111")
-> result;
This
code requests to buy a DID number
‘2607158’, giving SIP
‘2607158@supertec.com’
from Vendor ID '88111'.
Please
provide '-1' or nothing, if there
is no specific Vendor ID.
Flags:
1 = SIP
2 = IAX
Error Codes
In
case of any incorrect information
provided by the user or in case
of no matching data, an error code
will be returned. Error codes correspond
to the following messages:
-1 = User ID does not exist
-2 = Your Password is Incorrect
-3 = This DID Number is already
Sold
-4 = This DID Number is already
Reserved
-5 = DID Number doesn't exit
-6 = The Country Code does not exist
-20 = Account not active
-22 = Due not cleared
-23 = Customer documents required.
Click
here for further details
-24 = This DID is reserved for another
customer
-30 = Invalid account type to buy DID.
3.
Method for Releasing DID
If
you've already bought a number from
'didx.net' and want to return this
DID, this webservice can help you
do that. You'd have to provide DIDx User ID,
Password and DID Number you want
to release.
Method Signature
ReleaseDID($UserID,$Password,$DIDNumber)
Example Usage
We
are providing a sample code in PERL
that accesses and uses this service.
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
print SOAP::Lite
-> uri('http://www.didx.net/Release')
-> proxy('http://www.didx.net/cgi-bin/WebReleaseDIDServer.cgi')
-> ReleaseDID("584884","asdf5","44554645587")
-> result;
First
argument is the DIDx User ID, second
the password, third the DID number
that you've bought and want to release.
In case of successful releasing
the same DID number would be returned.
Otherwise, it will return an error
code.
Error
Codes
It
will return an ‘Error Code’
in case there is some thing wrong
with the information provided or
there is no matching data in our
record.
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = This DID is not in your ownership.
-4 = No such DID Number exists.
4.
Method for Getting the cost of a
DID
This
method returns the cost (Setup Charges,
Monthly Charges, Per Minute Cost)
of the DID number that is being
passed as an argument.
Method Signature
sub
GetCostOfDIDByNumber ($UserID,$Password,$DIDNumber)
Example Usage
We
are providing a sample code in PERL
that accesses and uses this service.
#!/usr/bin/perl
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response = SOAP::Lite
-> uri('http://didx.net/GetCost')
-> proxy('http://didx.net/cgi-bin/WebGetCostOfDIDServer.cgi')
-> GetCostOfDIDByNumber("548136","548das","92216545332");
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print "$res[$iIndex][0]<br>";
print "$res[$iIndex][1]<br>";
print "$res[$iIndex][2]<br>";
}
This code asks for the cost of DID
number: 92216545332. The
different charges are returned in
the form of an array. The first
element of the array represents
Setup Cost, second Monthly Charges
and the third represents Per Minute
Charges, fourth one is vendor rating
for this DID. If there is an error
in the request, an error code is
returned.
Error Codes
It
will return an ‘Error Code’
in case there is some thing wrong
with the information provided or
there is no matching data in our
record.
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = DID number doesn't exist.
5. Method
for Getting Available DID's for
Areas other than the Area List Provided
For
using this service you'll have to
provide a list of Country and area
codes side by side for which you
don't want any DID in the form of
a two-dimensional array. In return
all available DID's except for those
areas would be returned. Along with
each DID, its cost (Setup, Monthly
and Per Minute Charges), Area name,
Area code, Country name and Country
code are also returned.
Method Signature
getAvailableDIDS($UserID,$Password,$CountryCode);
Example Usage
We
are providing a sample code in PERL
which accesses and uses this service.#!/usr/bin/perl
#!/usr/bin/perl
my @CountryState = ();
$CountryState[0][0] = 92;
$CountryState[0][1] = 21;$CountryState[1][0]
= 92;
$CountryState[1][1] = 42;
use SOAP::Lite;
print "Content-Type: text/html\n\n";
$soap_response = SOAP::Lite
-> uri('http://didx.net/GetList')
-> proxy('http://didx.net/cgi-bin/WebGetListExcept.cgi')
-> getAvailableDIDS("356878","gfh3645",\@CountryState);
#Note:
The array is passed by reference
@res = $soap_response->paramsout;
for ($iIndex=0;$iIndex<=$#res;$iIndex++)
{
print
"$res[$iIndex][0] - $res[$iIndex][1]
- $res[$iIndex][2] - $res[$iIndex][3]
- $res[$iIndex][4] - $res[$iIndex][5]
- $res[$iIndex][6] - $res[$iIndex][7]
\n";
#Sequence(DIDNumber-SetupCost-MonthlyCharges-PerMinuteCharges-AreaName-AreaCode-CountryName-CountryCode)
}
This
code first defines a two-dimensional
array and then assigns two sample
rows to it. The order is very important;
first element of each row should
be the country code, while the second
should be the area code. Here we've
provided country code '92' for both
rows which represents 'Pakistan'.
The first area code is '21' for
'Karachi' while the second '42'
for 'Lahore' (which means that we
want all the available DID's present
in didx.net stock except those for
Lahore and Karachi). After that
this array is passed by reference
to the web service. If the request
succeeds, an array of DID's would
be returned otherwise an error code.
The second element of each row of
the returned array represents the
Setup Cost, third Monthly Cost,
fourth Per Minute Charges, fifth
Area name, sixth Area code, seventh
Country name and eighth element
represents the country code for
that particular DID number.
Error Codes
It
will return an ‘Error Code’
in case there is some thing wrong
with the information provided or
there is no matching data in our
record.
-1
= User ID does not exist
-2 = Your Password is Incorrect
-3 = No DIDS found for the requested
crieteria.
-4 = None of the Provided Country
and Area codes were correct.
6.
Method to Add DID Stock on DIDx
This method will allow the user
to add DIDs to the stock of DIDx
for sale. The user is required
to provide complete information
of a DID being offered , such
as UserID, Password, DID Number(single