轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
kannel

gmelitauri/kannel

gmelitauri

Kannel SMS Gateway - Technical Documentation

下载次数: 0状态:社区镜像维护者:gmelitauri仓库类型:镜像最近更新:5 个月前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。
点击查看

Kannel SMS Gateway - Technical Documentation

Project Overview

Containerized Kannel SMS Gateway deployed on Kubernetes for SMPP_USERedit Bank Georgia, providing SMS messaging capabilities through SMPP connections to smpp mobile operator.

Implementation Steps

Step 1: Create Bootstrap Script

Create bootstrap file for SQLBox compilation:

bash
#!/bin/sh
set -e
set -x

# Detect automake version
amver=$(automake --version | head -1 | awk '{print $NF}')
case "$amver" in
  ''|[0-1].[0-4]*) echo "$0: automake version 1.5 or later required"; exit 1 ;;
esac

# Detect libtoolize
if command -v glibtoolize >/dev/null 2>&1; then
  libtoolize="glibtoolize"
elif command -v libtoolize >/dev/null 2>&1; then
  libtoolize="libtoolize"
else
  echo "$0: libtoolize not found"
  exit 1
fi

# Clean old files
rm -f aclocal.m4 configure config.guess config.log config.sub config.cache \
      config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 \
      ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs \
      depcomp install-sh
rm -rf autom4te.cache
mkdir -p autotools

# Bootstrap
$libtoolize --copy --force
test -f ltmain.sh && mv ltmain.sh autotools/

aclocal -I autotools
autoconf
autoheader
automake --add-missing --copy

Step 2: Create Dockerfile

dockerfile
FROM ubuntu:latest

# Set noninteractive mode for apt
ENV DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

# Install dependencies
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get -y remove ntpdate && \
    apt-get install -y \
        build-essential subversion ntp nano wget cvs curl git unzip \
        autoconf automake libtool flex debhelper pkg-config libpam0g-dev \
        intltool checkinstall docbook docbook-xsl libpcre3 libpcre3-dev \
        libc6-dev g++ gcc autotools-dev bison libncurses5-dev m4 \
        tex-common texi2html texinfo libxml2-dev openssl libssl-dev \
        locales libmysqlclient-dev libmysql++-dev supervisor libtool-bin ca-certificates net-tools && \
    locale-gen en_US.UTF-8 && \
    mkdir -p /usr/local/src/kannel && \
    cd /usr/local/src/kannel && \
    svn checkout --non-interactive --trust-server-cert-failures=unknown-ca https://svn.kannel.org/gateway/trunk && \
    mv trunk gateway && \
    cd gateway && \
	libtoolize --force && \
	aclocal && \
    autoheader && \
	autoreconf --install --force && \
	automake --add-missing --copy && \
    ./configure --prefix=/usr/local/kannel \
                --with-mysql \
                --with-mysql-dir=/usr/lib/mysql/ \
                --enable-debug \
                --enable-assertions \
                --with-defaults=speed \
                --enable-localtime \
                --enable-start-stop-daemon \
                --enable-pam && \
    make && \
    make bindir=/usr/local/kannel install

# Copy bootstrap script into correct location
COPY bootstrap /usr/local/src/kannel/gateway/addons/sqlbox/bootstrap

# Set working directory explicitly before running bootstrap
WORKDIR /usr/local/src/kannel/gateway/addons/sqlbox

# Make it executable and run it
RUN chmod +x bootstrap && \
    ./bootstrap && \
    ./configure --prefix=/usr/local/kannel \
                --with-kannel-dir=/usr/local/kannel && \
    make && \
    make bindir=/usr/local/kannel/sqlbox install && \
    cd ../opensmppbox && \
    ./configure --prefix=/usr/local/kannel \
                --with-kannel-dir=/usr/local/kannel && \
    make && \
    make bindir=/usr/local/kannel/smppbox install && \
    mkdir -p /etc/kannel \
             /var/log/kannel/gateway \
             /var/log/kannel/smsbox \
             /var/log/kannel/wapbox \
             /var/log/kannel/smsc \
             /var/log/kannel/sqlbox \
             /var/log/kannel/smppbox \
             /var/spool/kannel && \
    chmod -R 755 /var/spool/kannel /var/log/kannel && \
    cp /usr/local/src/kannel/gateway/gw/smskannel.conf /etc/kannel/kannel.conf && \
    cp /usr/local/src/kannel/gateway/debian/kannel.default /etc/default/kannel && \
    cp /usr/local/src/kannel/gateway/addons/sqlbox/example/sqlbox.conf.example /etc/kannel/sqlbox.conf && \
    cp /usr/local/src/kannel/gateway/addons/opensmppbox/example/opensmppbox.conf.example /etc/kannel/opensmppbox.conf && \
    cp /usr/local/src/kannel/gateway/addons/opensmppbox/example/smpplogins.txt.example  /etc/kannel/smpplogins.txt && \
    rm -rf /usr/local/src/kannel/gateway && \
    apt-get clean

