Instant Messaging Services


Initial Configuration of PortaSwitch®

Enable the Messaging Service

Create a Domain Service Policy

Create Internal Vendor Tariff

Enter Rates for Internal Vendor Tariff

Define a Connection for the Internal Vendor

Create a Customer Tariff

Enter Rates to the Customer Tariff

Modify Included Services and Usage Charges for a Product



Instant Messaging (IM) is defined as the exchange of text messages between two users within the same network in real time. As a service, IM is always coupled with the presence service. For example, when a friend comes online, a user is notified of this and has the option of sending his friend an instant message. Supported by a wide range of multimedia clients such as MS Messenger, instant messaging can be easily used on many kinds of devices.


This chapter demonstrates how to set up the basic Instant Messaging service so that your customers can easily post messages from any computer or mobile device. Note that instant message delivery is performed among accounts defined within the same virtual billing environment.


Please refer to the PortaBilling online helpPortaBilling Help  for detailed instructions on how to navigate and operate the web interface, as well as for detailed explanations of particular fields.


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.






General Configuration


Enable the Messaging Service on the Configuration server

[     ]

Network configuration


Create a domain service policy (that will be referred to as service policy A later on). It will determine which type of transport protocol is used for messages and will also be used for internal communications between PortaSIP® and the billing engine

[     ]

Rating configuration (Internal Vendor)


Create a vendor tariff for IM services (that will be referred to as tariff A later on). Make sure this tariff has the Instant Messaging service assigned and the Routing option disabled!

[     ]

In tariff A, enter a rate for the wildcard destination (|)

[     ]

Create a “Messaging to Vendor via SIP” connection for your “internal” vendor (the one created in the basic SIP service configuration for handling SIP on-net calls) with the Remote Gateway ID field containing the “SIP-UA” string and tariff A

[     ]

Rating configuration (Customer)


Create a tariff (referred to as tariff B later on), which will be applied to end users

[     ]

In tariff B, enter the rates for the destinations to which your customers will send messages

[     ]

Modify a product for end users:

Include the Messaging Service and add a new usage charge entry for this product using the PortaSIP node and tariff B

[     ]



Provision test softphones and send an instant test message

[     ]


Initial Configuration of PortaSwitch®

If you have just installed the PortaSwitch® software or dedicated a new billing environment to configure the services described in this handbook, make sure to first perform the initial configuration of PortaSwitch®. To do this, use the Initial Configuration of PortaSwitch® handbook.

Enable the Messaging Service

1.      Clone the existing configuration.

2.      Select BillingEngine on the Configuration Tree. Enable the Messaging Service in the ServiceTypes group.


Enable the messaging service


3.      Click the Save button and then the Verify button.

4.      Verify the new configuration and click the Check / Apply button.

Create a Domain Service Policy

A service policy is a set of parameters that defines how the subsystems of PortaSwitch® must operate to provide the Messaging service.


At this point it is necessary to create a domain service policy. This policy is used for internal communications between PortaSIP® and the billing engine regarding routing and transport protocol that is used for message delivery.


1.      In the Networking section of the admin interface, choose Service Policies.

2.      On the Service Policies page, click  Add a new policy in the Messaging Service section.


Create the domain service policy


3.      Add the following attributes to the service policy:

·       Policy Name – Specify the name of the service policy.

·       Policy ID – Specify the policy identifier. This can be any string as it is used for internal purposes only and does not affect the service policy configuration.

·       Description – Provide the short text description of the service policy.

·       Match Priority – Specify 1. Please refer to the PortaBilling Help for detailed description of this field.

·       Recipient domain pattern – Specify the pattern according to which the service policy will be selected. Type % for the instant messaging service.

·       Transport_protocol – Choose SIP.

·       Outgoing_aaa – Choose Yes to enable outgoing message authorization and billing.

·       External_routing – Choose No.

·       Local_lookup – Choose Yes to enable the lookup for destinations within the network.

·       Userpart_e164_translation – Choose Yes.


Configure the domain service policy


4.      Click  Save.


 Note that it will take several minutes until the changes are propagated to PortaSIP® and Radius server.

Create Internal Vendor Tariff

To correctly bill for on-net instant messages (i.e. those delivered to accounts within your network), you will need to create a special tariff for the internal (virtual) vendor:


Create Internal Vendor Tariff


Add tariff information        


1.      In the Rating section of the PortaBilling® main page, choose Tariffs.

2.      On the Tariff Management page, click  Add.

3.      Fill in the Add Tariff form:

·       Name – A short name for the tariff object; you will see this name in the select menus.

·       Currency – Select your base currency here.

·       Applied To – Choose Vendor in the Applied To select menu.

·       Routing – Clear this check box, as on-net instant messages will not leave your network.

