Kannel
Learn how to use the Kannel sms provider to send sms notifications using Novu
Before integrating Kannel with Novu, you should have Kannel set up and configured as an SMS gateway on your server. Let’s look at how you can do that:
Setting up Kannel
-
First, you need to install Kannel on your server. You can download it from the official-website or use a package manager specific to your operating system (e.g., apt- get for Ubuntu, yum for CentOS, etc.).
-
Kannel’s configuration is done through a file called kannel.conf. You need to edit this file to specify your SMS provider settings. Here’s a basic configuration example:
group = smsc smsc = smpp smsc-id = YourSMSCID host = SMSC_Hostname_or_IP port = SMSC_Port system-type = SMSC_System_Type smsc-username = YourUsername smsc-password = YourPassword max-pending-submits = 10 allow-ip = "127.0.0.1"
Replace the placeholders (e.g., YourSMSCID, SMSC_Hostname_or_IP, SMSC_Port, SMSC_System_Type, YourUsername, and YourPassword) with the actual values provided by your SMS provider.
-
You can define services that will handle incoming and outgoing SMS messages. These services specify how Kannel should process SMS requests. Here’s an example of an SMS service configuration:
group = sendsms-user username = YourUsername password = YourPassword concatenation = true max-messages = 3
Adjust the settings to your needs.
-
Start Kannel with the following command:
bearerbox /path/to/kannel.conf
Make sure to replace /path/to/kannel.conf with the actual path to your Kannel configuration file.
Creating a Kannel integration with Novu
After setting up your Kannel, follow these steps to integrate with novu:
-
Visit the Integrations Store on Novu.
-
Click the “Add a provider” button.
-
Select Kannel service.
-
Choose your preferred deployment environment:
Development
orProduction
. Then Click theCreate
button. -
Once the integration is active, you’ll need to configure it. This configuration usually involves providing the necessary details for Novu to connect to your Kannel SMS gateway. These details typically include:
- Kannel Gateway URL or IP Address: If your Kannel SMS gateway is hosted on your server, you should use the server’s IP address or hostname.
- Port: The port number through which Novu should communicate with Kannel (usually 13013, or a custom port you’ve configured in Kannel).
- Username and Password: If you’ve set up authentication for your Kannel SMS gateway, provide the username and password required for authentication:
group = smsc smsc = smpp smsc-id = YourSMSCID host = SMSC_Hostname_or_IP port = SMSC_Port smsc-username = YourUsername smsc-password = YourPassword max-pending-submits = 10 allow-ip = "127.0.0.1"
In this example, YourUsername and YourPassword are the credentials you’d use for authentication.
-
Fill in the
From
field. -
Click on the
Update
button. -
You should now be able to send notifications using Kannel in Novu.
Was this page helpful?