Hi Peter, I just managed to receive a message (not from the SMS but from a HTTP client as a HTTP request, it should be the same thing on the SMSC since the guys in charge of it at the provider told me they can route messages as HTTP requests, but for some reason they seem to be taking some time doing this). What I have done is get the massage and forward it to my mobile as it is (will do the processing as the next task). The problem is I am getting the message, and another message "0: Accepted for delivery" right after it.
Here is my config file: # Sample configuration file for Kannel bearerbox on Debian. # See the documentation for explanations of fields. # # HTTP administration is disabled by default. Make sure you set the # password if you enable it. group = core admin-port = 13000 admin-password = bar admin-deny-ip = "*.*.*.*" admin-allow-ip = "127.0.0.1;x.x.x.x;y.y.y.y" smsbox-port = 13001 #wapbox-port = 13004 box-deny-ip = "*.*.*.*" box-allow-ip = "127.0.0.1;x.x.x.x;y.y.y.y;z.z.z.z" #wdp-interface-name = "*" log-file = "/var/log/kannel/bearerbox.log" log-level = 0 group = smsbox #bearerbox-host = localhost bearerbox-host = x.x.x.x sendsms-port = 13013 smsbox-id = fodabox global-sender = 15920 sendsms-chars = "0123456789 +-" access-log = "/var/log/kannel/smsbox.access" log-file = "/var/log/kannel/smsbox.log" log-level = 0 group = smsbox-route smsbox-id = fodabox smsc-ids = foda;fake_http #--------------------------------------------- # 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 keyword = nop text = "You asked nothing and I did it!" # There should be always a 'default' service. This service is used when no # other 'sms-service' is applied. group = sms-service keyword = default #exec = get-url = http://localhost:13013/cgi-bin/sendsms?username=u&password=p&to=%p&text=%a max-messages = 1 catch-all = true group = sendsms-user username = u password = p default-smsc = foda concatenation = true group = smsc smsc = smpp host = a.b.c.d port = 13131 #receive-port = 13132 smsc-username = "foo" smsc-password = "bar" system-type = "VMA" address-range = "" transceiver-mode = true source-addr-ton = 1 source-addr-npi = 1 dest-addr-ton = 1 dest-addr-npi = 1 bind-addr-ton = 1 bind-addr-npi = 1 validityperiod = 2880 smsc-id = foda group = smsc smsc = http system-type = kannel smsc-id = fake_http smsc-username = foo smsc-password = bar port = 13133 send-url = "http://" #This is the line that sends me the second sms that I do not need. If I remove it the bearerbox doesnt start up. I tried setting it to "http://localhost", "http://" and I still got the unwated message. #send-url = " http://localhost:13013/cgi-bin/sendsms?username=u&password=p&to=123456789&text=%a " #status-success-regex = "sent" #status-permfail-regex = "failure" #status-tempfail-regex = "retry later" connect-allow-ip = x.x.x.x;y.y.y.y I hope I can sort this problem out so I can carry on with the message processing and the rest of the project. Thank you Peter and everyone else for your help. Regards Engel On Jan 23, 2008 9:01 AM, Otandeka Peter <[EMAIL PROTECTED]> wrote: > > Hi Engel, > > Please tell us how far you have reached.Probably we can pick from there > and > see what to do. > > Can u recieve an SMS from the SMSC? > > Is your URL able to recieve the message, store it in a db or anywhere else > and probably interpret it? > > Can you be able to respond back and send a message to the phone? > > What stage are you on now? > > Send us your logs probably access,smsbox and bearerbox logs.Probably they > can provide an easier way to interprete the problem and we respond. > > Cheers > Peter > > ----- Original Message ----- > From: "seik" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, January 22, 2008 3:23 PM > Subject: Re: Need Help Configuring Kannel for SMS Pull > > > > from what i read so far, your smsc will use http requests > > > > so, you need to set smsc of http type > > > > > http://kannel.com/download/kannel-userguide-snapshot/userguide.html#AEN2227 > > > > so the scheme would be > > <smsc> --http--> <yourbox> > > > > so you need to set smsc of http type in a view to receive the MO > traffic > > > > example > > group = smsc > > smsc = http > > system-type = generic > > smsc-id = fake_http > > smsc-username = Engel > > smsc-password = Linus > > port = 13315 > > send-url = > > "theURLwhereYourProviderWillWaitForMTTrafficInitiatedByYOurApplication" > > status-success-regex = "sent" > > status-permfail-regex = "failure" > > status-tempfail-regex = "retry later" > > > > so, according the manual, the > > http request from your operator should looks like > > > http://kannel_box_ip:13315/?username=Engel&password=Linus&from=MSISDNHERE&to=youraSSIGNEDRECIPIENT&text=SMSHERE×tamp=2008-01-22+14%3A17%3A24 > > kannel will respond with plain text Sent. and http header 200 OK > > > > i would say its good idea to read the manual, there are a lot of > examples > > in it. > > > > > > > > > > -----Original Message----- > > From: [email protected] [EMAIL PROTECTED] > > Sent: 22 ?????? 2008 ?. > > To: seik > > Subject:Need Help Configuring Kannel for SMS Pull > > > >> Hello Seik, > > > >> Thank you for your response. Please have a look at my Kannel.conf and > let > >> me know what I am missing. > >> group = core > >> admin-port = 13000 > >> admin-password = bar > >> admin-deny-ip = "*.*.*.*" > >> admin-allow-ip = "127.0.0.1;x.x.x.x;y.y.y.y" > >> smsbox-port = 13001 > >> #wapbox-port = 13004 > >> box-deny-ip = "*.*.*.*" > >> box-allow-ip = " 127.0.0.1;x.x.x.x;y.y.y.y;z.z.z.z" > >> #wdp-interface-name = "*" > >> log-file = "/var/log/kannel/bearerbox.log" > >> log-level = 0 > >> group = smsbox > >> #bearerbox-host = localhost > >> bearerbox-host = x.x.x.x > >> sendsms-port = 13013 > >> smsbox-id = myfoda > >> global-sender = 15920 > >> sendsms-chars = "0123456789 +-" > >> access-log = "/var/log/kannel/smsbox.access" > >> log-file = "/var/log/kannel/smsbox.log" > >> log-level = 0 > >> #sendsms-url = /var/www/ > > > > > >> # SERVICESgroup = sms-service > >> keyword = nop > >> text = "You asked nothing and I did it!" > >> group = sms-service > >> keyword = default > >> text = "No service specified" > >> group = sms-service > >> keyword = nimac > >> get-url = "http://kannel_box_ip/nmc/test.txt > >> #get-url = " http://kannel_box_ip/nmc/app.php?sa=%p&msg=%a" > >> max-messages = 3 > >> catch-all = true > >> #text = Response default > > > >> group = sendsms-user > >> username = f00 > >> password = b4r > >> default-sender = "Wxrd" > >> default-smsc = foda > >> concatenation = true > > > >> group = smsc > >> smsc = smpp > >> host = x.x.x.x > >> port = 11111 > >> #receive-port = 13004 > >> smsc-username = "f00" > >> smsc-password = "b4r" > >> system-type = "VMA" > >> address-range = "" > >> transceiver-mode = true > >> source-addr-ton = 1 > >> source-addr-npi = 1 > >> dest-addr-ton = 1 > >> dest-addr-npi = 1 > >> bind-addr-ton = 1 > >> bind-addr-npi = 1 > >> validityperiod = 2880 > >> smsc-id = foda > > > >> The smsbox logs show that Kannel gets the request, but responds with a > >> 404 Answer: > > > >> 2008-01-22 11:54:15 [12078] [2] DEBUG: HTTP: Creating HTTPClient for > >> `z.z.z.z' > >> 2008-01-22 11:54:15 [12078] [2] DEBUG: HTTP: Created HTTPClient area > >> 0x814ad40. > >> 2008-01-22 11:54:15 [12078] [3] INFO: smsbox: Got HTTP request > >> </nmc/app.php> from <z.z.z.z> > >> 2008-01-22 11:54:15 [12078] [3] DEBUG: Status: 404 Answer: <Unknown > >> request.> > >> 2008-01-22 11:54:15 [12078] [3] DEBUG: HTTP: Resetting HTTPClient for > >> `z.z.z.z'. > >> 2008-01-22 11:55:15 [12078] [1] DEBUG: Timeout for fd:24 appeares. > >> 2008-01-22 11:55:15 [12078] [1] DEBUG: HTTP: Destroying HTTPClient area > >> 0x814ad40. > >> 2008-01-22 11:55:15 [12078] [1] DEBUG: HTTP: Destroying HTTPClient for > >> `z.z.z.z' > > > > > >> On Jan 22, 2008 2:07 PM, seik <[EMAIL PROTECTED]> wrote: > >> Hi, Engel, > > > >> the problem is not the wrong path etc. > > > >> you need to understand that the send-sms url set in the kannel config > is > >> virtual > >> kannel do not serve any requests not described into the config. > >> The sms-service GET/POST/XML url needs to be created by you though. > > > >> So, just use the example config files of kannel first. > > > > > > > > > > > > > > > >> -----Original Message----- > >> From: [email protected] [ [EMAIL PROTECTED] > >> Sent: 22 ?????? 2008 ?. > >> To: seik > >> Subject:Fwd: Need Help Configuring Kannel for SMS Pull > > > >>> Hi, > > > >>> I think the problem is that Kannel is looking for the wed document in > >>> the wrong place. Is there a way to tell it > >>> where to start looking? The document is currently in the Apache root > >>> (/var/www/), I thought that is where Kannel would start looking but > >>> obviously I was wrong. > > > >>> Regards, > > > >>> Engel Linus > > > >>> On Jan 22, 2008 9:39 AM, Engel L <[EMAIL PROTECTED]> wrote: > > > >>> Hi Guys, > > > >>> I am still struggling with with Kannel pull messages. My provider's > SMSC > >>> guys are still working on routing sms's to > >>> my box. They seem to be taking time with that so I am simulating that > >>> part by doing a HTTP request via a web browser from another client as > >>> follows: > > > >>> http://x.x.x.x:13003/nmc/app.php?sender=1234567&msg=Test+message > > > >>> where x.x.x.x is my Kannel box IP address. > > > >>> The Kannel smsbox logs show the following: > > > >>> 2008-01-22 09:22:38 [10403] [3] INFO: smsbox: Got HTTP request > >>> </nmc/app.php> fr > >>> om <10.10.32.34> > >>> 2008-01-22 09:22:38 [10403] [3] DEBUG: Status: 404 Answer: <Unknown > >>> request.> > >>> 2008-01-22 09:22:38 [10403] [3] DEBUG: HTTP: Resetting HTTPClient for > >>> `10.10.32. > >>> 34'. > > > >>> Please explain why I am getting a 404 (unknown request) while the file > >>> exists. > > > >>> Regards, > > > >>> Engel Linus > > > > > > > > > >>> On Jan 18, 2008 12:49 PM, Mike Nwaogu < [EMAIL PROTECTED]> > wrote: > >>> Hello Engel/Peter, > >>> Below is a sample configuration. > >>> this configuration will accept messages from the connectors and route > >>> the message to the php script also stated in the configuration. > > > >>> Now, to respond the php script will have to originate the message > using > >>> perhaps the http sending method. > > > >>> group = smsc > >>> smsc = smpp > >>> smsc-id=sms2 > >>> host = 192.168.0.11 > >>> port = 9900 > >>> transceiver-mode = true > >>> smsc-username = u53r > >>> smsc-password = p455w07d > >>> system-type = "" > >>> address-range = "" > >>> source-addr-ton = 2 > >>> source-addr-npi = 1 > > > >>> group = sendsms-user > >>> username = usr > >>> password = pwd > >>> default-sender="WORD" > >>> default-smsc > >>> concatenation = true > > > >>> group = sms-service > >>> keyword = default > >>> get-url = " > >>> > http://localhost/path/to/app.php?SOURCEADDR=%p&DESTADDR=%P&KEYWORD=%k&ID=%I&ORIGIN=%i&MESSAGE=%a" > >>> max-messages = 1 > >>> catch-all=true > > > > > >>> > >>> Regards, > >>> Mike Nwaogu > >>> Tel: 234_802_325_6437 > >>> Eml: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > >
