gpt4 book ai didi

sms - 通过 SMPP 发送短信

转载 作者:行者123 更新时间:2023-12-04 17:28:29 24 4
gpt4 key购买 nike

如何通过 SMPP 直接发送 SMS?我的提供商提供了一个 SMPP 接口(interface)来发送 SMS,我如何将其连接到它?有没有可以教我使用 SMPP 发送的库或示例?也许使用 PHP?还是 C#?

最佳答案

我将 Kannel 用于 SMPP,将 kannel 连接到 smpp 服务器:link .

这是我的 kannel.conf:

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "/var/log/kannel/smsaccess.log"

#SMSC CONNECTION
group=smsc
smsc=smpp
smsc-id=ID1
host=130.1.1.50
port=5016
transceiver-mode = 1
source-addr-ton = 1
source-addr-autodetect = 0
dest-addr-npi = 1
dest-addr-ton = 1
smsc-username = "user"
smsc-password= "pass"
system-type= "system"

#SMSBOX SETUP
group = smsbox
bearerbox-host = 127.0.0.1
bearerbox-port = 13001
sendsms-port = 13013
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/smsaccess.log"

#SEND-SMS USERS
group = sendsms-user
username = user
password = pass

#SERVICES
group = sms-service
keyword = default
text = "Su mensaje ha sido procesado"
concatenation = true
catch-all = true
accept-x-kannel-headers = true
get-url = "http://localhost/kannel/receivesms.php?sender=%p&text=%b"

发送短信:
curl "http://localhost:13013/cgi-bin/sendsms?user=xxxxxx&pass=yyyyy&to=56976808016&text=tes"

关于sms - 通过 SMPP 发送短信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2430124/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com