Problem while receiving SMS

2011-12-13 Thread Ninad Shaha
Dear All,


My name is Ninad. I already configured kannel sms gateway. I am able to
send sms using my configuration. Right now I am facing issue while
receiving sms. basically i want to create sms to email facility. The
received sms has been emailed to a particular mail-id.
Below is the configuration  logs. Please guide me to resolve this.


Kannel Config file:-




# Default kannel configuration file
group = core
admin-port = 13000
admin-password = 
admin-allow-ip = *.*.*.*
smsbox-port = 13001
box-allow-ip = *.*.*.*
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
log-level = 0
access-log = /var/log/kannel/kannel.access
unified-prefix = +91;+0091

#--- SMSC ---
group = smsc
smsc-id = CC
smsc = at
modemtype = auto
device = /dev/ttyS0
speed = 9600
keepalive = 60
sim-buffering = true

#- SMSCbox
group = smsbox
bearerbox-host = xx.xx.xx.xx
sendsms-port = 13131
#sendsms-interface = xx.xx.xx.xx
sendsms-chars = 0123456789 +-
access-log = /var/log/kannel/kannel.access.smsbox
log-file = /var/log/kannel/smsbox.log
log-level = 0
global-sender = +91942207

#--SMS-Service--
group = sms-service
catch-all = yes
keyword = www
get-url = http://xx.xx.xx.xx/sms?phone=%ptext=%a;
accept-x-kannel-headers = true
max-messages = 10
concatenation = true
accepted-smsc = CC
footer = CC IITB
exec=/etc/smstomail.cgi %p %P %di

#--Sendsms-user
group = sendsms-user
username = 
password = 
concatenation= true
max-messages = 10
user-allow-ip = *.*.*.*

#--
include = /usr/local/kannel/modems.conf





Modem.conf:-


group = modems
id = pulraj
name = “pulraj”
detect-string = “PULRAJ GSM-P3”
speed = 9600
init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1″





smstomail.cgi:-


#!/usr/bin/python

MAIL_SENDER = kannel
MAIL_RECEIVER = root@localhost

import cgi, os, string

class Vars:
def __init__(self):
self._dict = cgi.FieldStorage()

def __getitem__(self, key):
return self._dict[key].value

def smstomail():
print Content-Type: text/plain
print 

v = Vars()

f = os.popen(/usr/sbin/sendmail -oi %s % MAIL_RECEIVER, w)
#f = os.popen(/bin/mail -s sms % MAIL_RECEIVER, w)
f.write(From: %s\nTo: %s\nSubject: SMS message from %s\n\n%s:\n%s\n %
(MAIL_SENDER, MAIL_RECEIVER, v[from], v[to], v[text]))
f.close()

print Sent via mail to receiver.

if __name__ == __main__:
smstomail()






bearerbox.log:-



2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- +CMT: ,40
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: --
07911949249499790410D0426ACB66A3C564301121316195702215CEB43B4C6EE57039580E169BC56E3A7A794E07
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: received message from SMSC:
+91944247
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Alphanumeric sender
BT-664120
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: User data length read as (21)
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Udh decoding done len=21
udhi=0 udhlen=0 udh=''
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- AT+CNMA^M
2011-12-13 16:59:11 [539] [14] DEBUG: send_msg: sending msg to box:
xx.xx.xx.xx
2011-12-13 16:59:11 [539] [14] DEBUG: boxc_sender: sent message to
xx.xx.xx.xx
2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: sms received
2011-12-13 16:59:11 [539] [13] DEBUG: send_msg: sending msg to box:
xx.xx.xx.xx
2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: got ack
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- OK
2011-12-13 16:59:13 [539] [6] ERROR: AT2[CC]: Error encoding PDU!
2011-12-13 16:59:13 [539] [6] ERROR: System error 2: No such file or
directory
2011-12-13 16:59:17 [539] [13] DEBUG: boxc_receiver: heartbeat with load
value 0 received
2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- AT+CPMS?^M
2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- +CPMS:
SM,0,20,SM,0,20,SM,0,20
2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- OK





smsbox.log:-



2011-12-13 16:42:20 [558] [4] DEBUG: no match found: ^[ ]*(www)[ ]*
2011-12-13 16:42:20 [558] [4] 

Re: Problem while receiving SMS

2011-12-13 Thread Supporto Tecnico - Crazy Network

 Maybe i should be wrong, just an idea for this error:

2011-12-13 16:59:13 [539] [6] ERROR: System error 2: No such file or 
directory


If this is related to your script make sure the script is in /etc and 
have execution permissions (+x or 700/755 also)


Regards

Il 13/12/2011 12:34, Ninad Shaha ha scritto:

Dear All,


My name is Ninad. I already configured kannel sms gateway. I am able 
to send sms using my configuration. Right now I am facing issue while 
receiving sms. basically i want to create sms to email facility. The 
received sms has been emailed to a particular mail-id.

Below is the configuration  logs. Please guide me to resolve this.


Kannel Config file:-




# Default kannel configuration file
group = core
admin-port = 13000
admin-password = 
admin-allow-ip = *.*.*.*
smsbox-port = 13001
box-allow-ip = *.*.*.*
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
log-level = 0
access-log = /var/log/kannel/kannel.access
unified-prefix = +91;+0091

#--- SMSC ---
group = smsc
smsc-id = CC
smsc = at
modemtype = auto
device = /dev/ttyS0
speed = 9600
keepalive = 60
sim-buffering = true

#- SMSCbox
group = smsbox
bearerbox-host = xx.xx.xx.xx
sendsms-port = 13131
#sendsms-interface = xx.xx.xx.xx
sendsms-chars = 0123456789 +-
access-log = /var/log/kannel/kannel.access.smsbox
log-file = /var/log/kannel/smsbox.log
log-level = 0
global-sender = +91942207

#--SMS-Service--
group = sms-service
catch-all = yes
keyword = www
get-url = http://xx.xx.xx.xx/sms?phone=%ptext=%a 
http://xx.xx.xx.xx/sms?phone=%ptext=%a

accept-x-kannel-headers = true
max-messages = 10
concatenation = true
accepted-smsc = CC
footer = CC IITB
exec=/etc/smstomail.cgi %p %P %di

#--Sendsms-user
group = sendsms-user
username = 
password = 
concatenation= true
max-messages = 10
user-allow-ip = *.*.*.*

