Managing Available Phone Numbers (DID Inventory)


Create a DID Supplier Vendor

Create a DID Batch for the Vendor

Upload DID Numbers

Release DID Numbers to the DID Pool

Create a Pricing DID Batch

Assign the Pricing Batch to Customer

Create an Account

Create a Group of Accounts


This chapter demonstrates how to efficiently manage a large number of phone numbers (DIDs) used for your SIP service. It will assist you in importing a set of DID numbers into PortaBilling®, managing them, allocating them to your customers, distributors or resellers and finally, provisioning them on SIP phones.


Depending on your business model, you can introduce different pricing strategies:

·       To define the revenue you want to receive for different types of DID numbers and charge customers for their provisioning or

·       To charge customers the same price regardless of the type of DID provisioned to them.


The steps below describe the DID provisioning model in which customers are charged the same price for all DID numbers provisioned to them. To apply different methods of charging, please refer to the How to … section.


For more information about available fields, click  at the top-right corner.


Print the following page and use it to check off the operations you have completed while performing the system setup according to the instructions in this chapter. Please be sure to perform all of the operations in the order designated (all of the boxes should be checked), otherwise the service will not work.


_Hint_ExclamationMark The checklist below assumes that you have already configured the basic SIP and PSTN-to-SIP services according to the instructions provided in the previous chapters.






Rating configuration


Create a DID supplier vendor

[     ]

Create a DID batch for this vendor

[     ]

Upload the DID list to this batch

[     ]

Release DIDs to the DID pool

[     ]

Create a pricing DID batch

[     ]

Assign the pricing batch to the customer

[     ]

Account provisioning


Check that the retail SIP service customer has already been created according to the instructions in previous chapters

[     ]

Assign some DIDs to this customer from DID Inventory

[     ]

Create a new account for this customer, with an account ID identical to the SIP phone number (DID)

[     ]



