kannel - 短信不通过huawei e173发送

时间:2014-01-01 09:38:36

标签: sms send sms-gateway kannel

我是kannel的新手,我已配置并尝试测试 但是短信没有提供。

smskannel.conf

group = core
admin-port = 13003
smsbox-port = 13004
admin-password = bar
log-file = /usr/local/log/kannel.log
access-log = /usr/local/log/access.log

group = modems
id = huawei_e173
name = "Huawei E173"
detect-string = "huawei"
init-string = "AT+CFUN=1" 
init-string= “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0″
init-string = “AT+CNMI=3,2,0,0,0″
init-string = “AT+CMEE=2;+CNMI=3,1,0,0,0″
reset-string = “ATZ”
speed=115200
need-sleep = true
keepalive-cmd = “AT+CBC;+CSQ”
enable-mms = true
message-storage=”SM”

group = smsc
smsc = at
smsc-id = Huawei
modemtype = auto
device=/dev/ttyUSB0
my-number = 00923348648921
sms-center= 00923330005150
connect-allow-ip = localhost
log-level = 0

group = smsbox-route
smsbox-id = ab

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
log-file = /tmp/smsbox.log
log-level = 0
access-log = /tmp/access.log

测试短信

http://localhost:13013/cgi-bin/sendsms?username=DineshKumaraJayasinghe&password=foobar&to=+94715487593&text=thisisatestmessage

SmsBox日志

2014-01-01 14:42:06 [18837] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
2014-01-01 14:42:06 [18837] [2] DEBUG: HTTP: Created HTTPClient area 0x7f5078000a80.
2014-01-01 14:42:06 [18837] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1>
2014-01-01 14:42:06 [18837] [3] INFO: sendsms used by <DineshKumaraJayasinghe>
2014-01-01 14:42:06 [18837] [3] INFO: sendsms sender:<DineshKumaraJayasinghe:13013> (127.0.0.1) to:<0719237093> msg:<thisisatestmessage>
2014-01-01 14:42:06 [18837] [3] DEBUG: Stored UUID f386a11d-ea51-41c2-b391-f419de3bca4a
2014-01-01 14:42:06 [18837] [3] DEBUG: message length 18, sending 1 messages
2014-01-01 14:42:06 [18837] [3] DEBUG: Status: 202 Answer: <Sent.>
2014-01-01 14:42:06 [18837] [3] DEBUG: Delayed reply - wait for bearerbox
2014-01-01 14:42:06 [18837] [0] DEBUG: Got ACK (3) of f386a11d-ea51-41c2-b391-f419de3bca4a
2014-01-01 14:42:06 [18837] [0] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1'.

Bearerbox.log

2014-01-01 14:42:01 [18826] [6] DEBUG: AT2[Huawei]: detecting modem type
2014-01-01 14:42:01 [18826] [6] INFO: AT2[Huawei]: opening device
2014-01-01 14:42:01 [18826] [6] WARNING: AT2[Huawei]: trying to open device with not closed device!!! Please report!!!
2014-01-01 14:42:01 [18826] [6] INFO: AT2[Huawei]: closing device
2014-01-01 14:42:01 [18826] [6] DEBUG: AT2[Huawei]: device opened
2014-01-01 14:42:02 [18826] [6] DEBUG: AT2[Huawei]: device opened
2014-01-01 14:42:02 [18826] [6] INFO: AT2[Huawei]: speed set to 115200
2014-01-01 14:42:02 [18826] [6] DEBUG: AT2[Huawei]: --> ^M
2014-01-01 14:42:04 [18826] [6] DEBUG: AT2[Huawei]: --> AT^M
2014-01-01 14:42:06 [18826] [8] DEBUG: boxc_receiver: sms received
2014-01-01 14:42:06 [18826] [8] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2014-01-01 14:42:06 [18826] [7] DEBUG: sms_router: handling message (0x7fb268001770 vs 0x7fb268001770)
2014-01-01 14:42:06 [18826] [7] DEBUG: sms_router: handling message (0x7fb268001770 vs 0x7fb268001770)
2014-01-01 14:42:06 [18826] [7] DEBUG: sms_router: time to sleep 30.00 secs.
2014-01-01 14:42:08 [18826] [6] DEBUG: AT2[Huawei]: --> AT&F^M
2014-01-01 14:42:12 [18826] [6] DEBUG: AT2[Huawei]: detecting modem type
2014-01-01 14:42:12 [18826] [6] INFO: AT2[Huawei]: opening device
2014-01-01 14:42:12 [18826] [6] WARNING: AT2[Huawei]: trying to open device with not closed device!!! Please report!!!
2014-01-01 14:42:12 [18826] [6] INFO: AT2[Huawei]: closing device
2014-01-01 14:42:12 [18826] [6] DEBUG: AT2[Huawei]: device opened
2014-01-01 14:42:13 [18826] [6] DEBUG: AT2[Huawei]: device opened
2014-01-01 14:42:13 [18826] [6] INFO: AT2[Huawei]: speed set to 115200
2014-01-01 14:42:13 [18826] [6] DEBUG: AT2[Huawei]: --> ^M
2014-01-01 14:42:15 [18826] [6] DEBUG: AT2[Huawei]: --> AT^M
2014-01-01 14:42:19 [18826] [6] DEBUG: AT2[Huawei]: --> AT&F^M
2014-01-01 14:42:20 [18826] [6] DEBUG: AT2[Huawei]: <-- +CIND: 5,0,0,0,0,1,0,0
2014-01-01 14:42:20 [18826] [6] DEBUG: AT2[Huawei]: <-- OK
2014-01-01 14:42:20 [18826] [6] DEBUG: AT2[Huawei]: --> ATE0^M
2014-01-01 14:42:24 [18826] [6] DEBUG: AT2[Huawei]: detecting modem type
2014-01-01 14:42:24 [18826] [6] INFO: AT2[Huawei]: opening device
2014-01-01 14:42:24 [18826] [6] WARNING: AT2[Huawei]: trying to open device with not closed device!!! Please report!!!
2014-01-01 14:42:24 [18826] [6] INFO: AT2[Huawei]: closing device
2014-01-01 14:42:24 [18826] [6] DEBUG: AT2[Huawei]: device opened
2014-01-01 14:42:25 [18826] [6] DEBUG: AT2[Huawei]: device opened
2014-01-01 14:42:25 [18826] [6] INFO: AT2[Huawei]: speed set to 115200

我的日志文件似乎短信也发送到smsbox和bearerebox。 但测试短信没有收到我的手机

1 个答案:

答案 0 :(得分:1)

尝试在配置文件中将localhost替换为127.0.0.1并设置 modemtype = HUAWEI