#--
include = /usr/local/kannel/modems.conf





Modem.conf:-


group = modems
id = pulraj
name = “pulraj”
detect-string = “PULRAJ GSM-P3”
speed = 9600
init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1″





smstomail.cgi:-


#!/usr/bin/python

MAIL_SENDER = kannel
MAIL_RECEIVER = root@localhost

import cgi, os, string

class Vars:
def __init__(self):
self._dict = cgi.FieldStorage()

def __getitem__(self, key):
return self._dict[key].value

def smstomail():
print Content-Type: text/plain
print 

v = Vars()

f = os.popen(/usr/sbin/sendmail -oi %s % MAIL_RECEIVER, w)
#f = os.popen(/bin/mail -s sms % MAIL_RECEIVER, w)
f.write(From: %s\nTo: %s\nSubject: SMS message from 
%s\n\n%s:\n%s\n %

(MAIL_SENDER, MAIL_RECEIVER, v[from], v[to], v[text]))
f.close()

print Sent via mail to receiver.

if __name__ == __main__:
smstomail()






bearerbox.log:-



2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- +CMT: ,40
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- 
07911949249499790410D0426ACB66A3C564301121316195702215CEB43B4C6EE57039580E169BC56E3A7A794E07
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: received message from 
SMSC: +91944247
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Alphanumeric sender 
BT-664120
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: User data length read as 
(21)
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Udh decoding done len=21 
udhi=0 udhlen=0 udh=''

2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- AT+CNMA^M
2011-12-13 16:59:11 [539] [14] DEBUG: send_msg: sending msg to box: 
xx.xx.xx.xx
2011-12-13 16:59:11 [539] [14] DEBUG: boxc_sender: sent message to 
xx.xx.xx.xx

2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: sms received
2011-12-13 16:59:11 [539] [13] DEBUG: send_msg: sending msg to box: 
xx.xx.xx.xx

2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: got ack
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- OK
2011-12-13 16:59:13 [539] [6] ERROR: AT2[CC]: Error encoding PDU!
2011-12-13 16:59:13 [539] [6] ERROR: System error 2: No such file or 
directory
2011-12-13 16:59:17 [539] [13] DEBUG: boxc_receiver: heartbeat with 
load value 0 received

2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- AT+CPMS?^M
2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- +CPMS: 

Re: Problem while receiving SMS

2011-12-13 Thread Ninad Shaha
Hi,

Thanks for the reply...

Yes the script is in /etc and have 755 permission.







On Tue, Dec 13, 2011 at 5:16 PM, Supporto Tecnico - Crazy Network 
supp...@crazynetwork.it wrote:

  Maybe i should be wrong, just an idea for this error:


 2011-12-13 16:59:13 [539] [6] ERROR: System error 2: No such file or
 directory

 If this is related to your script make sure the script is in /etc and have
 execution permissions (+x or 700/755 also)

 Regards

 Il 13/12/2011 12:34, Ninad Shaha ha scritto:

 Dear All,


 My name is Ninad. I already configured kannel sms gateway. I am able to
 send sms using my configuration. Right now I am facing issue while
 receiving sms. basically i want to create sms to email facility. The
 received sms has been emailed to a particular mail-id.
 Below is the configuration  logs. Please guide me to resolve this.


 Kannel Config file:-


 
 **

 # Default kannel configuration file
 group = core
 admin-port = 13000
 admin-password = 
 admin-allow-ip = *.*.*.*
 smsbox-port = 13001
 box-allow-ip = *.*.*.*
 wdp-interface-name = *
 log-file = /var/log/kannel/bearerbox.**log
 log-level = 0
 access-log = /var/log/kannel/kannel.**access
 unified-prefix = +91;+0091

 #--- SMSC ---
 group = smsc
 smsc-id = CC
 smsc = at
 modemtype = auto
 device = /dev/ttyS0
 speed = 9600
 keepalive = 60
 sim-buffering = true

 #- SMSCbox
 group = smsbox
 bearerbox-host = xx.xx.xx.xx
 sendsms-port = 13131
 #sendsms-interface = xx.xx.xx.xx
 sendsms-chars = 0123456789 +-
 access-log = /var/log/kannel/kannel.**access.smsbox
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 global-sender = +91942207

 #--SMS-Service**--
 group = sms-service
 catch-all = yes
 keyword = www
 get-url = http://xx.xx.xx.xx/sms?phone=**%ptext=%a 
 http://xx.xx.xx.xx/sms?phone=**%ptext=%a

 accept-x-kannel-headers = true
 max-messages = 10
 concatenation = true
 accepted-smsc = CC
 footer = CC IITB
 exec=/etc/smstomail.cgi %p %P %di

 #--Sendsms-user---**-
 group = sendsms-user
 username = 
 password = 
 concatenation= true
 max-messages = 10
 user-allow-ip = *.*.*.*

 #-**-
 include = /usr/local/kannel/modems.**conf

 
 **



 Modem.conf:-

 
 **
 group = modems
 id = pulraj
 name = “pulraj”
 detect-string = “PULRAJ GSM-P3”
 speed = 9600
 init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1″

 
 **



 smstomail.cgi:-

 
 **
 #!/usr/bin/python

 MAIL_SENDER = kannel
 MAIL_RECEIVER = root@localhost

 import cgi, os, string

 class Vars:
def __init__(self):
self._dict = cgi.FieldStorage()

def __getitem__(self, key):
return self._dict[key].value

 def smstomail():
print Content-Type: text/plain
print 

v = Vars()

f = os.popen(/usr/sbin/sendmail -oi %s % MAIL_RECEIVER, w)
#f = os.popen(/bin/mail -s sms % MAIL_RECEIVER, w)
f.write(From: %s\nTo: %s\nSubject: SMS message from %s\n\n%s:\n%s\n %
(MAIL_SENDER, MAIL_RECEIVER, v[from], v[to], v[text]))
f.close()

print Sent via mail to receiver.

 if __name__ == __main__:
