Instant messaging services

Link copied to clipboard

It is popular among users to install messengers (i.e., web applications like ICQ, WhatsApp, etc.) on either their mobile phones or computers and exchange messages via the Internet within the same network.

For instance, if a user has registered with WhatsApp, they can send free on-net messages (i.e., instant messages) to other WhatsApp users. This service is known as Instant messaging.

With PortaSwitch, you can enable your VoIP customers to use Instant messaging service by registering their SIP accounts with various messengers (that support the SIP protocol).

Moreover, you can develop a custom application to bundle voice calls and messaging services and then distribute the application among users of different networks (VoIP and mobile), and thereby expand your customer list.

This chapter demonstrates how to configure an Instant messaging service so that in addition to voice calling, your VoIP customers can send instant messages.

Checklist

Link copied to clipboard

Use this checklist 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.

Operation

Done

General configuration

Enable the Messaging Service on the Configuration server

Create the symbolic MSGN destination to be used for charging customers for exchanging instant messaging

Network configuration

Create a service policy (e.g., Instant messaging). It determines the use of SIP protocol for on-net messages and it is also 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 Messaging service assigned and the Routing option disabled!

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

Create an “Internal messaging via SIP” connection for your “internal” vendor (e.g., Internal vendor, the one you have created in the basic SIP service configuration for handling SIP on-net calls) used for “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 rate for the MSGN destination

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

Testing

Configure the messaging client (e.g., Linphone) and send an instant test message

Initial configuration of PortaBilling

Link copied to clipboard

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

Enable the messaging service

Link copied to clipboard
  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.

Add a special destination for instant messages

Link copied to clipboard

The special MSGN destination covers messages sent to an IP phone connected to PortaSwitch (regardless of the actual phone number). Adding a rate for this destination allows you a set a unified price for all on-net messages. Please consult the Special destinations chapter of the PortaSIP Administrator Guide.

  1. On the navigation menu, select Service catalog, Rate Codes and then Destinations.
  2. On the Create a destination panel, fill in the destination details:
    • Format – select Custom.
    • Prefix – type in MSGN.
    • Description – write a short description for the destination.

      Create special MSGN destination

  3. Click Save.

Create a service policy

Link copied to clipboard

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 service policy that is used for internal communications between PortaSIP and the billing engine regarding routing and transport protocol that is used for message delivery.

  1. On the navigation menu on the left, select Service catalog and click Service policies.
  2. On the Create service policy panel, fill in the service policy details:

    Create a service policy

    • Name – specify the name of the service policy (for example, Instant messaging).
    • Service type – select Messaging service from the list.
    • Recipient domain pattern – this is the pattern according to which the service policy is selected. Specify % in this field. This means that the service policy is applied to all outgoing messages sent by your end users.
  3. Click Save.

    Enable the attributes

  4. On the Service policy panel that opens, specify 5 in the Match priority field. Please refer to the PortaBilling Help for detailed description of this field.
  5. Go to the Attributes panel, select Processing messages over SIP/SMPP and enable the following attributes:
    • Transport protocol – select a checkbox and choose SIP from the list.
    • Outgoing AAA – select a checkbox and use a slider to enable outgoing message authorization and billing.
    • Local lookup – select a checkbox and use a slider to enable the lookup for destinations within the network.
    • Userpart E164 translation – select a checkbox and use a slider to enable dialing rules for a phone number translation.
  6. Click Save.
Note that it will take several minutes until the changes are propagated to PortaSIP and Radius server.

Create internal vendor tariff

Link copied to clipboard

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:

  1. On the navigation menu on the left, select Service catalog and click Tariffs.
  2. On the Create tariff panel, fill in the tariff details:

    Create a vendor tariff

    • Name – type a short name for the tariff object; this is the name you will see in the select menus (for example, Instant messaging).
    • Currency – choose the currency in which the vendor charges you.
      The currency for the tariff may be chosen only once, and cannot be changed later.
    • Service – choose Messaging service here.
    • Applied to – choose Vendor in the Applied to list.
    • Routing – leave the Routing option disabled for this tariff.
  3. Click Save.

Enter rates for internal vendor tariff

Link copied to clipboard
  1. On the vendor tariff’s panel (Instant messaging), click Rates.
  2. On the Add rate panel, fill in the rate details:
    • Rate сode – type in ‘|’ (pipe) in the field. This will create a special rate that matches any number the message is sent to.
    • Rating mode – select Flat rate here.
    • Unit price – set zero as the price since there are no actual costs for on-net instant messages.
    • Leave the other fields in the form as they are.

      Enter rates

  3. Click Save.

Define a connection for the internal vendor

Link copied to clipboard

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

  1. On the navigation menu, select Infrastructure, then select Vendors.
  2. On the Search vendor panel, type the vendor name and click Apply filters.
  3. On the Results panel click the vendor name.

    Add a vendor

  4. On the Vendor panel, click Connections.
  5. On the Create connection panel, fill in the connection details:
    • Description – type a descriptive name for this connection. It will be displayed in the list of connections (e.g., Instant messaging).
    • Service type – select Messaging service.
    • Type of connections – select SIP/SIMPLE.
    • Tariff – select the tariff that you have created before (e.g., Instant messaging.)
    • Internal – use the slider to set this connection as internal.
    • Use for – leave the Route to internally registered SIP accounts (SIP-UA) option.
  6. Click Save.

    Create connection

Create a customer tariff

Link copied to clipboard
  1. On the navigation menu on the left, select Service catalog and click Tariffs.
  2. On the Create tariff panel, fill in the tariff details:

    Create a customer tariff

    • Name – type a short name for the tariff object; this is the name you will see in the select menus (for example, On-net messaging.)
    • Currency – choose the currency in which you charge your customers.
      The currency for the tariff may be chosen only once, and cannot be changed later.
    • Service – select Messaging service here.
    • Applied to – select Customer.
    • Managed by – leave Administrator only.
  3. Click Save.

Enter rates to the customer tariff

Link copied to clipboard
  1. On the customer tariff’s panel (e.g., On-net messaging), click Rates.
  2. On the Add rate panel, fill in the rate details:
    • Rate сode – select MSGN.
      A destination prefix may be entered directly or you can start typing the destination and then select it from the list.
    • Rating mode – select Flat rate here.
    • Unit price – specify the price per message or put a zero if you provide instant messaging services free of charge.
    • Leave the other fields in the form as they are.

      Enter rates to the customer tariff

  3. Click Save.

Modify included services and usage charges for a product

Link copied to clipboard

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. On the navigation menu on the left, select Service catalog and click Products.
  2. Select the product that you wish to modify.
  3. On the Product panel, click Services and then Add a service.
  4. Select the Messaging service and click Add.

    Add the Messaging service

  5. On the Product panel, click Charges, Usage charges and then 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 (e.g., On-net messages).

      Usage charges

  6. Click Save.
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.

Testing

Link copied to clipboard

Configure the messenger client. As an example, we use Linphone.

Download Linphone and perform its configuration.

  1. On the main page, select Use SIP account:

    image016

  2. Fill in the Assistant form.
  3. The most important fields are:
    • Username – specify your account ID here.
    • Password – specify the service password in this field.
    • Domain – specify the VIP of your PortaSIP cluster.
    • Display name – specify your name. This is a display name that will be shown to the party you call or send messages to.
    • Transport – select UDP.

      image018

  4. Click Login.
  5. Select Chat and Add Conversation.

    image020

  6. Enter the number and send a message.

    image022

Note that with PortaSwitch you can use the following Windows clients for instant messaging service:

On this page

Release
What's new
Admin manuals
Handbooks
Developers documentation
UI help