# Copy configuration files
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY kannel.conf /etc/kannel/kannel.conf
COPY opensmppbox.conf /etc/kannel/opensmppbox.conf

# Expose ports
EXPOSE 13000 13013 13015 2346

# Declare volumes
VOLUME ["/var/spool/kannel", "/etc/kannel", "/var/log/kannel"]

# Start supervisord
CMD ["/usr/bin/supervisord"]

Step 3: Create Kannel Configuration

kannel.conf:

conf
#
# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL
#
# This basic version is used for system testing. It expects 'fakesmsc' to
# send messages which are replied with simple fixed text message.
# It is run like this:
#
#  1% gw/bearerbox gw/smskannel.conf
#  2% gw/smsbox gw/smskannel.conf
#  3% test/fakesmsc -i 0.1 -m 100 "123 345 text nop"
#
# ..all 3 commands in separate shells (or screen sessions)
# Note that you can run them in different machines but have to
# add certain command line argument and configuration variables then
#
#
# For any modifications to this file, see Kannel User Guide 
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
#  1) check security issues! (allowed IPs, passwords and ports)
#  2) groups cannot have empty rows inside them!
#  3) read the user guide
#
# Kalle Marjola for Kannel project 2001, 2004

#---------------------------------------------
# CORE
#
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
# configuration variables like 'store-file' (or 'store-dir'),
# 'admin-allow-ip' and 'access.log'


group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
#status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
log-file = "/var/log/kannel/gateway/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
#unified-prefix = "+358,00358,0;+,00"
#access-log = "/tmp/access.log"
#store-file = "kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"

#---------------------------------------------
# SMSC CONNECTIONS
#
# SMSC connections are created in bearerbox and they handle SMSC specific
# protocol and message relying. You need these to actually receive and send
# messages to handset, but can use GSM modems as virtual SMSCs


# This is a fake smsc connection, _only_ used to test the system and services.
# It really cannot relay messages to actual handsets!

#group = smsc
#smsc = fake
#smsc-id = FAKE
#port = 20000
#connect-allow-ip = 127.0.0.1

include = "/etc/kannel/smsc.d/smpp1.conf"
include = "/etc/kannel/smsc.d/smpp2.conf"
include = "/etc/kannel/smsc.d/smpp3.conf"
include = "/etc/kannel/smsc.d/smpp4.conf"
include = "/etc/kannel/smsc.d/smpp5.conf"

#---------------------------------------------
# SMSBOX SETUP
#
# Smsbox(es) do higher-level SMS handling after they have been received from
# SMS centers by bearerbox, or before they are given to bearerbox for delivery

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = 13013
#sendsms-chars = "0123456789 +-"
log-file = "/var/log/kannel/smsbox/smsbox.log"
log-level = 0
#access-log = "/tmp/access.log"

#---------------------------------------------
# SEND-SMS USERS
#
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar...

group = sendsms-user
username = tester
password = foobar
concatenation = yes
max-messages = 16
#user-deny-ip = ""
#user-allow-ip = ""

#---------------------------------------------
# SERVICES
#
# These are 'responses' to sms PULL messages, i.e. messages arriving from
# handsets. The response is based on message content. Only one sms-service is
# applied, using the first one to match.

group = sms-service
keyword = nop
text = "You asked nothing and I did it!"

# There should be always a 'default' service. This service is used when no
# other 'sms-service' is applied.

group = sms-service
keyword = default
text = "No service specified"

Step 4: Create OpenSMPPBox Configuration

opensmppbox.conf:

conf
# sample opensmppbox.conf

group = core
dlr-storage = internal

# this group defines your opensmppbox
group = opensmppbox
# our boxc type
opensmppbox-id = abcd
# the port to listen on for smpp connections
opensmppbox-port = 2346
# we connect to the following host as a box
bearerbox-host = localhost
bearerbox-port = 13000
log-level = 0
log-file = /dev/stdout
our-system-id = chim1
route-to-smsc = fake # fake smsc in kannel.conf
# see sample smpplogins.txt
smpp-logins = "/etc/kannel/smpplogins.txt"