smstomail()


 
 **



 bearerbox.log:-

 
 **

 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- +CMT: ,40
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: --
 07911949249499790410D0426ACB66**A3C564301121316195702215CE**
 B43B4C6EE57039580E169BC56E3A7A**794E07
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: received message from SMSC:
 +91944247
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Alphanumeric sender
 BT-664120
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: User data length read as
 (21)
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Udh decoding done len=21
 udhi=0 udhlen=0 udh=''
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- AT+CNMA^M
 2011-12-13 16:59:11 [539] [14] DEBUG: send_msg: sending msg to box:
 xx.xx.xx.xx
 2011-12-13 16:59:11 [539] [14] DEBUG: boxc_sender: sent message to
 xx.xx.xx.xx
 2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: sms received
 2011-12-13 16:59:11 [539] [13] DEBUG: send_msg: sending msg to box:
 xx.xx.xx.xx
 2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: got ack
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- OK
 2011-12-13 

Re: Problem while receiving SMS

2011-12-13 Thread Supporto Tecnico - Crazy Network

 What if you use:

exec:/usr/bin/python /etc/smstomail.cgi %p %P %di ?

Regards

Il 13/12/2011 12:34, Ninad Shaha ha scritto:

Dear All,


My name is Ninad. I already configured kannel sms gateway. I am able 
to send sms using my configuration. Right now I am facing issue while 
receiving sms. basically i want to create sms to email facility. The 
received sms has been emailed to a particular mail-id.

Below is the configuration  logs. Please guide me to resolve this.


Kannel Config file:-




# Default kannel configuration file
group = core
admin-port = 13000
admin-password = 
admin-allow-ip = *.*.*.*
smsbox-port = 13001
box-allow-ip = *.*.*.*
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
log-level = 0
access-log = /var/log/kannel/kannel.access
unified-prefix = +91;+0091

#--- SMSC ---
group = smsc
smsc-id = CC
smsc = at
modemtype = auto
device = /dev/ttyS0
speed = 9600
keepalive = 60
sim-buffering = true

#- SMSCbox
group = smsbox
bearerbox-host = xx.xx.xx.xx
sendsms-port = 13131
#sendsms-interface = xx.xx.xx.xx
sendsms-chars = 0123456789 +-
access-log = /var/log/kannel/kannel.access.smsbox
log-file = /var/log/kannel/smsbox.log
log-level = 0
global-sender = +91942207

#--SMS-Service--
group = sms-service
catch-all = yes
keyword = www
get-url = http://xx.xx.xx.xx/sms?phone=%ptext=%a 
http://xx.xx.xx.xx/sms?phone=%ptext=%a

accept-x-kannel-headers = true
max-messages = 10
concatenation = true
accepted-smsc = CC
footer = CC IITB
exec=/etc/smstomail.cgi %p %P %di

#--Sendsms-user
group = sendsms-user
username = 
password = 
concatenation= true
max-messages = 10
user-allow-ip = *.*.*.*

#--
include = /usr/local/kannel/modems.conf





Modem.conf:-


group = modems
id = pulraj
name = “pulraj”
detect-string = “PULRAJ GSM-P3”
speed = 9600
init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1″





smstomail.cgi:-


#!/usr/bin/python

MAIL_SENDER = kannel
MAIL_RECEIVER = root@localhost

import cgi, os, string

class Vars:
def __init__(self):
self._dict = cgi.FieldStorage()

def __getitem__(self, key):
return self._dict[key].value

def smstomail():
print Content-Type: text/plain
print 

v = Vars()

f = os.popen(/usr/sbin/sendmail -oi %s % MAIL_RECEIVER, w)
#f = os.popen(/bin/mail -s sms % MAIL_RECEIVER, w)
f.write(From: %s\nTo: %s\nSubject: SMS message from 
%s\n\n%s:\n%s\n %

(MAIL_SENDER, MAIL_RECEIVER, v[from], v[to], v[text]))
f.close()

print Sent via mail to receiver.

if __name__ == __main__:
smstomail()






bearerbox.log:-



2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- +CMT: ,40
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- 
07911949249499790410D0426ACB66A3C564301121316195702215CEB43B4C6EE57039580E169BC56E3A7A794E07
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: received message from 
SMSC: +91944247
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Alphanumeric sender 
BT-664120
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: User data length read as 
(21)
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Udh decoding done len=21 
udhi=0 udhlen=0 udh=''

2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- AT+CNMA^M
2011-12-13 16:59:11 [539] [14] DEBUG: send_msg: sending msg to box: 
xx.xx.xx.xx
2011-12-13 16:59:11 [539] [14] DEBUG: boxc_sender: sent message to 
xx.xx.xx.xx

2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: sms received
2011-12-13 16:59:11 [539] [13] DEBUG: send_msg: sending msg to box: 
xx.xx.xx.xx

2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: got ack
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- OK
2011-12-13 16:59:13 [539] [6] ERROR: AT2[CC]: Error encoding PDU!
2011-12-13 16:59:13 [539] [6] ERROR: System error 2: No such file or 
directory
2011-12-13 16:59:17 [539] [13] DEBUG: boxc_receiver: heartbeat with 
load value 0 received

2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- AT+CPMS?^M
2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- +CPMS: 
SM,0,20,SM,0,20,SM,0,20

2011-12-13 16:59:25 [539] [6] DEBUG: AT2[CC]: -- OK





smsbox.log:-


Re: Problem while receiving SMS

2011-12-13 Thread Ninad Shaha
HI,


I already tried that. Not working...











On Tue, Dec 13, 2011 at 6:01 PM, Supporto Tecnico - Crazy Network 
supp...@crazynetwork.it wrote:

  What if you use:

 exec:/usr/bin/python /etc/smstomail.cgi %p %P %di ?


 Regards

 Il 13/12/2011 12:34, Ninad Shaha ha scritto:

 Dear All,



 My name is Ninad. I already configured kannel sms gateway. I am able to
 send sms using my configuration. Right now I am facing issue while
 receiving sms. basically i want to create sms to email facility. The
 received sms has been emailed to a particular mail-id.
 Below is the configuration  logs. Please guide me to resolve this.


 Kannel Config file:-


 
 **

 # Default kannel configuration file
 group = core
 admin-port = 13000
 admin-password = 
 admin-allow-ip = *.*.*.*
 smsbox-port = 13001
 box-allow-ip = *.*.*.*
 wdp-interface-name = *
 log-file = /var/log/kannel/bearerbox.**log
 log-level = 0
 access-log = /var/log/kannel/kannel.**access
 unified-prefix = +91;+0091

 #--- SMSC ---
 group = smsc
 smsc-id = CC
 smsc = at
 modemtype = auto
 device = /dev/ttyS0
 speed = 9600
 keepalive = 60
 sim-buffering = true

 #- SMSCbox
 group = smsbox
 bearerbox-host = xx.xx.xx.xx
 sendsms-port = 13131
 #sendsms-interface = xx.xx.xx.xx
 sendsms-chars = 0123456789 +-
 access-log = /var/log/kannel/kannel.**access.smsbox
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 global-sender = +91942207

 #--SMS-Service**--
 group = sms-service
 catch-all = yes
 keyword = www
 get-url = http://xx.xx.xx.xx/sms?phone=**%ptext=%a 
 http://xx.xx.xx.xx/sms?phone=**%ptext=%a

 accept-x-kannel-headers = true
 max-messages = 10
 concatenation = true
 accepted-smsc = CC
 footer = CC IITB
 exec=/etc/smstomail.cgi %p %P %di

 #--Sendsms-user---**-
 group = sendsms-user
 username = 
 password = 
 concatenation= true
 max-messages = 10
 user-allow-ip = *.*.*.*

 #-**-
 include = /usr/local/kannel/modems.**conf

 
 **



 Modem.conf:-

 
 **
 group = modems
 id = pulraj
 name = “pulraj”
 detect-string = “PULRAJ GSM-P3”
 speed = 9600
 init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1″

 
 **



 smstomail.cgi:-

 
 **
 #!/usr/bin/python

 MAIL_SENDER = kannel
 MAIL_RECEIVER = root@localhost

 import cgi, os, string

 class Vars:
def __init__(self):
self._dict = cgi.FieldStorage()

def __getitem__(self, key):
return self._dict[key].value

 def smstomail():
print Content-Type: text/plain
print 

v = Vars()

f = os.popen(/usr/sbin/sendmail -oi %s % MAIL_RECEIVER, w)
#f = os.popen(/bin/mail -s sms % MAIL_RECEIVER, w)
f.write(From: %s\nTo: %s\nSubject: SMS message from %s\n\n%s:\n%s\n %
(MAIL_SENDER, MAIL_RECEIVER, v[from], v[to], v[text]))
f.close()

print Sent via mail to receiver.

 if __name__ == __main__:
smstomail()


 
 **



 bearerbox.log:-

 
 **

 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- +CMT: ,40
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: --
 07911949249499790410D0426ACB66**A3C564301121316195702215CE**
 B43B4C6EE57039580E169BC56E3A7A**794E07
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: received message from SMSC:
 +91944247
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Alphanumeric sender
 BT-664120
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: User data length read as
 (21)
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Udh decoding done len=21
 udhi=0 udhlen=0 udh=''
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- AT+CNMA^M
 2011-12-13 16:59:11 [539] [14] DEBUG: send_msg: sending msg to box:
 xx.xx.xx.xx
 2011-12-13 16:59:11 [539] [14] DEBUG: boxc_sender: sent message to
 xx.xx.xx.xx
 2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: sms received
 2011-12-13 16:59:11 [539] [13] DEBUG: send_msg: sending msg to box:
 xx.xx.xx.xx
 2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: got ack
 2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- OK
 2011-12-13 16:59:13 [539] [6] ERROR: AT2[CC]: Error encoding PDU!
 2011-12-13 16:59:13 [539] [6] ERROR: System error 2: No such file or
 directory
 2011-12-13 16:59:17 [539] [13] DEBUG: boxc_receiver: heartbeat with load
 value 0 

Re: SMS push performance problem

2011-12-13 Thread Fabio Sangiovanni
Hello list,

I've got  some updates to show you to better explain my problem.

Situation:
CentOS/6
kannel 1.4.3, used as SMS gateway via http calls originating from a custom 
application my company developed 
kannel.conf: http://pastebin.com/CCX9PGMN

Problem:
Using a multithreaded application to send http requests to kannel, the result 
is that some of them get an answer only after a long delay (sometimes more than 
1 minute). This happens only when a relatively high number of threads is in use 
(5).
I got this behavior both in virtual and physical environment.
Logfiles (both bearerbox and smsbox) show no errors at all. SMS messages are 
ultimately sent correctly to the SMSC.
Strange thing: the pause always happens after about 16.300 requests queued.
The problem seems to be related to the submit interface of kannel; once they're 
queued, everything goes smooth (sms delivered to SMSC at the rate forced by the 
SMSC itself).

To reproduce the issue, I've coded a small Ruby script that is a simplified 
version of the final (more complex) application.
You can find the script here: http://pastebin.com/Pe1QULGS
Feel free to edit the GET parameters and the number of threads and sms per 
thread. 
Here you can find an extract from the results of a 25.000 (25x1000) run: 
http://pastebin.com/RSi42SVE

As far as open files are concerned, during the tests a lsof -u kannel has 
never showed values beyond 170, so it shouldn't be the cause of the problem.

I can provide further information, so feel free to ask.

Thanks a lot for your help!

Cheers,
Fabio