·       Service – Choose Messaging Service here.


4.      Click  Save.

Enter Rates for Internal Vendor Tariff

Enter rates for internal vendor tariff


Specify rate info


Check the rate added


1.      Click the Rates icon next to the name of the internal vendor tariff.

2.      On the Edit Rates page, click  Add.

3.      Type in ‘|’ (pipe) in the Rate Codes field and set zero as the price. Leave the other fields in the form as they are, because there are no actual costs for on-net instant messages. This will create a special rate that matches any number the message is sent to.

4.      Click save_add Save icon on the left side of the row.

Define a Connection for the Internal Vendor

In this step, you will add a new connection to the internal vendor.

1.      In the Participants section of the PortaBilling® main page, choose Vendors.

2.      Click the internal vendor (the one that holds the SIP-UA connection).

3.      Click the Connections icon on the toolbar.


 Define a connection for internal vendor


Fill in the connection information


Check the connection added


4.      Click  Add to add a new connection.

5.      Fill in the connection information:

·       Description – Give a short description for the connection that will be shown in the list of connections.

·       Service Type – Select Messaging Service here.

·       Type – Select Messaging to Vendor via SIP.

·       Tariff - Choose the internal vendor tariff you created earlier from the Tariff list.

·       Select Internal connection and choose Route to internally registered SIP accounts (SIP_UA) from the list.

·       Choose the service policy you created earlier from the Service Policy list.


6.      Click  Save & Close.

Create a Customer Tariff

Create a customer tariff


Fill in the customer tariff info


1.      In the Rating section of the PortaBilling® main page, choose Tariffs.

2.      On the Tariff Management page, click   Add.

3.      Fill in the Add Tariff form:

·       Name – A short name for the tariff object; this is the name you will see in the select menus.

·       Currency – Indicates the currency in which you charge your customers.

NOTE: The currency for the tariff is chosen only once and cannot be changed later.

·       Applied To – Choose Customer, as this tariff will be used to charge your customers.

·       Service – Choose Messaging Service.


4.      Click  Save.

Enter Rates to the Customer Tariff

Add rates to the customer tariff


Specify the rate data


Check the rate added


1.      While on the Edit Tariff page, click Rates on the toolbar.

2.      On the Edit Rates page, click  Add.

3.      Fill in the required information:

·       Rate Codes – A destination prefix may be entered directly (e.g. 440 for United Kingdom Mobile) or you can access the destinations directory by clicking the Rate Codes link (in the column header). Here you will find the desired prefix by country name.  Alternatively, if you charge your customers a single price for instant messages or do not charge them at all, enter a ‘|’ (pipe) in the Rate Codes field.

·       Unit Price – Specify the price per message or put a zero if you provide instant messaging services free of charge.

4.      Click the  Save icon on the toolbar, or the  Save icon on the left side of the row.

Modify Included Services and Usage Charges for a Product

Since the IP devices and applications connect to PortaSIP® via SIP protocol for both messaging and voice calls services, the product for messaging product must include voice calls and messaging services.


1.      In the Rating section of the PortaBilling® main page, choose Products.

2.      Click on the required product name to open the Edit Product page.

3.      Select the Messaging Service check box in the Included Services tab.

4.      On the Usage Charges tab click Add.

·       Select Messaging Service from the Service list.

·       Select the PortaSIP® node in the Node field.

·       In the Tariff field, select the tariff that applies to your customers for sending instant messages.


Add the messaging service


Add usage charges


Select usage charges parameters


Check the usage cgarges added


5.      Click Update to save this rating entry.

NOTE: There is currently no need to create a special tariff and rating entry for incoming messages as they are considered free by default.

Now your SIP subscribers who have this product can use instant messaging service in addition to VoIP services.


Note that if you have more than one virtual environment where you will provide instant messaging service, you will need to perform the above steps for each virtual environment.


Configure the instant messenger application. For an example of the softphone configuration, please find the description of the Twinkle softphone for Linux,, below.

NOTE: Twinkle is available for Linux only.

1.      Install Twinkle and perform its configuration.


Install Twinkle


2.      On the User Profile page click Editor in the Create a Profile pane.

3.      Specify the name of your profile and click OK.


Create a profile


4.      Fill in the Profile form. The most important fields are:

·       Name – Specify your name. This is a display name that will be shown to the party you call or send messages to.

·       User name – Specify your account ID here.

·       Domain – Specify the VIP of your PortaSIP® cluster.

·       Authentication name – Specify your account ID here.

·       Password – Specify the service password in this field.

·       Click OK.


5.      Select the profile you have just created and click Run.


Enable the profile


6.      Click the  Msg icon.

7.      Type the phone number of the addressee in the To: field.

8.      Compose and send a test message.


Send a message