Hi, 

Thanks for the quick answer. 

Then I have to implement the feature in the application.

Jakob
On Jan 26, 2011, at 2:53 PM, Jacob Eiler wrote:

> Hi Jakob,
> 
> to the best of my knowledge the smsc needs to support the
> deferred-option. The AT-smsc does not support this option.
> 
> To fix it you would have to implement a "deferred queue" in Kannel
> (bearerbox).
> 
> If that is not an option, you will have to implement deferring in the
> application sending the messages to Kannel.
> 
> /Jacob
> 
> 
> On Wed, 2011-01-26 at 14:31 +0100, Jakob G. Thomsen wrote:
>> Hi all,
>> 
>> 
>> I have without luck tried to defer sending text messages from Kannel
>> using the deferred HTTP GET parameter. The messages are sent off
>> immediately.
>> My GET request looks like this:
>> 
>> 
>> http://XXXXX:13013/cgi-bin/sendsms?username=XXX&password=XXXX&to=XXX&deferred=10&text=Deferred
>> 
>> 
>> According to the user guide the deferred parameter should be in
>> minutes, but other places I have seen people using the
>> format YYMMDDhhmmsstnnp or YYYY-MM-DD,hh:mm but they did not work
>> either. 
>> Looking through the log files for Kannel it does mention the defer
>> parameter at all: (Just to test, the validity HTTP GET parameter is
>> used)
>> 
>> 
>> The SMSC is a Siemens MC 35i modem and I suspect, from what I can read
>> in other posts, that the problem is connected to the SMSC, since
>> Kannel just forward the content of the parameter to the modem. Can
>> anyone confirm me in that? And secondly if that is the case, does
>> anybody know how to fix this issue when Kannel is connected to a modem
>> and using AT commands (could I send another init-string)?
>> 
>> 
>> **Below is the log files and my conf file.
>> 
>> 
>> The log for sending one message is (Bearerbox):
>> 
>> 
>> 2011-01-26 14:19:52 [6152] [8] DEBUG: boxc_receiver: sms received
>> 2011-01-26 14:19:52 [6152] [8] DEBUG: send_msg: sending msg to boxc:
>> <mysmsbox>
>> 2011-01-26 14:19:54 [6152] [6] DEBUG: AT2[mysmsc]: TP-Validity-Period:
>> 24.0 hours
>> 2011-01-26 14:19:54 [6152] [6] DEBUG: AT2[mysmsc]: --> AT+CMGS=19^M
>> 2011-01-26 14:19:54 [6152] [6] DEBUG: AT2[mysmsc]: <-- >
>> 2011-01-26 14:19:54 [6152] [6] DEBUG: AT2[mysmsc]: send command
>> status: 1
>> 2011-01-26 14:19:54 [6152] [6] DEBUG: AT2[mysmsc]: -->
>> 0011000881161749290000A708C4B2B92C9797C9
>> 2011-01-26 14:19:54 [6152] [6] DEBUG: AT2[mysmsc]: --> ^Z
>> 2011-01-26 14:19:56 [6152] [6] DEBUG: AT2[mysmsc]: <-- >
>> 2011-01-26 14:19:56 [6152] [6] DEBUG: AT2[mysmsc]: <-- +CMGS: 218
>> 2011-01-26 14:19:56 [6152] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:19:56 [6152] [6] DEBUG: AT2[mysmsc]: send command
>> status: 0
>> 
>> 
>> SMSbox:
>> 
>> 
>> 2011-01-26 14:22:42 [28831] [2] DEBUG: HTTP: Creating HTTPClient for
>> `10.11.67.190'.
>> 2011-01-26 14:22:42 [28831] [2] DEBUG: HTTP: Created HTTPClient area
>> 0x9b550c8.
>> 2011-01-26 14:22:42 [28831] [2] DEBUG: HTTP: Creating HTTPClient for
>> `10.11.67.190'.
>> 2011-01-26 14:22:42 [28831] [2] DEBUG: HTTP: Created HTTPClient area
>> 0x9b55658.
>> 2011-01-26 14:22:42 [28831] [3] INFO: smsbox: Got HTTP request
>> </cgi-bin/sendsms> from <XXXX>
>> 2011-01-26 14:22:42 [28831] [3] INFO: sendsms used by <tester>
>> 2011-01-26 14:22:42 [28831] [3] INFO: sendsms sender:<tester:0>
>> (XXXXX) to:<XXXX> msg:<Deferred>
>> 2011-01-26 14:22:42 [28831] [3] DEBUG: Stored UUID
>> 214d4070-e638-405c-8228-35b8b580c240
>> 2011-01-26 14:22:42 [28831] [3] DEBUG: message length 8, sending 1
>> messages
>> 2011-01-26 14:22:42 [28831] [0] DEBUG: Got ACK (0) of
>> 214d4070-e638-405c-8228-35b8b580c240
>> 2011-01-26 14:22:42 [28831] [0] DEBUG: HTTP: Resetting HTTPClient for
>> `XXXXX'.
>> 2011-01-26 14:22:42 [28831] [3] DEBUG: Status: 202 Answer: <Sent.>
>> 2011-01-26 14:22:42 [28831] [3] DEBUG: Delayed reply - wait for
>> bearerbox
>> 2011-01-26 14:22:42 [28831] [3] INFO: smsbox: Got HTTP request
>> </favicon.ico> from <XXXXX>
>> 2011-01-26 14:22:42 [28831] [3] DEBUG: Status: 404 Answer: <Unknown
>> request.>
>> 2011-01-26 14:22:42 [28831] [3] DEBUG: HTTP: Resetting HTTPClient for
>> `XXXXX'.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> The logs for starting up the bearerbox:
>> 
>> 
>> 2011-01-26 14:21:06 [28822] [0] INFO: Added logfile
>> `/var/log/kannel/bearerbox.log' with level `0'.
>> 2011-01-26 14:21:06 [28822] [0] INFO: Started access logfile
>> `/var/log/kannel/access.log'.
>> 2011-01-26 14:21:06 [28822] [0] INFO: SSL not supported, no SSL
>> initialization done.
>> 2011-01-26 14:21:06 [28822] [0] INFO: HTTP: Opening server at port
>> 13000.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 1
>> (gwlib/fdset.c:poller)
>> 2011-01-26 14:21:06 [28822] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller)
>> maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [2] DEBUG: Thread 2
>> (gwlib/http.c:server_thread) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 2
>> (gwlib/http.c:server_thread)
>> 2011-01-26 14:21:06 [28822] [3] DEBUG: Thread 3
>> (gw/bb_http.c:httpadmin_run) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 3
>> (gw/bb_http.c:httpadmin_run)
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: starting smsbox connection
>> module
>> 2011-01-26 14:21:06 [28822] [0] INFO: BOXC: 'smsbox-max-pending' not
>> set, using default (100).
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Adding smsbox routing to id
>> <mysmsbox> for smsc id <mysmsc>
>> 2011-01-26 14:21:06 [28822] [4] DEBUG: Thread 4
>> (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 4
>> (gw/bb_boxc.c:sms_to_smsboxes)
>> 2011-01-26 14:21:06 [28822] [5] DEBUG: Thread 5
>> (gw/bb_boxc.c:smsboxc_run) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 5
>> (gw/bb_boxc.c:smsboxc_run)
>> 2011-01-26 14:21:06 [28822] [0] INFO: Set SMS resend frequency to 2
>> seconds.
>> 2011-01-26 14:21:06 [28822] [0] INFO: SMS resend retry set to 10.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: smsbox MO concatenated message
>> handling enabled
>> 2011-01-26 14:21:06 [28822] [0] INFO: DLR rerouting for smsc id
>> <mysmsc> disabled.
>> 2011-01-26 14:21:06 [28822] [0] INFO: AT2[mysmsc]: configuration shows
>> modemtype <siemensmc35i>
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: AT2[mysmsc]: Reading modem
>> definitions from </etc/kannel/kannel.conf>
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: AT2[mysmsc]: Found <1> modems
>> in config
>> 2011-01-26 14:21:06 [28822] [0] INFO: AT2[mysmsc]: read modem
>> definition for <siemensmc35i>
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: Thread 6
>> (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [6] INFO: AT2[mysmsc]: opening device
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: device opened.
>> Telnet mode = 0
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: device opened
>> 2011-01-26 14:21:06 [28822] [6] INFO: AT2[mysmsc]: Logging in
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 6
>> (gw/smsc/smsc_at.c:at2_device_thread)
>> 2011-01-26 14:21:06 [28822] [7] DEBUG: Thread 7
>> (gw/bb_smscconn.c:sms_router) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: Started thread 7
>> (gw/bb_smscconn.c:sms_router)
>> 2011-01-26 14:21:06 [28822] [0] INFO:
>> ----------------------------------------
>> 2011-01-26 14:21:06 [28822] [0] INFO: Kannel bearerbox II version
>> 1.4.3 starting
>> 2011-01-26 14:21:06 [28822] [0] INFO: MAIN: Start-up done, entering
>> mainloop
>> 2011-01-26 14:21:06 [28822] [0] DEBUG: AT2[mysmsc]: start called
>> 2011-01-26 14:21:06 [28822] [6] INFO: AT2[mysmsc]: init device
>> 2011-01-26 14:21:06 [28822] [6] INFO: AT2[mysmsc]: speed set to 115200
>> 2011-01-26 14:21:06 [28822] [5] INFO: Client connected from
>> <127.0.0.1> 
>> 2011-01-26 14:21:06 [28822] [5] DEBUG: Started thread 8
>> (gw/bb_boxc.c:function)
>> 2011-01-26 14:21:06 [28822] [8] DEBUG: Thread 8
>> (gw/bb_boxc.c:function) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [9] DEBUG: Thread 9
>> (gw/bb_boxc.c:boxc_sender) maps to pid 28822.
>> 2011-01-26 14:21:06 [28822] [8] DEBUG: Started thread 9
>> (gw/bb_boxc.c:boxc_sender)
>> 2011-01-26 14:21:06 [28822] [8] DEBUG: boxc_receiver: got boxc_id
>> <mysmsbox> from <127.0.0.1>
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: --> ATZ^M
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: --> AT^M
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- AT
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: --> AT&F^M
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- AT&F
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: --> ATE0^M
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- ATE0
>> 2011-01-26 14:21:06 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: --> AT\Q3^M
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: --> AT+CPIN?^M
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- +CPIN: READY
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: --> AT+CMGF=0^M
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: --> AT+CSMS=?^M
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- +CSMS: (0,1)
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] INFO: AT2[mysmsc]: Phase 2+ is
>> supported
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: --> AT+CSMS=1^M
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- +CSMS: 1,1,1
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: --> AT
>> +CNMI=3,2,0,1,1^M
>> 2011-01-26 14:21:07 [28822] [6] DEBUG: AT2[mysmsc]: <-- OK
>> 2011-01-26 14:21:07 [28822] [6] INFO: AT2[mysmsc]: AT SMSC
>> successfully opened.
>> 
>> 
>> Log file for SMSBox:
>> 
>> 
>> 2011-01-26 14:21:06 [28831] [0] INFO: Added logfile
>> `/var/log/kannel/smsbox.log' with level `0'.
>> 2011-01-26 14:21:06 [28831] [0] INFO: Service global sender set as '0'
>> 2011-01-26 14:21:06 [28831] [0] INFO: Logging accesses to
>> '/var/log/kannel/smsboxAccess.log'.
>> 2011-01-26 14:21:06 [28831] [0] INFO: Started access logfile
>> `/var/log/kannel/smsboxAccess.log'.
>> 2011-01-26 14:21:06 [28831] [0] INFO: HTTP: Opening server at port
>> 13013.
>> 2011-01-26 14:21:06 [28831] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller)
>> maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 1
>> (gwlib/fdset.c:poller)
>> 2011-01-26 14:21:06 [28831] [2] DEBUG: Thread 2
>> (gwlib/http.c:server_thread) maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 2
>> (gwlib/http.c:server_thread)
>> 2011-01-26 14:21:06 [28831] [0] INFO: Set up send sms service at port
>> 13013
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 3
>> (gw/smsbox.c:sendsms_thread)
>> 2011-01-26 14:21:06 [28831] [3] DEBUG: Thread 3
>> (gw/smsbox.c:sendsms_thread) maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:
>> ----------------------------------------------
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Kannel smsbox version 1.4.3
>> starting
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:   dumping group (sendsms-user):
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:     <group> = <sendsms-user>
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:     <max-messages> = <10>
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:     <username> = <XXXX>
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:     <concatenation> = <true>
>> 2011-01-26 14:21:06 [28831] [0] DEBUG:     <password> = <XXXXX>
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 4
>> (gw/smsbox.c:obey_request_thread)
>> 2011-01-26 14:21:06 [28831] [4] DEBUG: Thread 4
>> (gw/smsbox.c:obey_request_thread) maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 5
>> (gw/smsbox.c:url_result_thread)
>> 2011-01-26 14:21:06 [28831] [5] DEBUG: Thread 5
>> (gw/smsbox.c:url_result_thread) maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 6
>> (gw/smsbox.c:http_queue_thread)
>> 2011-01-26 14:21:06 [28831] [6] DEBUG: Thread 6
>> (gw/smsbox.c:http_queue_thread) maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] INFO: Connected to bearerbox at
>> 127.0.0.1 port 13005.
>> 2011-01-26 14:21:06 [28831] [7] DEBUG: Thread 7
>> (gw/heartbeat.c:heartbeat_thread) maps to pid 28831.
>> 2011-01-26 14:21:06 [28831] [0] DEBUG: Started thread 7
>> (gw/heartbeat.c:heartbeat_thread)
>> 
>> 
>> 
>> 
>> My conf file:
>> 
>> 
>> 
>> 
>> #---------------------------------------------
>> # CORE
>> #
>> # There is only one core group and it sets all basic settings
>> # of the bearerbox (and system). You should take extra notes on
>> # configuration variables like 'store-file' (or 'store-dir'),
>> # 'admin-allow-ip' and 'access.log'
>> 
>> 
>> group = core
>> admin-port = 13000
>> smsbox-port = 13005
>> admin-password = XXXX
>> 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/access.log"
>> sms-combine-concatenated-mo = true
>> sms-combine-concatenated-mo-timeout = "1800"
>> dlr-storage = internal
>> sms-resend-retry = 10
>> sms-resend-freq = 2
>> 
>> 
>> 
>> 
>> group = smsc
>> smsc = at
>> smsc-id = mysmsc
>> modemtype = siemensmc35i
>> device = /dev/ttyS0
>> speed = 115200
>> pin = ZZZZ
>> 
>> 
>> group = modems
>> id = siemensmc35i
>> name = siemensmc35i
>> detect-string = "SIEMENS"
>> detect-string2 = "MC35"
>> #Messages are held on the GSM modem
>> init-string = "AT+CNMI=3,2,0,1,1"
>> enable-hwhs="AT\\Q3"
>> 
>> 
>> 
>> 
>> #For some strange reason I need this in the configuration
>> #file to support inbound large text messages
>> group = smsbox-route
>> smsbox-id = mysmsbox
>> smsc-id = mysmsc
>> 
>> 
>> 
>> 
>> group = smsbox
>> smsbox-id = mysmsbox
>> bearerbox-host = 127.0.0.1
>> global-sender = 0
>> mo-recode = true
>> sendsms-port = 13013
>> sendsms-chars = "0123456789 +-"
>> log-file = "/var/log/kannel/smsbox.log"
>> log-level = 0
>> access-log = "/var/log/kannel/smsboxAccess.log"
>> 
>> 
>> #---------------------------------------------
>> # SEND-SMS USERS
>> #
>> # These users are used when Kannel smsbox sendsms interface is used to
>> # send PUSH sms messages, i.e. calling URL like
>> #
>> http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar...
>> 
>> 
>> group = sendsms-user
>> username = XXXXX
>> password = XXXX
>> concatenation = true
>> max-messages= 10
>> 
>> 
>> #---------------------------------------------
>> # SERVICES
>> #
>> # These are 'responses' to sms PULL messages, i.e. messages arriving
>> from
>> # handsets. The response is based on message content. Only one
>> sms-service is
>> # applied, using the first one to match.
>> 
>> 
>> group = sms-service
>> name = receiveMessages
>> keyword = default
>> max-messages = 0
>> concatenation = true
>> get-url = http://localhost:8080/receiveSMS?sender=%p&text=%a&udh=%u
>> #omit-empty=true
>> #accept-x-kannel-headers=true
>> 
>> 
>> 
>> 
> 
> -- 
> Apide ApS
> Jacob Eiler
> t: 2374 0486
> e: [email protected]
> w: apide.com
> 
> 


Reply via email to