Il giorno 09/dic/2011, alle ore 16:29, ha...@aeon.pk ha scritto:

 Why dont u use SQLBOX? 
 
 On Fri, Dec 9, 2011 at 7:44 PM, Fabio Sangiovanni sangiova...@nweb.it wrote:
 Thanks again Mohammed, I'll change those settings as soon as I get back to 
 work.
 I'll keep you posted! :)
 
 Cheers,
 Fabio
 
 
 Il giorno 09/dic/2011, alle ore 15:21, Mohammed Saleem ha scritto:
 
 Hey Fabio
 
 I can't provide a 100% solution for this issue before seeing the log. Try to 
 check the log and see if there is any error. But most probably it is an 
 open-files limitation problem, because you haven't set a limit to 
 sms-outgoing-queue-limit. But Actually this depends on your throughput and 
 how many messages you put in the queue of each connection. Try to do the 
 following:
 
 
 (1) increase the limit of open-files for the user running kannel.
 (2) set a limit for sms-outgoing-queue-limit, for example don't make it more 
 than 100 per 40 SMS/S throughput. This way kannel will reject any message 
 when the queue is full (see the HTTP response for the client application 
 which sends messages, you need to handle this kind of response to retry on 
 the rejected messages due to Queue Full)
 
 
 
 
 Best Regards,
 Mohammed M I Sleem
 
 http://www.abusleem.net  - Personal blog
 
 
 
 On Fri, Dec 9, 2011 at 4:01 PM, Fabio Sangiovanni sangiova...@nweb.it 
 wrote:
 Hi Mohammed,
 
 thanks for your reply.
 Unfortunately I won't be at my workplace again until next monday, so I won't 
 be able to provide detailed logs since then.
 On the other hand, I can post the kannel.conf file currently in use on the 
 test machine.
 Thanks again for your help. I'll post relevant log entries ASAP.
 
 Cheers,
 Fabio
 
 
 
 #
 # BEARERBOX
 #
 
 
 group = core
 admin-port = 13000
 admin-password = SECRET
 #status-password = SECRET
 admin-deny-ip = *.*.*.*
 admin-allow-ip = 127.0.0.*;192.168.1.*
 smsbox-port = 13003
 #wapbox-port = 13002
 #wdp-interface-name = *
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1
 log-file = /var/log/kannel/bearerbox.log
 access-log = /var/log/kannel/access.log
 store-type = spool
 store-location = /var/spool/kannel
 log-level = 1
 #log-level = 0
 sms-incoming-queue-limit = -1
 sms-outgoing-queue-limit = -1
 sms-resend-retry = 0
 dlr-storage = internal
 
 
 
 #
 # SMSBOX
 #
 
 
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 sendsms-chars = 0123456789 
 log-file = /var/log/kannel/smsbox.log
 log-level = 1
 #log-level = 0
 access-log = /var/log/kannel/access.log
 
 
 
 #
 # ACCOUNT/SMSC MAPPINGS
 #
 
 
 
 # SMSC FAKEPLEX
 group = sendsms-user
 username = USERNAME1
 password = SECRET1
 name = user_smsc_fake
 user-deny-ip = *.*.*.*
 user-allow-ip = 127.0.0.*;192.168.1.*
 forced-smsc = smscfake
 default-sender = mycompany
 max-messages = 3
 concatenation = 1
 omit-empty = 1
 #
 
 # SMSC PRODUCTION
 group = sendsms-user
 username = USERNAME2
 password = SECRET2
 name = user_smsc_prod
 user-deny-ip = *.*.*.* 
 user-allow-ip = 127.0.0.*;192.168.1.*
 forced-smsc = smscprod
 default-sender = mycompany
 max-messages = 3
 concatenation = 1
 omit-empty = 1
 #
 
 
 
 #
 # SMSC CONFIG
 #
 
 
 
 # SMSC FAKEPLEX
 group = smsc
 

Re: SMS push performance problem

2011-12-13 Thread Cezary Siwek

Hi,

I'm not a Ruby expert but what I can see (correct me if I'm wrong) you 
are creating a new HTTP connection per SMS.  That means the kannel has 
to create a new thread for each SMS. AFAIR Kannel supports keep-alive so 
you should be creating one HTTP connection per thread. This should 
significantly increase the performance.



Regards



On 13/12/2011 14:57, Fabio Sangiovanni wrote:

Hello list,

I've got  some updates to show you to better explain my problem.

Situation:
CentOS/6
kannel 1.4.3, used as SMS gateway via http calls originating from a custom 
application my company developed
kannel.conf: http://pastebin.com/CCX9PGMN

Problem:
Using a multithreaded application to send http requests to kannel, the result is 
that some of them get an answer only after a long delay (sometimes more than 1 
minute). This happens only when a relatively high number of threads is in use 
(5).
I got this behavior both in virtual and physical environment.
Logfiles (both bearerbox and smsbox) show no errors at all. SMS messages are 
ultimately sent correctly to the SMSC.
Strange thing: the pause always happens after about 16.300 requests queued.
The problem seems to be related to the submit interface of kannel; once they're 
queued, everything goes smooth (sms delivered to SMSC at the rate forced by the 
SMSC itself).

To reproduce the issue, I've coded a small Ruby script that is a simplified 
version of the final (more complex) application.
You can find the script here: http://pastebin.com/Pe1QULGS
Feel free to edit the GET parameters and the number of threads and sms per 
thread.
Here you can find an extract from the results of a 25.000 (25x1000) run: 
http://pastebin.com/RSi42SVE

As far as open files are concerned, during the tests a lsof -u kannel has 
never showed values beyond 170, so it shouldn't be the cause of the problem.

I can provide further information, so feel free to ask.

Thanks a lot for your help!

Cheers,
Fabio

Il giorno 09/dic/2011, alle ore 16:29, ha...@aeon.pk ha scritto:


Why dont u use SQLBOX?

On Fri, Dec 9, 2011 at 7:44 PM, Fabio Sangiovannisangiova...@nweb.it  wrote:
Thanks again Mohammed, I'll change those settings as soon as I get back to work.
I'll keep you posted! :)

Cheers,
Fabio


Il giorno 09/dic/2011, alle ore 15:21, Mohammed Saleem ha scritto:


Hey Fabio

I can't provide a 100% solution for this issue before seeing the log. Try to check the 
log and see if there is any error. But most probably it is an open-files limitation 
problem, because you haven't set a limit to sms-outgoing-queue-limit. But 
Actually this depends on your throughput and how many messages you put in the queue of 
each connection. Try to do the following:


(1) increase the limit of open-files for the user running kannel.
(2) set a limit for sms-outgoing-queue-limit, for example don't make it more 
than 100 per 40 SMS/S throughput. This way kannel will reject any message when 
the queue is full (see the HTTP response for the client application which sends 
messages, you need to handle this kind of response to retry on the rejected 
messages due to Queue Full)




Best Regards,
Mohammed M I Sleem

http://www.abusleem.net  - Personal blog



On Fri, Dec 9, 2011 at 4:01 PM, Fabio Sangiovannisangiova...@nweb.it  wrote:
Hi Mohammed,

thanks for your reply.
Unfortunately I won't be at my workplace again until next monday, so I won't be 
able to provide detailed logs since then.
On the other hand, I can post the kannel.conf file currently in use on the test 
machine.
Thanks again for your help. I'll post relevant log entries ASAP.

Cheers,
Fabio



#
# BEARERBOX
#


