使用Kannel和SMSC模拟器发送和接收SMS

时间:2012-02-24 18:00:52

标签: smpp kannel

我正在开发一个项目使用Kannel发送/接收短信,到目前为止,我们被告知阅读有关Kannel的文档并进行模拟。我能够使用Opensmpp发送短信,但我收到短信给我的Kannel以便处理它。如果有任何机会与OpenSmpp这样做请告诉我,因为我被困在这里。如果没有,你能不能把我推荐给另一个可以给我这种可能性的SMSC模拟器。 提前谢谢你

2 个答案:

答案 0 :(得分:7)

我强烈建议使用Selenium Software的SMPPSIM作为SMSC模拟器。上次我从here得到它。它需要Java,但如果我没记错的话,OpenSMPP也是如此。一旦启动并运行,您就可以连接到它的Web Interface端口,该端口允许您注入将发送到连接的客户端的消息。它还允许ESME到ESME模式,基本上发送回你发送的所有内容。

答案 1 :(得分:7)

感谢您的回答。我使用SMPPSIm并且效果很好。我希望我的配置可以帮助某人。 Kannel.conf:

#kannel.conf
group = core
admin-port = 13000
smsbox-port = 14000
admin-password = saad
log-file = /home/saad/klogs/kannel.log
log-level = 0
access-log = /home/saad/klogs/access_kannel.log
dlr-storage = pgsql

#--- postgresql connection
group = pgsql-connection
id = mydlr
host = 127.0.0.1
port = 5432
username = saad
password = ****
database = kannelDb
max-connections = 1

#---- DLR table structure
group = dlr-db
id = mydlr
table = "kannel_dlr"
field-smsc = smsc
field-timestamp = timstamp
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc_id

group = smsbox
#smsbox-id = mysmsbox  do not uncomment this if you have only one smsbox
bearerbox-host = localhost
sendsms-port = 1025
#global-sender = 1000
log-file = /home/saad/klogs/smsbox.log
log-level = 0
mo-recode = true

group = smsc
smsc = smpp
smsc-id = SMPPSim
host = 127.0.0.1
port = 2775
transceiver-mode = 1
receive-port = 2775
smsc-username = smppclient1
smsc-password = password
system-type = 'VMA'
#service-type = 'test'
interface-version = 34
#system-id = smppclient
preferred-smsc-id = SMPPSim

group = sendsms-user
username = saad
password = ****
#forced-smsc = SMPPSim
default-sender = '1000'


group = sms-service
keyword = default
accept-x-kannel-headers = true
#text = "No service specified"
catch-all = true
max-messages = 0 # it's better to put this parameter to 0 or you will have a lot Ack in      your network
get-url = "http://localhost/kannel/?phone=%p&text=%a"