(Sorry for the late reply everyone...been busy with non-kannel
related commitments...)

"my_kannel" is an HTTP SMSC module derived from the "kannel" HTTP
SMSC.  Look at:

http://www.mail-archive.com/[email protected]/msg04106.html

CosmoStation's situation (and BTW, it would be really nice to have
real names instead of nicknames in the "full name" section of a
To: line...) most likely is due to 3 factors:
  1) More than one SMSC routing path for an SMS.
  2) An allowed-smsc-id declaration restricting access to the SMSC.
  3) The different ways the smsbox handles MT SMS as a reply to
     an MO SMS (an exec/file/text opposed to get-url/post-url/post-xml)..

What is happening is that the smsbox generates an MT reply SMS
for the sms-services defined as exec, file, and text. But, smsbox
does not add the smsc-id to the SMS Msg structure used internally
by Kannel to represent an SMS.

This behavior differs from the get-url, post-url, post-xml in
that all three of the above will include the smsc-id in the
SMS Msg structure that will be passed to the bearerbox.

Because you have an allowed-smsc-id declaration for each of your
SMSCs, the bearerbox could not find a suitable SMSC delivery agent
for the MT reply SMS generated from "text"-based sms-services.
Since the smsc-id in the SMS Msg structure was NULL for the
"text"-based sms-services, it did not match any of the smsc-ids
listed in any of your allowed-smsc-id declarations for the SMSCs.
That is why you go the "Cannot find SMSCConn for message to ..."
warning and subsequent "No SMSCes to receive message..." warning
in your bearerbox logs.

But, the sms-service that used a get-url did include an smsc-id
into the SMS Msg structure. As a result, it successfully passed
the evaluation in the gateway/gw/smscconn.c:smscconn_usable()
function and the message was delivered.

Is this a bug? Only if you have the same three factors again. If
the bearerbox only had one SMSC connection, then this would not
be a problem since:
  1) You would not need smsc-ids.
  2) You would not assign an ACL via an allowed-smsc-id declaration.

I'll post a enquire over on the [email protected] group about this
issue.

For a quick solution without changing the code and still allowing
for the use of allowed-smsc-id for access restrictions:
  - only use get-url, post-url, or post-xml for all your sms-services.