Step 5: Create Supervisor Configuration

supervisord.conf:

conf
[supervisord]
nodaemon=true

[program:bearerbox]
command=/usr/local/kannel/sbin/bearerbox -v 2 /etc/kannel/kannel.conf
redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
priority=1

[program:smsbox]
command=/usr/local/kannel/sbin/smsbox -v 2 /etc/kannel/kannel.conf
redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
priority=2

#[program:wapbox]
#command=/usr/local/kannel/sbin/wapbox -v 2 /etc/kannel/kannel.conf
#redirect_stderr=true
#stdout_logfile=/dev/fd/1
#stdout_logfile_maxbytes=0
#priority=2

#[program:sqlbox]
#command=/usr/local/kannel/sbin/sqlbox -v 2 /etc/kannel/kannel.conf
#redirect_stderr=true
#stdout_logfile=/dev/fd/1
#stdout_logfile_maxbytes=0
#priority=3

[program:smppbox]
command=/usr/local/kannel/sbin/opensmppbox -v 2 /etc/kannel/opensmppbox.conf
redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
priority=3

Step 6: Build and Push Docker Image

bash
# Build the Docker image
docker build -t gmelitauri/kannel:latest .

# Push to Docker Hub
docker push gmelitauri/kannel:latest

Step 7: Create Kubernetes Deployment

kannel-deployment.yaml:

yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: kannel-smsc-configs
  namespace: default
data:
  smpp1.conf: |
    group = smsc
    smsc = smpp
    smsc-id = smpp1
    host = SMPP_HOST
    port = 9090
    smsc-username = SMPP_USER
    smsc-password = SMPP_PASSW
    connect-allow-ip = 127.0.0.1
    system-type = smpp
    transceiver-mode = 1
    source-addr-ton = 0
    source-addr-npi = 1
    dest-addr-ton = 0
    dest-addr-npi = 1
    interface-version = 34
    throughput = 30
    max-pending-submits = 5
    esm-class = 0

  smpp2.conf: |
    group = smsc
    smsc = smpp
    smsc-id = smpp2
    host = SMPP_HOST
    port = 9090
    smsc-username = SMPP_USER
    smsc-password = SMPP_PASSW
    connect-allow-ip = 127.0.0.1
    system-type = smpp
    transceiver-mode = 1
    source-addr-ton = 0
    source-addr-npi = 1
    dest-addr-ton = 0
    dest-addr-npi = 1
    interface-version = 34
    throughput = 30
    max-pending-submits = 5
    esm-class = 0

  smpp3.conf: |
    group = smsc
    smsc = smpp
    smsc-id = smpp3
    host = SMPP_HOST
    port = 9090
    smsc-username = SMPP_USER
    smsc-password = SMPP_PASSW
    connect-allow-ip = 127.0.0.1
    system-type = smpp
    transceiver-mode = 1
    source-addr-ton = 0
    source-addr-npi = 1
    dest-addr-ton = 0
    dest-addr-npi = 1
    interface-version = 34
    throughput = 30
    max-pending-submits = 5
    esm-class = 0
	
  smpp4.conf: |
    group = smsc
    smsc = smpp
    smsc-id = smpp-international
    host = SMPP_HOST
    port = 9090
    smsc-username = SMPP_USER
    smsc-password = SMPP_PASSW
    connect-allow-ip = 127.0.0.1
    system-type = smpp
    transceiver-mode = 1
    source-addr-ton = 0
    source-addr-npi = 1
    dest-addr-ton = 0
    dest-addr-npi = 1
    interface-version = 34
    throughput = 30
    max-pending-submits = 5
    esm-class = 0

  smpp5.conf: |
    group = smsc
    smsc = smpp
    smsc-id = smpp-test
    host = SMPP_HOST
    port = 9092
    smsc-username = SMPP_USER
    smsc-password = SMPP_PASSW
    connect-allow-ip = 127.0.0.1
    system-type = smpp
    transceiver-mode = 1
    source-addr-ton = 0
    source-addr-npi = 1
    dest-addr-ton = 0
    dest-addr-npi = 1
    interface-version = 34
    throughput = 30
    max-pending-submits = 5
    esm-class = 0

---

apiVersion: v1
kind: Service
metadata:
  name: kannel
  namespace: default
spec:
  selector:
    app: kannel
  ports:
  - name: admin
    port: 13000
    targetPort: 13000
  - name: sendsms
    port: 13013
    targetPort: 13013
  - name: smpp
    port: 2346
    targetPort: 2346
    protocol: TCP