Program the parameters (phone #, password and SIP server address) into the SIP phone and make a test call

[     ]

Create a DID Supplier Vendor

This entity is required in order to keep track of your incoming DID expenses, as well as to provide an adequate level of security on your network. If you have already created a vendor while setting up a PSTN-to-SIP service, please proceed to the next step.


1.      In the left upper corner click  to open the navigation menu.

2.      On the navigation menu, select Infrastructure, then select Vendors.

3.      On the Create vendor panel, fill in the vendor details:

·       Name – Type a short name for the vendor object; this will be used on the web interface (for example, DID supplier).

·       Currency – Choose the currency in which this vendor charges you.

·       Opening balance – This indicates a starting balance for the vendor; the default is zero.

·       Billing period – Split period for vendor statistics.


4.      Click Save.


Title: Vendor - Description: Create vendor.

Create a DID Batch for the Vendor

A DID batch groups together a set of phone numbers (typically from the same city or area) provided by a particular vendor.


1.      On the navigation menu, select Infrastructure, select Inventory, then select DID inventory.

2.      On the DID inventory panel, select Vendor batches

3.      On the Create a vendor batch panel, fill in the vendor batch details:

·       Name – Type a vendor batch name.

·       Vendor – Choose the vendor that this batch will belong to.

·       Description – Your comments about this vendor batch.


4.      Click Save.



Upload DID Numbers

Now you need to fill in the DID batch with actual numbers. This is done by uploading a .csv file containing the numbers into PortaBilling®. (There is no operation for adding a single number into the batch from the web interface, as this is practically never needed; every DID supplier will be selling you numbers by the hundreds or even thousands).


1.      Prepare a .csv file. The structure of the .csv file should be as shown in the following table:






DID Number


Number or text

Phone number.

Vendor Batch



Name of the vendor batch this DID belongs to.




Description of a particular DID number.

Activation Cost



A one-time cost paid to a vendor for the DID number activation.

Recurring Cost



A monthly amount charged by a vendor for the provisioned DID number.

Release Date



Must be earlier than the upload date and time

The date that this number was released from the customer it was previously assigned to.




When a DID number is assigned to a customer or a reseller from this batch, no charges apply.



Two-letter country code (ISO 3166-1 alpha-2);

“--“ for “Not Applicable”

The country that this number belongs to.





The area that this number belongs to.


NOTE: The field order is important! The first row in the file is skipped, since it usually contains column titles and not actual data.

Title: A file for DID numbers upload - Description: A csv. file

2.      On the DID Inventory page, click up_csv DID Upload on the toolbar.

3.      In the DID Inventory Upload dialog box, specify the file location (you can click the Choose File button to select a file in the explorer dialog box).


Title: DID inventory upload - Description: Upload the file


4.      Click Upload.

5.      You will see the DID Inventory page displaying the numbers you have just uploaded, similar to the one below.


Title: The DID Inventory page displaying just uploaded numbers - Description: See the DIDs uploaded

NOTE: You should create a DID batch for the vendor before uploading the DID numbers provided by this vendor into the DID Inventory.

Upon upload, the status of DIDs is Frozen. When they are frozen, they are stored in the DID inventory and are therefore unavailable for immediate usage.

Release DID Numbers to the DID Pool

To use the DID numbers, release them to the DID pool.


1.      On the DID inventory panel, select DID number list.

2.      On the DID number search panel, select the specific vendor batch from the Vendor batch list and click Apply filters.

3.      Select the appropriate DIDs and click Manage.

4.      In the Select operations to apply to the selected DIDs dialog, select Pool management, then select Release DIDs to the pool.

5.      Click Ok.


Title: DID inventory - Description: Release DIDs to the pool.

Create a Pricing DID Batch

The pricing DID batch is a storage area for DID numbers that can be used for a particular purpose (e.g. to be provisioned to end users). Pricing batches allow you to apply additional charges for using DID numbers.


Depending on the type of a DID pricing batch, you can provide DID numbers either free of charge or for a price that is defined by the DID markup:

·       DID numbers in free pricing batches are free of charge, i.e. no charges apply to a customer when they are provisioned with a DID number.

·       Pricing batches with DID markup and prices defined for them allow you to apply additional charges to your customers or resellers for provisioning and using the DID numbers.


At this step it is required to create a pricing batch with a DID markup.


1.      On the DID inventory panel, select Pricing batches.

2.      On the Create a pricing batch panel, fill in the pricing batch details:

·       Name – Type a pricing batch name.

·       Applied to – Select Customer.

·       Type of DIDsSelect Inventoried as the batch contains DID numbers previously uploaded to the DID inventory.

·       Pricing – Select Fee-paying.

·       Pricing parameters:

o   CurrencyChoose the currency used to charge for DID usage.

o   Additional activation feeSpecify an amount you want to charge in addition to a DID provider’s activation fee.

o   Additional recurring fee – Specify an amount that is always included in the recurring (e.g. monthly) charge.

o   Recurring fee markup – Specify a markup that will be included in the recurring amount charged to the customer in addition to the actual DID cost (charged by a DID vendor).

o   Decimal places, number – Specify the rounding pattern to obtain “marketable” figures. This will specify the last “pre-set” digits in the figure.


Title: DID inventory - Description: Create a pricing batch.


Assign the Pricing Batch to Customer

To provision your customer with DID numbers, assign the pricing batch to them. The price defined within this pricing batch is what a customer pays when a DID number is provisioned to them.


_Hint_Glasses If you want to charge a different price for every DID provisioned to a customer, please refer to the How To… section.


1.      On your customer’s panel, select Personal, then select General info.

2.      On the Personal info panel, select Additional info.

3.      On the Additional info panel, select a previously created pricing batch in the Auto-provision DIDs via batch list.

4.      Click Save.


Title: Customer - Description: Assigning pricing batch.

Create an Account

1.      On the Customer Management page, click the accounts Accounts icon.


Create an account


Add an account


Select the DID for the account ID


2.      Click add Add on the toolbar.

3.      On the Add Account page, specify the following information:

·       Account Role – The defined usage for accounts. Select Phone line from the list.

·       Main Product – choose the main product, which you would like your account to have.

4.      Click the Account ID link.

5.      In the DID Number Select dialog box, you will see the list of available DID numbers and the charges associated with them. The charges for DIDs from the DID pool are pre-populated from the customer’s pricing batch.

6.      Click the DID number link to select this number as the account ID.

7.      Complete the Add Account form:

Account Info tab

·       Type – Select Credit to be used for the postpaid services.

·       Balance Control – Choose the way the balance of the account is controlled. Subordinate – the balance will directly depend on the customer; Individual Credit Limit – this account may have its own balance and credit limit (the customer credit limit still applies.)

·       Service Password – Together with the account ID, this password will be used to authenticate registrations and call attempts on the SIP server. It is very important to assign a secure (difficult to guess) password to prevent the account from being wrongfully entered and used to inject fraudulent calls to your network.

·       Email – Enter the account owner’s email address here. If he ever forgets his password for the web self-care pages, the password may be reset, and a new one will be sent to this email address. You can also just leave this field empty.

·       Batch – A batch is typically used to manage large quantities of one customer’s accounts, so for incoming calls from PSTN you can leave it empty – in other words, the account created will not be tied to any specific batch.

Add-on Products

·       Add-on Products - assign add-on products to the main product, if any are available.

Web Self-Care tab

·       Login – Account login to web self-care pages. Can be the same as account ID.

·       Password – Password for the web self-care pages.

·       Time Zone – The time zone for the account self-care interface.

·       Web Interface Language – The language to be used on the account self-care web interface.

Additional Info tab

·       Auto-Provisioning – Leave None (manual provisioning) selected. SIP phone auto-provisioning is described in the Setting up Auto-provisioning of IP Phones chapter of the Auto-provisioning of IP Phones section.

Life Cycle tab

·     Activation Date – The date from which the account is usable.

·     Specific Date – Identifies the date that the account expires.

·     ____days after First Use – Defines the number of days the account remains active after its first use or recharge.

·     ____days after Last Use – Defines the number of days the account remains active after its last use or recharge.

Since we are setting up a postpaid service, which should function for a long time, leave Expiration Date fields blank.

Service Configuration tab

Using this tab, you can activate / deactivate various features of the services provided to this account. Note that features are defined per service type (the physical service provided to the user such as Conferencing, Data Service, Voice Calls, Messaging, etc.)


Please consult the PortaBilling Help for a description of parameters available here. For now you may leave these with their default values.


When accounts with DID numbers are created, the DIDs are added to a customer’s pricing batch.

Create a Group of Accounts

You can also create a group of accounts and allocate DID numbers to them using the Account Generator. But first you need to assign the DID numbers from the DID pool to the pricing batch.

1.      On the DID inventory panel, select DID number list.

2.      On the DID number search panel, select Not in use in the Status list and click Apply filters.

3.      Select the appropriate DIDs and click Manage.


Title: DID inventory - Description: Free DIDs.


4.      In the Select operations to apply to the selected DIDs dialog, select the Assign the pricing batch option and select the required pricing batch from the list.

5.      Click Ok. On the refreshed page you will see that the DID numbers have now been assigned to the pricing batch mentioned in the previous step.


Title: DID Inventory - Description: Assigning pricing batch.


Now you can create new accounts via the Account generator.


1.      On the Customer panel, click Accounts.

2.      On the Create an account panel, click Account generator.



3.      Fill in the account generation information:

Initial configuration

·       Account role – The defined usage for accounts. Select Phone line from the list.

·       Product – Select the product you would like the accounts to use.

·       Quantity – Specify the number of accounts to generate.

·       Batch – Accounts are grouped into batches. If Add a new batch is selected, all accounts will be placed into a new batch. Otherwise, an existing batch should be selected from the drop-down list.

·       New batch name – You are suggested a batch name. You can define your own batch name.


Select account generation

Optional configuration

·       Type – Select which accounts you want to generate: either credit or debit.

·       Pricing batch – By default, accounts with the Phone line account role are generated from the DID inventory. Select the pricing batch to take DID numbers from.

NOTE: Any pricing batch can be selected for the creation of credit accounts. Debit accounts can be created only from free pricing batches.

·       Use DIDs from – Here you additionally define where PortaBilling® retrieves DID numbers from when generating accounts. The From the DID pool option means accounts are generated with available DIDs. If you have reserved DIDs for the customer by assigning them to this customer, select the From the DIDs assigned to the customer option.

·       If you wish, you can select the starting DID from the Assign DIDs sequentially starting with menu. Use this feature e.g. if you want to make sure that the customer’s phone range starts with a “round” phone number such as 00, followed by 01, 02, etc.

·       Specify other account parameters according to the instructions given in the previous chapters.


generate from DI Dinventory


Here you can activate / deactivate various features of the voice calls service provided to these accounts.


Please consult the PortaBilling® help for a description of parameters available here. For now you may leave these with their default values.


4.      Verify the account generation configuration and click Generate to start the account generation process.