group = core
admin-port = 13000
admin-password = SECRET
#status-password = SECRET
admin-deny-ip = *.*.*.*
admin-allow-ip = 127.0.0.*;192.168.1.*
smsbox-port = 13003
#wapbox-port = 13002
#wdp-interface-name = *
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1
log-file = /var/log/kannel/bearerbox.log
access-log = /var/log/kannel/access.log
store-type = spool
store-location = /var/spool/kannel
log-level = 1
#log-level = 0
sms-incoming-queue-limit = -1
sms-outgoing-queue-limit = -1
sms-resend-retry = 0
dlr-storage = internal



#
# SMSBOX
#


group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
sendsms-chars = 0123456789 
log-file = /var/log/kannel/smsbox.log
log-level = 1
#log-level = 0
access-log = /var/log/kannel/access.log



#
# ACCOUNT/SMSC MAPPINGS
#



# SMSC FAKEPLEX
group = sendsms-user
username = USERNAME1
password = SECRET1
name = user_smsc_fake
user-deny-ip = *.*.*.*
user-allow-ip = 127.0.0.*;192.168.1.*
forced-smsc = smscfake
default-sender = mycompany
max-messages = 3
concatenation = 1
omit-empty = 1
#

# SMSC PRODUCTION
group = sendsms-user
username = USERNAME2
password = SECRET2
name = user_smsc_prod
user-deny-ip = *.*.*.*
user-allow-ip = 

Re: SMS push performance problem

2011-12-13 Thread Fabio Sangiovanni
Hi,

it seems to work! :)
Using keep-alive I had no more issues at all. I'll keep on testing. Thanks a 
lot!

For the sake of correctness, the new thread body is:

(…)
  threads  Thread.new(thread_num) { |myThread|
  
Net::HTTP.start(ip, 13013) do |h|
  for sms_num in 1..sms_per_thread
start = Time.now
resp = h.get(get)
stop = Time.now
puts Time.now.to_s +  --- thread #{myThread}:  #{resp.message} 
(#{stop - start})\n
  end
end  
  }
(…)

more info at 
http://www.igvita.com/2011/10/04/optimizing-http-keep-alive-and-pipelining/

Bye!



Il giorno 13/dic/2011, alle ore 16:13, Cezary Siwek ha scritto:

 Hi,
 
 I'm not a Ruby expert but what I can see (correct me if I'm wrong) you are 
 creating a new HTTP connection per SMS.  That means the kannel has to create 
 a new thread for each SMS. AFAIR Kannel supports keep-alive so you should be 
 creating one HTTP connection per thread. This should significantly increase 
 the performance.
 
 
 Regards
 
 
 
 On 13/12/2011 14:57, Fabio Sangiovanni wrote:
 Hello list,
 
 I've got  some updates to show you to better explain my problem.
 
 Situation:
 CentOS/6
 kannel 1.4.3, used as SMS gateway via http calls originating from a custom 
 application my company developed
 kannel.conf: http://pastebin.com/CCX9PGMN
 
 Problem:
 Using a multithreaded application to send http requests to kannel, the 
 result is that some of them get an answer only after a long delay (sometimes 
 more than 1 minute). This happens only when a relatively high number of 
 threads is in use (5).
 I got this behavior both in virtual and physical environment.
 Logfiles (both bearerbox and smsbox) show no errors at all. SMS messages are 
 ultimately sent correctly to the SMSC.
 Strange thing: the pause always happens after about 16.300 requests queued.
 The problem seems to be related to the submit interface of kannel; once 
 they're queued, everything goes smooth (sms delivered to SMSC at the rate 
 forced by the SMSC itself).
 
 To reproduce the issue, I've coded a small Ruby script that is a simplified 
 version of the final (more complex) application.
 You can find the script here: http://pastebin.com/Pe1QULGS
 Feel free to edit the GET parameters and the number of threads and sms per 
 thread.
 Here you can find an extract from the results of a 25.000 (25x1000) run: 
 http://pastebin.com/RSi42SVE
 
 As far as open files are concerned, during the tests a lsof -u kannel has 
 never showed values beyond 170, so it shouldn't be the cause of the problem.
 
 I can provide further information, so feel free to ask.
 
 Thanks a lot for your help!
 
 Cheers,
 Fabio
 
 Il giorno 09/dic/2011, alle ore 16:29, ha...@aeon.pk ha scritto:
 
 Why dont u use SQLBOX?
 
 On Fri, Dec 9, 2011 at 7:44 PM, Fabio Sangiovannisangiova...@nweb.it  
 wrote:
 Thanks again Mohammed, I'll change those settings as soon as I get back to 
 work.
 I'll keep you posted! :)
 
 Cheers,
 Fabio
 
 
 Il giorno 09/dic/2011, alle ore 15:21, Mohammed Saleem ha scritto:
 
 Hey Fabio
 
 I can't provide a 100% solution for this issue before seeing the log. Try 
 to check the log and see if there is any error. But most probably it is an 
 open-files limitation problem, because you haven't set a limit to 
 sms-outgoing-queue-limit. But Actually this depends on your throughput 
 and how many messages you put in the queue of each connection. Try to do 
 the following:
 
 
 (1) increase the limit of open-files for the user running kannel.
 (2) set a limit for sms-outgoing-queue-limit, for example don't make it 
 more than 100 per 40 SMS/S throughput. This way kannel will reject any 
 message when the queue is full (see the HTTP response for the client 
 application which sends messages, you need to handle this kind of response 
 to retry on the rejected messages due to Queue Full)
 
 
 
 
 Best Regards,
 Mohammed M I Sleem
 
 http://www.abusleem.net  - Personal blog
 
 
 
 On Fri, Dec 9, 2011 at 4:01 PM, Fabio Sangiovannisangiova...@nweb.it  
 wrote:
 Hi Mohammed,
 
 thanks for your reply.
 Unfortunately I won't be at my workplace again until next monday, so I 
 won't be able to provide detailed logs since then.
 On the other hand, I can post the kannel.conf file currently in use on the 
 test machine.
 Thanks again for your help. I'll post relevant log entries ASAP.
 
 Cheers,
 Fabio
 
 
 
 #
 # BEARERBOX
 #
 
 
 group = core
 admin-port = 13000
 admin-password = SECRET
 #status-password = SECRET
 admin-deny-ip = *.*.*.*
 admin-allow-ip = 127.0.0.*;192.168.1.*
 smsbox-port = 13003
 #wapbox-port = 13002
 #wdp-interface-name = *
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1
 log-file = /var/log/kannel/bearerbox.log
 access-log = /var/log/kannel/access.log
 store-type = spool
 store-location = /var/spool/kannel
 log-level = 1
 #log-level = 0
 sms-incoming-queue-limit = -1
 sms-outgoing-queue-limit = -1
 sms-resend-retry = 0
 

