I'm using kannel SMPP (kannel.org) and for me need more information how to receive SMS messages from other SMPP server.
I know, for me need to add to kannel config this:
group = sms-service
keyword =
keyword-regex = .*
catch-all = yes
max-messages = 0
get-url = "http://website/sms.php?sender=%p&text=%a"
I need to add user for SMS pull'ing, but found only this example:
group = sendsms-user
username = ***************
password = hard2guess
concatenation= true
max-messages = 10000
But here is for sending SMS user, not for pull'ing.
Can somebody tell me more about how to create account for other SMPP server and receive SMS messages from other SMPP server?
If you have SMPP account adding SMPP information is easy all you need is add a new SMPP group
Sample SMPP Configuration (Transceiver Mode)
group = smsc
smsc = smpp
system-type=
smsc-username = user
smsc-password = pass
host = x.x.x.x
port = 10000
transceiver-mode = true
my-number = 123456
interface-version = 34
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
enquire-link-interval = 60
reconnect-delay = 60
log-file = "/var/log/kannel/smsc.log"
log-level = 1
I hope thi shelps
Thanks
:)
It sounds like you want to allow a client to connect to you on SMPP and send messages via your system. If this is correct then you need to be a SMPP SMSC and currently your kannel is only acting as an ESME .
To get Kannel to act as a SMSC you need to install a version of SMPP which will act as a SMSC and allow clients to connect to send a message. Because Kannel doesn't have this built in you can try installing the open source software called OpenSMPPBox
OpenSMPPBox is included in the Addons folder of the latest Kannel development release (version 1.5.0). You'll need to install this via SVN to get the code and then compile this on your machine to get OpenSMPPBox up and running. You have to also download the latest version of kannel's source code in order to compile OpenSMPPBox.
Once you have installed OpenSMPPBox it connects to Kannel's Bearerbox and operates as a way to allow clients to connect to you on SMPP and then route messages straight to Kannel. When it is running you can set a username and password for a client and give them your server IP to connect.
There's a Manual for OpenSMPPBox which will help with the installation and configuration.
one very important thing that you might need to verify from your SMPP provider is the version they are running on. If the version is lower than 3.4, then you will be required to switch off the transceiver-mode by commenting it out from your kannel.conf file. Failure to do this will result into an endless loop of Kannel trying to connect to the SMPP without any success.
Best of luck.
Related
I have a Teltonika TRM250 USB cellular modem connected to Linux computer running gammu-smsd 1.42. SMS sending and receiving are working fine, but I can't get SMS delivery reports to work. I have set DeliveryReport = log in my configuration file, the sent items have status "DeliveryOK" and even my Telco confirms they see delivery report requested.
However, after sending the SMS, nothing in the log indicates anything is received.
How should I proceed debugging this?
I suspect the modem might need some additional initialization commands, but have not been able to find anything.
As I understand, it's basically a Quectel BG96 with a USB - serial converter, here's the AT commands manual:
https://wiki.teltonika-networks.com/wikibase/images/4/48/Quectel_BG96_AT_Commands_Manual_V2.3.pdf
My config file:
[gammu]
device = /dev/ttyUSB2
connection = at115200
synchronizetime = no
logformat = nothing
[smsd]
Service = sql
Driver = native_mysql
LogFile = syslog
DebugLevel = 255
DeliveryReport = log
SMSC = +xxxxxx
StatusFrequency = 300
ReceiveFrequency = 60
User = xxx
Password = xxx
Host = localhost
Database = xxx
It seems the TRM250 just does not support delivery reports (although Teltonika has not confirmed this).
After upgrading the firmware to BG96MAR02A07M1G_01.007.01.007 and RMA-ing the modem with no results, I exchanged for TRM240 (firmware EC21ECGAR06A04M1G_01.004.01.004), which is based on a different chip (Quectel EC21) and works.
Here are the AT commands (provided by Teltonika) to send an SMS in text mode and request delivery report:
AT+CNMI=2,1,2,1,0
OK
AT+CSMP=49,167,0,0
OK
AT+CMGF=1
OK
AT+CMGS="+xxxxxxxxx"
> testtest
>
+CMGS: 72
OK
+CDS: 6,72,"+xxxxxxxxx",145,"22/02/23,18:11:00+08","22/02/23,18:11:00+08",0
The +CDS line is the report - received correctly on TRM240, but nothing on TRM250.
I require to send get requests/ receive responses to several snmp agents from a single client/manager process.
I have implemented client/agent based on below urls:
http://www.jitendrazaa.com/blog/java/snmp/create-snmp-client-in-java-using-snmp4j/ http://www.jitendrazaa.com/blog/java/snmp/creating-snmp-agent-server-in-java-using-snmp4j/
In order to send a request to an agent, the following is carried out for each server:
TransportMapping transport = new DefaultUdpTransportMapping();
snmp = new Snmp(transport);
transport.listen();
...
pdu.setType(PDU.GET);
// communityTarget contains server target address.
ResponseEvent event = snmp.send(pdu, communityTarget, null);
In order to receive responses from the servers, do I require to carry out a separate transport.listen() for each server? or create
a new TransportMapping and Snmp object for each server?
I don't understand how the client process can know which server returned the response? ...since
each time transport.listen() is called, the listening port address (transport.getListenAddress()) is the same.
and 1 extra udp port is listed (netstat).
I am intending to poll each server from a different background thread (in order that the polling interval can be configured).
Thank you
You should use the same transport mapping.
From the example you provided, it seems that you are using the synchronous API.
The response is just from the agent you sent the request too.
In any case, you can get the peer (agent) address from ResponseEvent.getPeerAddress
http://www.snmp4j.org/doc/org/snmp4j/event/ResponseEvent.html#getPeerAddress()
How to enable Fake DLR in Vsmppbox SMPP Server
group=vsmppbox
id=VSMPPBOX
log-file=/var/log/kannel/vsmppbox.log
log-level=0
smpp-port=4721
database-type=mysql
database-config=mysql
database-enable-queue=1
inbound-queue-threads=4
outbound-queue-threads=4
auth-method=1
database-user-table=smpp_users
database-store-table=smpp_store
database-log-table=smpp_log
database-pdu-table=smpp_queued_pdu
database-route-table=smpp_route
database-ndnc-table=smpp_ndnc
database-spam-table=smpp_spam
database-template-table=smpp_template
database-sender-table=smpp_sender
database-version-table=smpp_version
This is the minimum configuration im using in vsmppbox group and its working great with current settings on very higher load
fake DLR is enabled by default in Vsmppbox,
To generate Delivered and Failed reports you have to add values in simulate_deliver_every and simulate_permanent_failure_every fields in smpp user table
I am building a server for my flying club, I have everything working except sending texts.
I always get same error:
Error sending SMS: No SMSC number given. Provide it manually or use the one configured in phone. (EMPTYSMSC[31])
Using Gammu, although I have set the SMSC number in my config file (/etc/gammu-smsdrc)
Heres the lines from my file:
[smsd]
Smsc = +447785016005
Service = files
Can some one tell me what I am doing wrong please, everything else like Phone_id is actioned, but not the SMSC number.
Thanks, Clock.
First of all the SMSC setting was added quite recently (in Gammu 1.36.2), so if you are using older version it can't work.
Generally when Gammu can not get SMSC number from the SIM card (many of them do not have it stored), you have few options:
pass the number using -smscnumber when creating/sending the message
store the SMSC number in the SIM card using setsmsc
in SMSD use recently introduced SMSC configuration directive
I have already configured Kannel and can send and receive message throw web-browser, and trying to install PlaySMS and configuring PlaySMS but now cannot send or receive message from PlaySMS interface, and PS not writing any logs. In my Apache`s logs I see that:
"GET /playsms/index.php?app=menu&inc=send_sms&op=sendsmstopv&message=Hi+u+there%2C+good+morning%21%21&errid=46 HTTP/1.0" 200 2843 "$
If somebody has experiens to work with connecting Kannel+PlaySMS pls provide me some information.
Have you setup Kannel as a gateway in PlaySMS?
Setup Kannel as a gateway:
Login as admin to PlaySMS
Click Gateway > Manage KAnnel
Enter your username (playsms) and the IP address of the server with Kannel installed. If Kannel is installed on the same server as PlaySMS enter "localhost"
Enter the Send SMS port (from your kannel.conf file in the section called "smsbox" where it says "sendsms-port")
Enter playSMS web URL (probably http://localhost/playsms)
Make sure you have an entry in your kannel.conf for playsms to connect, something like this should work:
group = sendsms-user
username = playsms
password = playsms
user-deny-ip = "*.*.*.*"
user-allow-ip = "<<see note below>>"
Please note that you should either enter the IP address of the server that PlaySMS is installed on under "user-allow-ip" OR enter "localhost" as the IP if the server is the same for both playSMS and Kannel.
Don't forget to stop and start kannel to reload the configuration file.
You need to get kannel to store it in the mysql db that playsms is using - look into the smsbox program to see how sms is handled
the bearerbox has a client smsbox connected to it, and that smsbox is handling the distribution of the sms and also wether or not to make reply