Knowladge Base


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 (1 for SIP URL or 2 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)


his code requests to buy a DID number ‘2607158’, giving SIP ‘’. The last arguments tell the service whether the user wants a SIP or an IAX.

Successfull query will return the same DID number.


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. See Also Submiting Documents
-24 = This DID is reserved for another customer
-30 = Invalid Account Type
-31 = Rating of this DID is less then the one you have been allowed