2012-09-28 39 views
0

我kannel.conf是:的Kannel不是將郵件轉發到URL

group = core 
admin-port = X 
smsbox-port = Y 
admin-password = Z 
log-file = "/usr/local/kannel/log/clientA/kannel.log" 
log-level = 0 
box-deny-ip = "*.*.*.*" 
box-allow-ip = "127.0.0.1" 
access-log = "/usr/local/kannel/log/clientA/Access.log" 
store-type = file 
store-file = "/usr/local/kannel/log/clientA/clientA.store" 

############################################################### 

group = smsc 
smsc = smpp 
smsc-id = clientA 
host =A.B.C.D 
port = 9081 
throughput = 2 
wait-ack = 600 
smsc-username = myuser 
smsc-password = mypass 
keepalive=30 
system-type = 
transceiver-mode = 1 
enquire-link-interval = 1200 
source-addr-ton = 0 
source-addr-npi = 1 
dest-addr-ton = 1 
dest-addr-npi = 1 
max-pending-submits = 3 

################################################################# 

group = smsbox 
smsbox-id = smsbox82 
bearerbox-host = localhost 
sendsms-port = portSend 
global-sender = XXXXXXX 
mo-recode = true 
log-file = "/usr/local/kannel/log/clientA/smsbox.log" 
log-level = 0 
access-log = "/usr/local/kannel/log/clientA/Access.log" 

################################################################### 
group = sendsms-user 
username = myu 
password = myp 
max-messages = 3 
concatenation = true 

################################################################## 

group = sms-service 
keyword = default 
get-url = "http://localhost:80/insdb.php?sender=%p&receiver=%r&smsid=%I" 

我的Apache在端口80和URL運行時,在DB分別稱爲插入的消息,然而,當消息被髮送到應用程序,它永遠不會到達DB,並且我在日誌中沒有看到任何錯誤解釋這一點。

任何想法我在哪裏失蹤?

感謝

+0

有人幫忙嗎? – Satya

回答

1

如果需要保存抵達的Kannel,比你需要添加短信服務組進入kannel.conf的所有短信,所以加是這樣的:

group = sms-service 
keyword = default 
get-url="http://127.0.0.1/save?sender=%p&text=%a&receiver=%P" 

這會導致對於所有收到的消息,將執行get-url,您的應用程序(apache等)應該能夠將消息詳細信息保存到數據庫。

您應該查看kannel文檔以瞭解關於可用佔位符的詳細信息,我只使用其中的一些(發送者,接收者,消息文本)。

BR, Izabel

相關問題