---


apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kannel
  namespace: default
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod-dns
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.tls: "true"
spec:
  ingressClassName: traefik-internal
  tls:
  - hosts:
    - kannel.yourdomain.xyz
    secretName: kannel-tls
  rules:
  - host: kannel.yourdomain.xyz
    http:
      paths:
      - path: /cgi-bin
        pathType: Prefix
        backend:
          service:
            name: kannel
            port:
              number: 13013
      - path: /
        pathType: Prefix
        backend:
          service:
            name: kannel
            port:
              number: 13000
			  
---			  


apiVersion: apps/v1
kind: Deployment
metadata:
  name: kannel
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kannel
  template:
    metadata:
      labels:
        app: kannel
    spec:
      containers:
      - name: kannel
        image: gmelitauri/kannel:latest
        ports:
        - containerPort: 13000
        - containerPort: 13013
        volumeMounts:
        - name: smsc-configs
          mountPath: /etc/kannel/smsc.d
      volumes:
      - name: smsc-configs
        configMap:
          name: kannel-smsc-configs


Step 8: Deploy to Kubernetes

bash
# Apply the Kubernetes manifest
kubectl apply -f kannel-deployment.yaml

# Verify deployment
kubectl get deployments -n default
kubectl get pods -n default
kubectl get services -n default
kubectl get ingress -n default

Project Structure

kannel-project/
├── bootstrap                    # Autotools setup script for SQLBox
├── Dockerfile                  # Container build file
├── kannel.conf                # Main Kannel configuration
├── opensmppbox.conf           # OpenSMPPBox configuration
├── supervisord.conf           # Process supervisor configuration
└── kannel-deployment.yaml     # Kubernetes deployment manifest

Access Points

  • Admin Interface: [***]
    • Username: admin
    • Password: bar
  • SMS Sending API: [***]
    • Username: tester
    • Password: foobar
  • SMPP Server: Port 2346 (if exposed externally)

SMSC Connections

SMSC IDHostPortUsernamePasswordPurpose
smpp1SMPP_HOST9090SMPP_USERSMPP_PASSWTest
smpp2SMPP_HOST9090SMPP_USERSMPP_PASSWProduction
smpp3SMPP_HOST9090SMPP_USERSMPP_PASSWProduction
smpp-internationalSMPP_HOST9090SMPP_USERSMPP_PASSWInternational
smpp-testSMPP_HOST9092SMPP_USERSMPP_PASSWAlternative Test

Monitoring

Check Status

bash
# Port forward to access admin interface
kubectl port-forward deployment/kannel 13000:13000

# Check status
curl http://localhost:13000/status?password=bar

View Logs

bash
# View all logs
kubectl logs deployment/kannel

# Follow logs
kubectl logs -f deployment/kannel

# View specific container process logs
kubectl exec deployment/kannel -- tail -f /var/log/kannel/gateway/kannel.log

Troubleshooting

Common Commands

bash
# Restart deployment
kubectl rollout restart deployment/kannel

# Check pod status
kubectl describe pod -l app=kannel

# Execute into container
kubectl exec -it deployment/kannel -- bash

# Update ConfigMap
kubectl edit configmap kannel-smsc-configs

Test SMS Sending

bash
curl "https://kannel.yourdomain.xyz/cgi-bin/sendsms?username=tester&password=foobar&to=995555123456&text=Test+message&smsc=smpp1"

Notes

  • Single replica deployment (*** scaling for HA)
  • Logs are output to stdout for container logging
  • TLS certificates managed by cert-manager
  • Traefik used as ingress controller
  • All SMSC passwords are stored in plain text (*** using Kubernetes Secrets)

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 kannel 镜像标签

docker pull docker.xuanyuan.run/gmelitauri/kannel:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull gmelitauri/kannel:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
gmelitauri/kannel
教程轩辕镜像功能与使用教程
定价查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 kannel 镜像推荐

bulktrade/kannel logo

bulktrade/kannel

bulktrade
Kannel的Docker容器化镜像,支持挂载自定义配置文件,可快速部署短信网关服务,适用于短信发送、接收及路由管理场景。
8 次收藏100万+ 次下载
9 年前更新
adanidey117/kannel logo

adanidey117/kannel

adanidey117
暂无描述
1万+ 次下载
3 年前更新
weniai/kannel logo

weniai/kannel

weniai
暂无描述
534 次下载
4 年前更新

查看更多 kannel 相关镜像