Noob general doubt - Just want to send messages via smpp

2011-12-13 Thread Jorge Raimundo
Hi all!

In my company we've started working with a SMSC provider in order to send a
large amount of messages on a regular basis.

The provider stated that for a large amount of messages it is preferable to
send them using the SMPP protocol, so basically we must have an application
that works as an external short message entity (ESME) that connects to
their SMSC.

I've downloaded kannel from svn and managed to compile it successfully, but
now I'm a bit lost without knowing how to pull this of. What do I need to
configure and how do I use kannel to send messages in this particular case.

Thanks for your time.

Best regards,
Jorge

-- 

  [image: Multivision] *Jorge Raimundo
*  RAN Consultant | jorge.raimu...@multivision.pt  .  Rua António Albino
Machado, Nº33, 2ºB.  S. Domingos de Benfica, 1600 - 870 Lisboa  Fixed PT: +351
21 155 20 53 | Mobile PT: +351 91 933 13 67  www.multivision.pt


Help with Nokia 6210 Navigator

2011-12-13 Thread Tuomas Koski
Hi guys,

does anyone here have managed to get Nokia 6210 Navigator to work with
Kannel 1.5.0 to SEND sms?

If yes, could you please post your working conf?

Here is my current conf (after trying all examples I found from web)
which does not work:

group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = *.*.*.*
admin-allow-ip = 
wapbox-port = 13002
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1

group = wapbox
bearerbox-host = localhost
log-file = /var/log/kannel/wapbox.log

group = smsc
smsc-id = SMSC_01
smsc = at
modemtype = nokiaphone
speed = 19200
device = /dev/ttyACM0
log-file = /var/log/kannel/smsc.log
log-level = 0
keepalive = true

group = modems
id = nokiaphone
name = Nokia Phone
need-sleep = true
#sendline-sleep = 1000
init-string = AT+CNMI=1,2,0,1,0
keepalive-cmd = AT+CBC;+CSQ
enable-mms = true


This is the log from smsc.log:
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: opening device
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: device opened.
Telnet mode = 0
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: device opened
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: Logging in
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: init device
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: speed set to 19200
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATZ^M
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT^M
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATF^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATF
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATE0^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATE0
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+IFC=2,2^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CPIN?^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- +CPIN: READY
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: --
AT+CSCA=+49177061^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CMGF=0^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CSMS=?^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- +CSMS: (0)
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CNMI=1,2,0,1,0^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ERROR
2011-12-13 21:11:02 [9154] [4] ERROR: AT2[SMSC_01]: Generic error: ERROR
2011-12-13 21:11:02 [9154] [4] ERROR: AT2[SMSC_01]: Initialization of
device failed.
2011-12-13 21:11:02 [9154] [4] INFO: AT2[SMSC_01]: Closing device
2011-12-13 21:11:02 [9154] [4] ERROR: AT2[SMSC_01]: Couldn't connect
(retrying in 10 seconds).

Any idea what could be the correct value instead of AT+CNMI=1,2,0,1,0 ?

All help would be highly appreciated.


Cheers,
Tuomas



RE: Problem while receiving SMS

2011-12-13 Thread Rene Kluwen
You have a get-url and exec service in your config at the same time. Please use 
1 only at a time.

Also, your group = sms-service has vertical whitespaces in it. They are not 
allowed in kannel.conf.

 

== Rene

 

From: users-boun...@kannel.org [mailto:users-boun...@kannel.org] On Behalf Of 
Ninad Shaha
Sent: Tuesday, 13 December, 2011 13:51
To: supp...@crazynetwork.it
Cc: users@kannel.org
Subject: Re: Problem while receiving SMS

 

HI,


I already tried that. Not working...












On Tue, Dec 13, 2011 at 6:01 PM, Supporto Tecnico - Crazy Network 
supp...@crazynetwork.it wrote:

 What if you use:

exec:/usr/bin/python /etc/smstomail.cgi %p %P %di ?



Regards

Il 13/12/2011 12:34, Ninad Shaha ha scritto:

Dear All,




My name is Ninad. I already configured kannel sms gateway. I am able to send 
sms using my configuration. Right now I am facing issue while receiving sms. 
basically i want to create sms to email facility. The received sms has been 
emailed to a particular mail-id.
Below is the configuration  logs. Please guide me to resolve this.


Kannel Config file:-




# Default kannel configuration file
group = core
admin-port = 13000
admin-password = 
admin-allow-ip = *.*.*.*
smsbox-port = 13001
box-allow-ip = *.*.*.*
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
log-level = 0
access-log = /var/log/kannel/kannel.access
unified-prefix = +91;+0091

#--- SMSC ---
group = smsc
smsc-id = CC
smsc = at
modemtype = auto
device = /dev/ttyS0
speed = 9600
keepalive = 60
sim-buffering = true

#- SMSCbox
group = smsbox
bearerbox-host = xx.xx.xx.xx
sendsms-port = 13131
#sendsms-interface = xx.xx.xx.xx
sendsms-chars = 0123456789 +-
access-log = /var/log/kannel/kannel.access.smsbox
log-file = /var/log/kannel/smsbox.log
log-level = 0
global-sender = +91942207 tel:%2B91942207 

#--SMS-Service--
group = sms-service
catch-all = yes
keyword = www

get-url = http://xx.xx.xx.xx/sms?phone=%p 
http://xx.xx.xx.xx/sms?phone=%25ptext=%25a text=%a 
http://xx.xx.xx.xx/sms?phone=%p http://xx.xx.xx.xx/sms?phone=%25ptext=%25a 
text=%a


accept-x-kannel-headers = true
max-messages = 10
concatenation = true
accepted-smsc = CC
footer = CC IITB
exec=/etc/smstomail.cgi %p %P %di

