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
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 |
|
Create |
|
Network configuration |
|
Create |
|
Rating configuration |
|
Create |
|
In |
|
Create |
|
Rating configuration |
|
Create |
|
In |
|
Modify a product for end users: |
|
Include the Messaging |
|
Testing |
|
Configure |
Initial configuration of PortaBilling
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
- Clone
the existing configuration. - Select
BillingEngine on the Configuration Tree. Enable the Messaging
Service in the ServiceTypes group. - Click
the Save button and then the Verify
button. - Verify
the new configuration and click the Check/Apply button.
Add a special destination for instant messages
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.
- On
the navigation menu, select Service catalog, Rate Codes
and then Destinations. - On
the Create a destination panel, fill in the destination details: - Click
Save.
Create a 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 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.
- On
the navigation menu on the left, select Service catalog and click
Service policies. - On
the Create service policy panel, fill in the service policy details:- 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.
- Name
- Click
Save. - 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. - 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.
- Transport
- Click
Save.
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:
- On
the navigation menu on the left, select Service catalog and click
Tariffs. - On
the Create tariff panel, fill in the tariff details:- 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.
- Name
- Click Save.
Enter rates for internal vendor tariff
- On
the vendor tariff’s panel (Instant messaging), click Rates. - 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.
- Rate
- Click
Save.
Define a connection for the internal vendor
In this step, you will add a new connection to the
internal vendor.
- On
the navigation menu, select Infrastructure, then select Vendors. - On
the Search vendor panel, type the vendor name and click Apply
filters. - On
the Results panel click the vendor name. - On
the Vendor panel, click Connections. - 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.
- Description – type a descriptive name for this connection. It will be displayed in
- Click
Save.
Create a customer tariff
- On
the navigation menu on the left, select Service catalog and click
Tariffs. - On
the Create tariff panel, fill in the tariff details:- 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.
- Name
- Click
Save.
Enter rates to the customer tariff
- On
the customer tariff’s panel (e.g., On-net messaging), click Rates. - 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.
- Rate
- Click
Save.
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.
- On
the navigation menu on the left, select Service catalog and click
Products. - Select
the product that you wish to modify. - On
the Product panel, click Services and then Add a service. - Select
the Messaging service and click Add. - On
the Product panel, click Charges, Usage charges and
then click Add: - Click
Save.
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
Configure the messenger client. As an example, we
use Linphone.
Download Linphone and perform its configuration.
- On
the main page, select Use SIP account: - Fill
in the Assistant form. - The
most important fields are: - Click Login.
- Select
Chat and Add Conversation. - Enter
the number and send a message.
Note that with PortaSwitch you can use the following
Windows clients for instant messaging service:
- Linphone
(https://www.linphone.org/releases/windows/app/Linphone-4.2.2-win32.exe) - Jitsi
(https://github.com/jitsi/jitsi/releases/download/Jitsi-2.10/jitsi-2.10.5550-x64.exe) - Ekiga
(https://download.gnome.org/binaries/win32/ekiga/4.0/ekiga-setup-4.0.1+.exe)