External voicemail integration

The Quobis communication platform supports the integration with external SIP-based voice mail servers. It has the ability to connect to a external voicemail system and show that messages are waiting and the number of them. This functionality is commonly referrered in telephone networks as Message Waiting Indication and is usually implemented in IP phones (lighting a light or other indicator on the phone, displaying icons or text, or some combination of them).

For this functionality to take place, it’s required that the voicemail system supports the SIP message protocol and specifically the SIP SUBSCRIBE methods as described in the RFC 3842 (https://tools.ietf.org/html/rfc3842). In summary, the Quobis wac will act a SIP User Agent and send SIP SUBSCRIBE message to the PBX or SIP Server, which will answer in turn with SIP NOTIFY messages describing the number of messages pending as show in the SIP trace below:

../_images/voicemail_trace.png

Enabling services

The first thing to do is to enable and configure the services on which this functionality depends, in case they are not already configured by default.

Message Waiting Indicator service (MWI)

The activation of the voicemail functionality relies on a this new service named messagewaitingindicator. This service requires two configuration parameters: baseUrl (the URL where the register and unregister HTTP requests should be sent) and kamailioRabbitTopic (RabbitMQ topic where the voiceMail events will be published). The following lines must be added to the wac.ini config file in order to run this service:

1 [messagewaitingindicator]
2 baseUrl = "http://kamailio:8080"
3 kamailioRabbitTopic = "kamailio"

Permissions service

In addition to the MWI service, the permissions service also must be running to enable or disable voicemail on domain and/or users. To do so, the following line must be added to wac.ini config file:

1 [permissions]

Extension settings

Next, you need to configure the phone extension that will be associated to the external voicemail. To do this, just modify the QSS configuration file config.json in the invites section, as indicated in the following lines:

1 {
2     "service": {
3         //other services
4         "invites": {
5             //other param configs
6             "voiceMailExtension": "XXX"
7         }
8     }
9 }

Where XXX represents the phone extension that you want to assign to the voicemail. This extension will be reachable as “xxx@domain”, and calls made to that extension will be routed to the voicemail.

Note

Please take into account that the voicemail extension number is a system-wide parameter (per-domain configuration is not available in the current version)

Permission assignment

The next step is to assign the necessary permissions to start using voicemail, which by default is disabled. This configuration is done through requests to the REST API.

User

You can activate the voicemail to specific users.

To do so, launch the POST request Add User Permission, that you can find in the WAC Permissions collection, followed by the user id you want to modify. In the Body you must modify the values of the parameters according to your needs.

Example:

1 curl --location --request POST 'https://web.sippo/sapi/permissions/user/{id}' \
2 --header 'Authorization: Bearer {bearerToken}' \
3 --header 'Content-Type: application/json' \
4 --data-raw '{
5     "voicemail": {
6         "enabled": true
7     }
8 }'

Once sent, and if everything has worked correctly, you should receive as a response: 201 Created. In this case, they system will show the following log messages:

1 [/wac/lib/core/WIface.js] silly: HTTP POST /sapi/permissions/user/5f9175bbf26dc8ba3a44f35d
2 [/wac/lib/services/OAuth2Provider/PassportStrategies.js] debug: token strategy, ...40924497
3 [@quobis/db/lib/Storage.js] silly: search elements of collection oa_tokens with query, x.token == 3a0b39529a6057204dd6922e548bf3503ce0b7307a7513ad49c873a3864ce3f2b5c1ddc1f5d8e6a29ad63aa2212bc0079ebe136b7abf6ef7499daa3940924497
4 [/wac/lib/core/Auth.js] silly: deserialize user with id 5ddcdb74bd53a58144f85915
5 [@quobis/db/lib/Storage.js] silly: search elements of collection user with query, ((x.id == 5ddcdb74bd53a58144f85915))
6 [/wac/lib/core/Auth.js] silly: Authenticate success admin@quobis, [object Object]
7 [/wac/lib/services/Permissions/resources/ResourcePermissionsRestApi.js] silly: Received an add permissions request
8 [@quobis/db/lib/Storage.js] silly: search elements of collection user with query, (x.id == 5f9175bbf26dc8ba3a44f35d)

Domain

You can activate voicemail at a domain level.

To do so use the POST request Add Domain Permission, that you can find in the WAC Permissions collection, followed by the domain id you want to modify. In the Body you must modify the values of the parameters according to your needs.

Example:

1 curl --location --request POST 'https://web.sippo/sapi/permissions/domain/{id}' \
2 --header 'Authorization: Bearer {bearerToken}' \
3 --header 'Content-Type: application/json' \
4 --data-raw '{
5     "voicemail": {
6         "enabled": true
7     }
8 }'

Once sent, and if everything has worked correctly, you should receive as a response: 201 Created. In this case, the system will log the following messages:

1 [/wac/lib/core/WIface.js] silly: HTTP POST /sapi/permissions/domain/5ddcdb74bd53a58917f85914
2 [/wac/lib/services/OAuth2Provider/PassportStrategies.js] debug: token strategy, ...40924497
3 [@quobis/db/lib/Storage.js] silly: search elements of collection oa_tokens with query, x.token == 3a0b39529a6057204dd6922e548bf3503ce0b7307a7513ad49c873a3864ce3f2b5c1ddc1f5d8e6a29ad63aa2212bc0079ebe136b7abf6ef7499daa3940924497
4 [/wac/lib/core/Auth.js] silly: deserialize user with id 5ddcdb74bd53a58144f85915
5 [@quobis/db/lib/Storage.js] silly: search elements of collection user with query, ((x.id == 5ddcdb74bd53a58144f85915))
6 [/wac/lib/core/Auth.js] silly: Authenticate success admin@quobis, [object Object]
7 [/wac/lib/services/Permissions/resources/ResourcePermissionsRestApi.js] silly: Received an add permissions request
8 [@quobis/db/lib/Storage.js] silly: search elements of collection domain with query, (x.id == 5ddcdb74bd53a58917f85914)