#--Sendsms-user
group = sendsms-user
username = 
password = 
concatenation= true
max-messages = 10
user-allow-ip = *.*.*.*

#--
include = /usr/local/kannel/modems.conf





Modem.conf:-


group = modems
id = pulraj
name = “pulraj”
detect-string = “PULRAJ GSM-P3”
speed = 9600
init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1″





smstomail.cgi:-


#!/usr/bin/python

MAIL_SENDER = kannel
MAIL_RECEIVER = root@localhost

import cgi, os, string

class Vars:
   def __init__(self):
   self._dict = cgi.FieldStorage()

   def __getitem__(self, key):
   return self._dict[key].value

def smstomail():
   print Content-Type: text/plain
   print 

   v = Vars()

   f = os.popen(/usr/sbin/sendmail -oi %s % MAIL_RECEIVER, w)
   #f = os.popen(/bin/mail -s sms % MAIL_RECEIVER, w)
   f.write(From: %s\nTo: %s\nSubject: SMS message from %s\n\n%s:\n%s\n %
   (MAIL_SENDER, MAIL_RECEIVER, v[from], v[to], v[text]))
   f.close()

   print Sent via mail to receiver.

if __name__ == __main__:
   smstomail()






bearerbox.log:-



2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- +CMT: ,40
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- 
07911949249499790410D0426ACB66A3C564301121316195702215CEB43B4C6EE57039580E169BC56E3A7A794E07
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: received message from SMSC: 
+91944247 tel:%2B91944247 
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Alphanumeric sender BT-664120
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: User data length read as (21)
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: Udh decoding done len=21 udhi=0 
udhlen=0 udh=''
2011-12-13 16:59:11 [539] [6] DEBUG: AT2[CC]: -- AT+CNMA^M
2011-12-13 16:59:11 [539] [14] DEBUG: send_msg: sending msg to box: 
xx.xx.xx.xx
2011-12-13 16:59:11 [539] [14] DEBUG: boxc_sender: sent message to xx.xx.xx.xx
2011-12-13 16:59:11 [539] [13] DEBUG: boxc_receiver: sms received
2011-12-13 16:59:11 [539] [13] DEBUG: 

RE: Noob general doubt - Just want to send messages via smpp

2011-12-13 Thread Rene Kluwen
I suggest you read the Kannel users manual at
http://www.kannel.org/download/kannel-userguide-snapshot/userguide.html and
after that send any questions you have to the list.

 

== Rene

 

From: users-boun...@kannel.org [mailto:users-boun...@kannel.org] On Behalf
Of Jorge Raimundo
Sent: Tuesday, 13 December, 2011 17:48
To: users@kannel.org
Subject: Noob general doubt - Just want to send messages via smpp

 

Hi all!

In my company we've started working with a SMSC provider in order to send a
large amount of messages on a regular basis.

The provider stated that for a large amount of messages it is preferable to
send them using the SMPP protocol, so basically we must have an application
that works as an external short message entity (ESME) that connects to their
SMSC.

I've downloaded kannel from svn and managed to compile it successfully, but
now I'm a bit lost without knowing how to pull this of. What do I need to
configure and how do I use kannel to send messages in this particular case.

Thanks for your time.

Best regards,
Jorge

-- 

 


Image removed by sender. Multivision

Jorge Raimundo


RAN Consultant | jorge.raimu...@multivision.pt


.


Rua António Albino Machado, Nº33, 2ºB.


S. Domingos de Benfica, 1600 - 870 Lisboa


Fixed PT: +351 21 155 20 53 | Mobile PT: +351 91 933 13 67


www.multivision.pt http://www.multivision.pt/  

 

image001.jpg

RE: Help with Nokia 6210 Navigator

2011-12-13 Thread Rene Kluwen
Some Nokia phone don't support the AT+CNMI command.
Try to remove it completely from your config and use sim-buffering in stead.


== Rene

-Original Message-
From: users-boun...@kannel.org [mailto:users-boun...@kannel.org] On Behalf
Of Tuomas Koski
Sent: Tuesday, 13 December, 2011 21:19
To: users@kannel.org
Subject: Help with Nokia 6210 Navigator

Hi guys,

does anyone here have managed to get Nokia 6210 Navigator to work with
Kannel 1.5.0 to SEND sms?

If yes, could you please post your working conf?

Here is my current conf (after trying all examples I found from web)
which does not work:

group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = *.*.*.*
admin-allow-ip = 
wapbox-port = 13002
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1

group = wapbox
bearerbox-host = localhost
log-file = /var/log/kannel/wapbox.log

group = smsc
smsc-id = SMSC_01
smsc = at
modemtype = nokiaphone
speed = 19200
device = /dev/ttyACM0
log-file = /var/log/kannel/smsc.log
log-level = 0
keepalive = true

group = modems
id = nokiaphone
name = Nokia Phone
need-sleep = true
#sendline-sleep = 1000
init-string = AT+CNMI=1,2,0,1,0
keepalive-cmd = AT+CBC;+CSQ
enable-mms = true


This is the log from smsc.log:
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: opening device
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: device opened.
Telnet mode = 0
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: device opened
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: Logging in
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: init device
2011-12-13 21:11:01 [9154] [4] INFO: AT2[SMSC_01]: speed set to 19200
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATZ^M
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT^M
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:01 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATF^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATF
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATE0^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ATE0
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+IFC=2,2^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CPIN?^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- +CPIN: READY
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: --
AT+CSCA=+49177061^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CMGF=0^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CSMS=?^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- +CSMS: (0)
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- OK
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- AT+CNMI=1,2,0,1,0^M
2011-12-13 21:11:02 [9154] [4] DEBUG: AT2[SMSC_01]: -- ERROR
2011-12-13 21:11:02 [9154] [4] ERROR: AT2[SMSC_01]: Generic error: ERROR
2011-12-13 21:11:02 [9154] [4] ERROR: AT2[SMSC_01]: Initialization of
device failed.
2011-12-13 21:11:02 [9154] [4] INFO: AT2[SMSC_01]: Closing device
2011-12-13 21:11:02 [9154] [4] ERROR: AT2[SMSC_01]: Couldn't connect
(retrying in 10 seconds).

Any idea what could be the correct value instead of AT+CNMI=1,2,0,1,0 ?

All help would be highly appreciated.


Cheers,
Tuomas