If you want to fix the code, then look on the [email protected]
mailing list or the Mantis bugtracking system (http://bugs.kannel.org)
on Friday for the patch.

See ya...

d.c.

**>From: "Rodrigo A. Cremaschi" <[EMAIL PROTECTED]>
**>To: "CosmoStation" <[EMAIL PROTECTED]>, <[email protected]>
**>Subject: Re: problem with multiple SMSC
**>Date: Thu, 24 Feb 2005 09:52:13 -0300
**>
**>Hi there,
**>
**>Why are you setting "system-type = my_kannel" ?
**>
**>"system-type" should be 'kannel', 'brunet', 'xidris' or 'wapme'.

**>----- Original Message ----- 
**>From: "CosmoStation" <[EMAIL PROTECTED]>
**>To: <[email protected]>
**>Sent: Thursday, February 24, 2005 8:07 AM
**>Subject: problem with multiple SMSC
**>
**>
**>> When I use only one SMSC everything is ok.
**>> When I use multiple SMSCs there is a serious problem. It seems that
**>> only one service is routed properly and the others (including the
**>> default/catchall) are not routed to provide MT smses.
**>> The sms-service with keyword "HOR" functions properly, but the other do
**>not.
**>>
**>>
**>> I tried allow-smsc-id and deny-smsc-id variables in the "group = smsc"
**>> but neither worked as I was exepted.
**>>
**>> Here is an abstract from the access.log file:
**>>
**>> 2005-02-24 12:55:10 Log begins
**>> 2005-02-24 12:55:21 Receive SMS [SMSC:car2] [SVC:] [ACT:] [BINF:] 
[from:306944111111] [to:4541] [flags:0:0:0:-1:-1] [msg:7:hor rak] [udh:0:]
**>> 2005-02-24 12:55:21 Sent SMS [SMSC:car2] [SVC:hor] [ACT:] [BINF:] 
[from:4541] [to:306944111111] [flags:-1:0:-1:-1:-1] [msg:160:Imatemnogo 
shansove da izpyknete i da lansirate ideite si. Shte imatevyzmozhnostta da 
obshtuvate s obichani ot vas hora. Intuicijata vishte vi pomogne da nam] 
[udh:0:]
**>> 2005-02-24 12:55:21 Sent SMS [SMSC:car2] [SVC:hor] [ACT:] [BINF:] 
[from:4541] [to:306944111111] [flags:-1:0:-1:-1:-1] [msg:77:eritereshenija na 
problemite, koito vi pritesnjavat. AEGEAN MEDIA HOROSCOPES] [udh:0:]

**>> 2005-02-24 12:55:31 Receive SMS [SMSC:car1] [SVC:] [ACT:] [BINF:] 
[from:306977666666] [to:3300] [flags:0:0:0:-1:-1] [msg:8:hor deva] [udh:0:]
**>> 2005-02-24 12:55:31 Sent SMS [SMSC:car1] [SVC:hor] [ACT:] [BINF:] 
[from:3300] [to:306977666666] [flags:-1:0:-1:-1:-1] [msg:160:Obstojatelstvata, 
koito se syzdavat v zhivota vi, vi pomagat da si izjasnite dosta neshta. 
Vecherta posvetete na zabavlenija v kompanijata na prijatelite si, no] [udh:0:]
**>> 2005-02-24 12:55:31 Sent SMS [SMSC:car1] [SVC:hor] [ACT:] [BINF:] 
[from:3300] [to:306977666666] [flags:-1:0:-1:-1:-1] [msg:67: bydete sdyrzhani 
vyv finansovo otnoshenie. AEGEAN MEDIA HOROSCOPES] [udh:0:]

**>> 2005-02-24 12:55:48 Receive SMS [SMSC:car1] [SVC:] [ACT:] [BINF:] 
[from:306977666666] [to:3300] [flags:0:0:0:-1:-1] [msg:4:lala] [udh:0:]
**>> 2005-02-24 12:56:14 Receive SMS [SMSC:car2] [SVC:] [ACT:] [BINF:] 
[from:306944111111] [to:4541] [flags:0:0:0:-1:-1] [msg:4:koko] [udh:0:]
**>> 2005-02-24 12:57:04 Receive SMS [SMSC:car2] [SVC:] [ACT:] [BINF:] 
[from:306944111111] [to:4541] [flags:0:0:0:-1:-1] [msg:4:help] [udh:0:]
**>> 2005-02-24 12:57:11 Receive SMS [SMSC:car1] [SVC:] [ACT:] [BINF:] 
[from:306977666666] [to:3300] [flags:0:0:0:-1:-1] [msg:4:help] [udh:0:]
**>>
**>>
**>>
**>> Here is my config file:
**>>
**>> #
**>> group = core
**>> admin-port = 18000
**>> smsbox-port = 18001
**>> admin-password = foo
**>> admin-deny-ip = "*.*.*.*"
**>> admin-allow-ip = "127.0.0.1;10.35.2.102"
**>> log-file = "/tmp/kannel/kannel.log"
**>> box-deny-ip = "*.*.*.*"
**>> box-allow-ip = "127.0.0.1;10.35.2.102"
**>> access-log = "/tmp/kannel/access.log"
**>> store-file = "/tmp/kannel/kannel.store"
**>>
**>> group = smsc
**>> smsc = http
**>> smsc-id = car1
**>> system-type = my_kannel
**>> port = 15555
**>> smsc-username = "ignored"
**>> smsc-password = "ignored"
**>> no-sender = false
**>> no-coding = false
**>> send-url = "http://10.35.2.102/astro/send2.php";
**>> connect-allow-ip = "127.0.0.1;10.35.2.102"
**>> allowed-smsc-id = "car1"
**>>
**>> group = smsc
**>> smsc = http
**>> smsc-id = car2
**>> system-type = my_kannel
**>> port = 14444
**>> smsc-username = "ignored"
**>> smsc-password = "ignored"
**>> no-sender = false
**>> no-coding = false
**>> send-url = "http://10.35.2.102/smsc2/send.php";
**>> connect-allow-ip = "127.0.0.1;10.35.2.102"
**>> allowed-smsc-id = "car2"
**>>
**>> group = smsbox
**>> bearerbox-host = 10.35.2.102
**>> sendsms-port = 19013
**>> log-file = "/tmp/kannel/smsbox.log"
**>> log-level = 0
**>> access-log = "/tmp/kannel/Aaccess.log"
**>> reply-couldnotfetch = "Could not Fetch"
**>> reply-requestfailed = "Request Failed"
**>> reply-emptymessage = "Empty message"
**>>
**>> group = sendsms-user
**>> username = koko
**>> password = lala
**>> user-deny-ip = "*.*.*.*"
**>> user-allow-ip = "10.35.2.102"
**>>
**>> group = sms-service
**>> keyword = default
**>> text = "Not a valid service. Send HELP to %P"
**>>
**>> group = sms-service
**>> keyword = HELP
**>> text = "Valid Commands: HOR, HELP"
**>>
**>> group = sms-service
**>> keyword = HOR
**>> max-messages = 2
**>> get-url = "http://10.35.2.102/smsc/prognoza.php?zod=%s";
**>>
**>>
**>> Here is what I see when run bearerbox (-v 1):
**>>
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Debug_lvl = 1, log_file = <none>, 
log_lvl = 0
**>> 2005-02-24 12:55:10 [19998] [0] WARNING: DLR: using default 'internal' for 
storage type.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: DLR using storage type: internal
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Added logfile 
`/tmp/kannel/kannel.log' with level `0'.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Started access logfile 
`/tmp/kannel/access.log'.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: HTTP: Opening server at port 18000.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: BOXC: 'smsbox-max-pending' not set, 
using default (100).
**>> 2005-02-24 12:55:10 [19998] [0] INFO: DLR rerouting for smsc id <car1> 
disabled.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: HTTP: Opening server at port 15555.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: HTTP[car1]: Initiated and ready
**>> 2005-02-24 12:55:10 [19998] [0] INFO: DLR rerouting for smsc id <car2> 
disabled.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: HTTP: Opening server at port 14444.
**>> 2005-02-24 12:55:10 [19998] [0] INFO: HTTP[car2]: Initiated and ready
**>> 2005-02-24 12:55:10 [19998] [0] INFO: 
----------------------------------------
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Kannel bearerbox II version 1.4.0 
starting
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Loading store file 
`/tmp/kannel/kannel.store'
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Store-file size 0, starting to unpack
**>> 2005-02-24 12:55:10 [19998] [0] INFO: Retrieved 0 messages, 
non-acknowledged messages: 0
**>> 2005-02-24 12:55:10 [19998] [0] INFO: MAIN: Start-up done, entering 
mainloop
**>> 2005-02-24 12:55:12 [19998] [12] INFO: Client connected from <10.35.2.102>
**>> 2005-02-24 12:55:48 [19998] [12] WARNING: Cannot find SMSCConn for message 
to <306977666666>, rejected.
**>> 2005-02-24 12:55:48 [19998] [12] WARNING: Message rejected by bearerbox, 
no router!
**>> 2005-02-24 12:56:14 [19998] [12] WARNING: Cannot find SMSCConn for message 
to <306944111111>, rejected.
**>> 2005-02-24 12:56:14 [19998] [12] WARNING: Message rejected by bearerbox, 
no router!

**>> 2005-02-24 12:57:04 [19998] [12] WARNING: Cannot find SMSCConn for message 
to <306944111111>, rejected.
**>> 2005-02-24 12:57:04 [19998] [12] WARNING: Message rejected by bearerbox, 
no router!
**>> 2005-02-24 12:57:11 [19998] [12] WARNING: Cannot find SMSCConn for message 
to <306977666666>, rejected.
**>> 2005-02-24 12:57:11 [19998] [12] WARNING: Message rejected by bearerbox, 
no router!
**>>
**>> Here is the output of the smsbox (-v 1)
**>>
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Debug_lvl = 1, log_file = <none>, 
log_lvl = 0
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Starting to log to file 
/tmp/kannel/smsbox.log level 0
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Added logfile 
`/tmp/kannel/smsbox.log' with level `0'.
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Logging accesses to 
'/tmp/kannel/Aaccess.log'.
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Started access logfile 
`/tmp/kannel/Aaccess.log'.
**>> 2005-02-24 12:55:12 [20010] [0] INFO: HTTP: Opening server at port 19013.
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Set up send sms service at port 19013
**>> 2005-02-24 12:55:12 [20010] [0] INFO: Connected to bearerbox at 
10.35.2.102 port 18001.
**>> 2005-02-24 12:55:21 [20010] [4] INFO: Starting to service <hor rak> from 
<306944111111> to <4541>
**>> 2005-02-24 12:55:31 [20010] [4] INFO: Starting to service <hor deva> from 
<306977666666> to <3300>
**>> 2005-02-24 12:55:48 [20010] [4] INFO: Starting to service <lala> from 
<306977666666> to <3300>
**>> 2005-02-24 12:56:14 [20010] [4] INFO: Starting to service <koko> from 
<306944111111> to <4541>

**>> 2005-02-24 12:57:04 [20010] [4] INFO: Starting to service <help> from 
<306944111111> to <4541>
**>> 2005-02-24 12:57:11 [20010] [4] INFO: Starting to service <help> from 
<306977666666> to <3300>
**>>
**>> And this is an abstract from the kannel.log:
**>> 2005-02-24 12:57:04 [19998] [9] DEBUG: HTTP[car2]: Got request `/koko'
**>> 2005-02-24 12:57:04 [19998] [9] DEBUG: MY_HTTP[car2]: Received an HTTP 
request
**>> 2005-02-24 12:57:04 [19998] [9] DEBUG: HTTP[car2]: Constructing new SMS
**>> 2005-02-24 12:57:04 [19998] [9] DEBUG: HTTP[car2]: Sending reply
**>> 2005-02-24 12:57:04 [19998] [9] DEBUG: HTTP: Resetting HTTPClient for 
`10.35.2.102'.
**>> 2005-02-24 12:57:04 [19998] [9] DEBUG: HTTP[car2]: Destroying client 
information
**>> 2005-02-24 12:57:04 [19998] [13] DEBUG: send_msg: sending msg to box: 
<10.35.2.102>
**>> 2005-02-24 12:57:04 [19998] [13] DEBUG: boxc_sender: sent message to 
<10.35.2.102>
**>> 2005-02-24 12:57:04 [19998] [12] DEBUG: boxc_receiver: sms received
**>> 2005-02-24 12:57:04 [19998] [12] WARNING: Cannot find SMSCConn for message 
to <306944111111>, rejected.
**>> 2005-02-24 12:57:04 [19998] [12] WARNING: Message rejected by bearerbox, 
no router!
**>> 2005-02-24 12:57:04 [19998] [12] DEBUG: send_msg: sending msg to box: 
<10.35.2.102>
**>> 2005-02-24 12:57:04 [19998] [12] DEBUG: boxc_receiver: got ack
**>> 2005-02-24 12:57:04 [19998] [1] DEBUG: Dumping 1 messages and 1 acks to 
store

**>> 2005-02-24 12:57:11 [19998] [7] DEBUG: HTTP[car1]: Got request `/moo'
**>> 2005-02-24 12:57:11 [19998] [7] DEBUG: MY_HTTP[car1]: Received an HTTP 
request
**>> 2005-02-24 12:57:11 [19998] [7] DEBUG: HTTP[car1]: Constructing new SMS
**>> 2005-02-24 12:57:11 [19998] [7] DEBUG: HTTP[car1]: Sending reply
**>> 2005-02-24 12:57:11 [19998] [7] DEBUG: HTTP: Resetting HTTPClient for 
`127.0.0.1'.
**>> 2005-02-24 12:57:11 [19998] [7] DEBUG: HTTP[car1]: Destroying client 
information
**>> 2005-02-24 12:57:11 [19998] [13] DEBUG: send_msg: sending msg to box: 
<10.35.2.102>
**>> 2005-02-24 12:57:11 [19998] [13] DEBUG: boxc_sender: sent message to 
<10.35.2.102>
**>> 2005-02-24 12:57:11 [19998] [12] DEBUG: boxc_receiver: sms received
**>> 2005-02-24 12:57:11 [19998] [12] WARNING: Cannot find SMSCConn for message 
to <306977666666>, rejected.
**>> 2005-02-24 12:57:11 [19998] [12] WARNING: Message rejected by bearerbox, 
no router!
**>> 2005-02-24 12:57:11 [19998] [12] DEBUG: send_msg: sending msg to box: 
<10.35.2.102>
**>> 2005-02-24 12:57:11 [19998] [12] DEBUG: boxc_receiver: got ack
**>> 2005-02-24 12:57:12 [19998] [12] DEBUG: boxc_receiver: heartbeat with load 
value 0 received
**>> 2005-02-24 13:02:06 [19998] [2] DEBUG: HTTP: Destroying HTTPClient area 
0x8bd1738.
**>> 2005-02-24 13:02:06 [19998] [2] DEBUG: HTTP: Destroying HTTPClient for 
`10.35.2.102'.
**>> 2005-02-24 13:02:21 [19998] [2] DEBUG: HTTP: Destroying HTTPClient area 
0x8bd1768.
**>> 2005-02-24 13:02:21 [19998] [2] DEBUG: HTTP: Destroying HTTPClient for 
`127.0.0.1'.
**>
**>

Reply via email to