Re: Issue with bearerbox
Hi spameden, I was thinking all the scenarios I used and/or helped in different similar situations related to DLR and realized that the list may be long and may not help you for your actual situation. In order to be more realistic and more adaptive to your actual scenario, can you please explain your service flow and the role of DLR there. I mean is it a kind of VAS platform, a bulk sms platform, dlr need to be passed to an opensmpp client, or just need to update the MT status on db, what is the maximum validity time of an MT, are there additional actions to be performed when DLR arrives (like in case of MT charging scenarios for a VAS etc...), what is the maximum number of DLR waiting for a final status on bearerbox dlr table that you have usually, etc... I hope you get my point. That said, I've seen good performance in using sqlite3 for dlr storage, and I use it frequently. Br, Rinor On Sat, Feb 16, 2013 at 6:52 PM, spameden spame...@gmail.com wrote: 2013/2/16 Rinor Hoxha rinorho...@gmail.com: I'm not able to provide the patch right now since it is not compatible with the last rev and is has also some other minor changes not related to matching, but it is really simple. I will paste a kind of diff here for now. sqlbox_mysql.c static Octstr *sqlbox_logtable; static Octstr *sqlbox_insert_table; +static int sqlbox_logtable_split = 0; .. if (sqlbox_insert_table == NULL) { panic(0, No 'sql-insert-table' not configured.); } +cfg_get_bool(sqlbox_logtable_split, grp, octstr_imm(sql-log-table-split)); + +/* create send_sms sent_sms MO MT DLR tables if they do not exist */ +if (sqlbox_logtable_split) { +sql = octstr_format(SQLBOX_MYSQL_CREATE_LOG_TABLE, octstr_cat(sqlbox_logtable, octstr_imm(MO))); +sql_update(sql); +octstr_destroy(sql); +sql = octstr_format(SQLBOX_MYSQL_CREATE_LOG_TABLE, octstr_cat(sqlbox_logtable, octstr_imm(MT))); +sql_update(sql); +octstr_destroy(sql); +sql = octstr_format(SQLBOX_MYSQL_CREATE_LOG_TABLE, octstr_cat(sqlbox_logtable, octstr_imm(DLR))); +sql_update(sql); +octstr_destroy(sql); +} +else { +sql = octstr_format(SQLBOX_MYSQL_CREATE_LOG_TABLE, sqlbox_logtable); +sql_update(sql); +octstr_destroy(sql); +} -/* create send_sms sent_sms tables if they do not exist */ -sql = octstr_format(SQLBOX_MYSQL_CREATE_LOG_TABLE, sqlbox_logtable); -sql_update(sql); -octstr_destroy(sql); sql = octstr_format(SQLBOX_MYSQL_CREATE_INSERT_TABLE, sqlbox_insert_table); sql_update(sql); octstr_destroy(sql); ... Octstr *sql; Octstr *stuffer[30]; int stuffcount = 0; -sql = octstr_format(SQLBOX_MYSQL_INSERT_QUERY, sqlbox_logtable, st_str(momt), st_str(msg-sms.sender), +if (sqlbox_logtable_split) { +sqlbox_logtable_tmp = octstr_cat(sqlbox_logtable, momt); +} +else { +sqlbox_logtable_tmp = octstr_duplicate(sqlbox_logtable); +} +sql = octstr_format(SQLBOX_MYSQL_INSERT_QUERY, sqlbox_logtable_tmp, st_str(momt), st_str(msg-sms.sender), . sql_update(sql); while (stuffcount 0) { octstr_destroy(stuffer[--stuffcount]); } octstr_destroy(sql); +octstr_destroy(sqlbox_logtable_tmp); ... hope you get it. I promise, if you are interested on it, i will provide a proper applicable diff for the current version. There are different ways we handled DLR when mysql went down (although it should NOT happen normally). it usually happens if you try to upgrade MySQL for example or stop it while kannel having batch to send out. would be nice to hear how did you solved it thanks for the patch! currently i'm just deleting the DLR's (updating existing MT records with latest status from DLR and inserting into meta_data field DLR msgdata field) to keep tables clean, also running via cronjob a script to archive old MT records. Solutions depend on case usage. and if opensmppbox is involved or not. we can discuss it later since I'm in middle of an issue right now and have to leave, sorry. Br, Rinor On Fri, Feb 15, 2013 at 12:28 AM, spameden spame...@gmail.com wrote: Hey Rinor. Your idea about splitting MO, MT, DLR in separate tables is just great! How do you do matching against MT's btw? Do you invoke everytime script or just update table via unique dlr_url id in the MT table? Would love to see your patch against SQLBox. I'm also wondering if you solved the issue of DLR missing when DB goes down. Thanks.
Re: NOT REALLY SOLVED Multiple SMSC connections to the same SMSC Instace DLR inconsistency
Hi David, I would like to reproduce your test case scenario. 12xSMPPSim instances 4x(receiver/transmitter)bind x SMPPSim - (all this 4 with the same smsc-id) So in total 48 smpp accounts with 12 distinct smsc-id. dlr-storage = internal Do I get it right? What is the DLR mask you are using? Can you attach your SMPPSim config file (smppsim.props) What are the values of: wait-ack and wait-ack-expire (I do have some cases when DLR arrives twice since sometimes the first received DLR is received/processed but not ACKed (connection is restarted - mostly on vpn connections) so the MNO sends it again, but this time kannel doesn't finds a hit since we already precessed it. (May or may not be related to your case)) Thanks. Br, Rinor On Fri, Feb 15, 2013 at 8:54 AM, David Szanto dsza...@genasys.com wrote: Thanks for all the comments! Rinor, the simulator we are using is a java implementation using SMPP protocol called SMPPSim (or SMPP Simulator). We increased the DLR delay from 0.05 to 1 second and got the same result. We do restart all simulators (12 with 4 binds each) before every test. All binds have a recieve-port and transmit port (although the same port is used, but it's not in transceiver mode). This last is a requirement. Yet we're VERY thankful for all the tip!! Anyway, since version 1.5.0 is still development, we've decided to go back to 1.4.3. Nevertheless, Throttling problem persists. We've come to realize the problem relies on gwthread_sleep, which is not really sleeping at all... ;) I've been looking around for some patch to fix this but couldn't find one. We even tried using usleep instead on smsc_smpp.c, but weird things happen when we do this. If anyone has a 1.4.3 revision with this problem solved, We'd very much appreciate it if someone could point us on the right direction. Thanks, David Szanto El 14/02/13 17:13, Rinor Hoxha escribió: Out of curiosity, 1)What is the simulator? (some when in high load, duplicate the id even in the same session) 2)Can you increase the DLR delay = 3 secs on simulator and retry 3)Probably you already know this, however restarting the simulator the foreign ID are restarted from beginning 4)Can you set 3 connections transmitter only and the fourth one receiver only and test We are using it in production and dlr matching is working fine. The removal of destinations in matching has a point. Sometimes some providers,based on scenarios, for example require you put + in front of MSISDN but return the MSISDN without + in DLR (or the reverse)(there are many other scenarios related to this). However the code is there in the dev branch and is just commented so if you need it you can use it. Br, Rinor On Thu, Feb 14, 2013 at 1:02 PM, David Szanto dsza...@genasys.com wrote: Hi spameden. And thanks again for the quick response!!! We did make sure our messages have at most 160 characters. And we're not using DB, so not much to see there. Do you know of any patch we could apply to the original 1.4.3 in order to make throttle control work? Thanks again! David Szanto El 14/02/13 12:55, spameden escribió: Trunk version is pretty much stable, I've been using for a while svn revision 5001, last uptime was 90days, had to reboot kannel due box upgrade. The only issues with DLR matching I've encountered (possible scenarios): 1) kannel requests only 1st part DLR of the message, so if your SMSC sends DLRs for other parts of concatenated messages they won't be matched (message should be 160 english symbols in case of coding=0 or 70 in case of coding=2). 2) if DB goes down in case of sqlbox DLR also won't be matched 3) if there is constant load and you're restarting kannel some of the DLRs might be missing, because bearerbox is very slow at shutdown and still receiving DLRs whilst sqlbox is already down (which handles DLRs) I use MySQL as a backend for storing DLRs, I'll check later what you're experiencing on my test environment and report back, but I'm quite sure that problem lies somewhere else. 2013/2/14 David Szanto dsza...@genasys.com: Hi again!! We've also come to realize that the trunk version is Development, so we're not using it... In which case, we have the throttling problem. We've seen there are patches that fix this problems, but don't know wether we should simply apply them in the 1.4.3 stable version directly, or if we should check out some specific branch. Specifically, could we simply apply the following file in the originally downloaded 1.4.3 stable version for it to work? https://redmine.kannel.org/projects/kannel/repository/revisions/4772/entry/trunk/gw/smsc/smsc_smpp.c Cheers!! David Szanto El 14/02/13 12:14, David Szanto escribió: Hi spameden, We thought so, but we've delayed the DLR 1 second and the error still shows up. We are not using sqlbox. DLRs are handled in memory. group = core admin-port = 13000 admin-password =
Speed up kannel rate per second:
Hello, I am sending sms via sqlbox. Currently I am sending 90 sms per second. I want to increase it. Is there any method to speed up kannel rate per second. Any sqlbox patch available to speed up this rate ? Any change in configuration can speed up this rate ? Anyhow can we increase it ? -- Thanks and regards, Himanshu Matta.
Re: Speed up kannel rate per second:
If I set max-pending-submits to higher value, this will be helpful or not ? On Mon, Feb 18, 2013 at 11:53 AM, Himanshu Matta himan...@hostnsoft.comwrote: Hello, I am sending sms via sqlbox. Currently I am sending 90 sms per second. I want to increase it. Is there any method to speed up kannel rate per second. Any sqlbox patch available to speed up this rate ? Any change in configuration can speed up this rate ? Anyhow can we increase it ? -- Thanks and regards, Himanshu Matta. -- Thanks and regards, Himanshu Matta. 7566559950
HELP!! regarding smpp server - client proper configuration
GOOD DAY! i have already installed opensmppbox which, based on my research, would enable kannel to act as SMPP server. Now, i am trying to perform a connection to a client from a different IP address and see if i can successfully transmit a message. My problem is, i keep on getting errors and found no viable result based from the solutions i've searched in the internet. May i also know if the diagram below shows the correct structure of smppbox alongside with bearerbox and smsbox in server and client sides, respectively? ( SERVER SIDE ) ( CLIENT SIDE ) (connection refused) OPENSMPPBOX - BEARERBOX ^ ^ | | BEARERBOX SMSBOX ^ | SMSBOX If the one i've drawn above is absolutely/partially wrong, can you please tell me what should i exactly do so i can configure it properly? Below are my configuration files: feel free to point out what makes the whole thing wrong and kindly tell me what i must do to run in correctly: opensmppbox.conf: group = core dlr-storage = internal group = opensmppbox opensmppbox-id = SMPP opensmppbox-port = 16400 bearerbox-host = 192.168.1.59;192.168.0.29;202.126.47.72 bearerbox-port = 13501 our-system-id = CMT smpp-logins = /usr/local/src/gateway-1.4.3/smpplogins.txt use-systemid-as-smsboxid = true route-to-smsc = smpp log-file = /tmp/smppbox.log smskannel.conf (server side) group = core admin-port = 13500 smsbox-port = 13501 admin-password = bar #status-password = foo #admin-deny-ip = #admin-allow-ip = log-file = /tmp/bearerbox2.log #log-level = 0 box-deny-ip = *...* box-allow-ip = 127.0.0.1;192.168.0.29;202.126.47.72 #unified-prefix = +358,00358,0;+,00 #access-log = /tmp/access2.log #store-file = /tmp/kannel2.store #ssl-server-cert-file = cert.pem #ssl-server-key-file = key.pem #ssl-certkey-file = mycertandprivkeyfile.pem # This is a fake smsc connection, only used to test the system and services. # It really cannot relay messages to actual handsets! group = smsc smsc = fake smsc-id = FAKE port = 1 connect-allow-ip = 127.0.0.1;192.168.0.29;202.126.47.72 # SMSC CONNECTIONS -- SMPP group=smsc smsc=smpp smsc-id=SMPP interface-version=34 host= 192.168.1.59;192.168.0.29;202.126.47.72 port= 16400 receive-port = 16400 smsc-username = tester smsc-password = foobar system-type = CMT idle-timeout = 30 transceiver-mode = 1 throughput = 50 address-range = 123 enquire-link-interval = 10 reconnect-delay = 1 keepalive = 55 # SMSBOX SETUP group = smsbox bearerbox-host = 127.0.0.1;192.168.0.29;202.126.47.72 sendsms-port = 18200 global-sender = 18200 #sendsms-chars = 0123456789 +- log-file = /tmp/smsbox2.log #log-level = 0 access-log = /tmp/access2.log # SEND-SMS USERS group = sendsms-user username = tester password = foobar #user-deny-ip = #user-allow-ip = # SERVICES group = sms-service keyword = jeck text = You asked nothing and I did it! # there should be default always group = sms-service keyword = default text = No service specified smskannel.conf (client side) group = core admin-port = 13500 smsbox-port = 13501 admin-password = bar #status-password = foo #admin-deny-ip = #admin-allow-ip = log-file = /tmp/bearerbox2.log #log-level = 0 box-deny-ip = *...* box-allow-ip = 127.0.0.1;192.168.0.29;202.126.47.72 #unified-prefix = +358,00358,0;+,00 #access-log = /tmp/access2.log #store-file = /tmp/kannel2.store #ssl-server-cert-file = cert.pem #ssl-server-key-file = key.pem #ssl-certkey-file = mycertandprivkeyfile.pem # This is a fake smsc connection, only used to test the system and services. # It really cannot relay messages to actual handsets! group = smsc smsc = fake smsc-id = FAKE port = 1 connect-allow-ip = 127.0.0.1;192.168.0.29;202.126.47.72 # SMSC CONNECTIONS -- SMPP group=smsc smsc=smpp smsc-id=SMPP interface-version=34 host= 192.168.1.59;192.168.0.29;202.126.47.72 port= 16400 receive-port = 16400 smsc-username = tester smsc-password = foobar system-type = CMT idle-timeout = 30 transceiver-mode = 1 throughput = 50 address-range = 123 enquire-link-interval = 10 reconnect-delay = 1 keepalive = 55 # SMSBOX SETUP group = smsbox bearerbox-host = 127.0.0.1;192.168.0.29;202.126.47.72 sendsms-port = 18200 global-sender = 18200 #sendsms-chars = 0123456789 +- log-file = /tmp/smsbox2.log #log-level = 0 access-log = /tmp/access2.log # SEND-SMS USERS group = sendsms-user username = tester password = foobar #user-deny-ip = #user-allow-ip = # SERVICES group = sms-service keyword = jeck text = You asked nothing and I did it! # there should be default always group = sms-service
Re: HELP!! regarding smpp server - client proper configuration
Hi things seems fine to me, though you can try changing the order of starting the openSMPP. to my knowledge it should be bearerBox , smsBox, sqlBox , smppBox (in order) 1) run bearerbox -- smskannel.conf (server side) 2) run smsbox -- smskannel.conf (server side) 3) run smppbox -- opensmppbox.conf (server side) 2nd thing , enable log-level on server side (opensmpp box) and see if you are really receiving any request. last thing i am sure /usr/local/src/gateway-1.4.3/**smpplogins.txt exists and have user definitions like .. tester foobar VMA *.*.*.* if you have specfied some IP address as the last parameter try replacing it with *.* just to check what is causing the issue. over all your configurations seems fine to me, (may be i have missed something.) Thanks Ali On Mon, Feb 18, 2013 at 10:02 AM, Gilbert Perez p_gilb...@rocketmail.comwrote: GOOD DAY! i have already installed opensmppbox which, based on my research, would enable kannel to act as SMPP server. Now, i am trying to perform a connection to a client from a different IP address and see if i can successfully transmit a message. My problem is, i keep on getting errors and found no viable result based from the solutions i've searched in the internet. May i also know if the diagram below shows the correct structure of smppbox alongside with bearerbox and smsbox in server and client sides, respectively? ( SERVER SIDE ) ( CLIENT SIDE ) (connection refused) OPENSMPPBOX- BEARERBOX ^ ^ | | BEARERBOX SMSBOX ^ | SMSBOX If the one i've drawn above is absolutely/partially wrong, can you please tell me what should i exactly do so i can configure it properly? Below are my configuration files: feel free to point out what makes the whole thing wrong and kindly tell me what i must do to run in correctly: opensmppbox.conf: group = core dlr-storage = internal group = opensmppbox opensmppbox-id = SMPP opensmppbox-port = 16400 bearerbox-host = 192.168.1.59;192.168.0.29;202.**126.47.72 bearerbox-port = 13501 our-system-id = CMT smpp-logins = /usr/local/src/gateway-1.4.3/**smpplogins.txt use-systemid-as-smsboxid = true route-to-smsc = smpp log-file = /tmp/smppbox.log smskannel.conf (server side) group = core admin-port = 13500 smsbox-port = 13501 admin-password = bar #status-password = foo #admin-deny-ip = #admin-allow-ip = log-file = /tmp/bearerbox2.log #log-level = 0 box-deny-ip = *.*.*.* box-allow-ip = 127.0.0.1;192.168.0.29;202.**126.47.72 #unified-prefix = +358,00358,0;+,00 #access-log = /tmp/access2.log #store-file = /tmp/kannel2.store #ssl-server-cert-file = cert.pem #ssl-server-key-file = key.pem #ssl-certkey-file = mycertandprivkeyfile.pem # This is a fake smsc connection, *only* used to test the system and services. # It really cannot relay messages to actual handsets! group = smsc smsc = fake smsc-id = FAKE port = 1 connect-allow-ip = 127.0.0.1;192.168.0.29;202.**126.47.72 # SMSC CONNECTIONS -- SMPP group=smsc smsc=smpp smsc-id=SMPP interface-version=34 host= 192.168.1.59;192.168.0.29;202.**126.47.72 port= 16400 receive-port = 16400 smsc-username = tester smsc-password = foobar system-type = CMT idle-timeout = 30 transceiver-mode = 1 throughput = 50 address-range = 123 enquire-link-interval = 10 reconnect-delay = 1 keepalive = 55 # SMSBOX SETUP group = smsbox bearerbox-host = 127.0.0.1;192.168.0.29;202.**126.47.72 sendsms-port = 18200 global-sender = 18200 #sendsms-chars = 0123456789 +- log-file = /tmp/smsbox2.log #log-level = 0 access-log = /tmp/access2.log # SEND-SMS USERS group = sendsms-user username = tester password = foobar #user-deny-ip = #user-allow-ip = # SERVICES group = sms-service keyword = jeck text = You asked nothing and I did it! # there should be default always group = sms-service keyword = default text = No service specified smskannel.conf (client side) group = core admin-port = 13500 smsbox-port = 13501 admin-password = bar #status-password = foo #admin-deny-ip = #admin-allow-ip = log-file = /tmp/bearerbox2.log #log-level = 0 box-deny-ip = *.*.*.* box-allow-ip = 127.0.0.1;192.168.0.29;202.**126.47.72 #unified-prefix = +358,00358,0;+,00 #access-log = /tmp/access2.log #store-file = /tmp/kannel2.store #ssl-server-cert-file = cert.pem #ssl-server-key-file = key.pem #ssl-certkey-file = mycertandprivkeyfile.pem # This is a fake smsc connection, *only* used to test the system and services. # It really cannot relay messages to actual handsets! group = smsc smsc = fake smsc-id = FAKE port = 1 connect-allow-ip = 127.0.0.1;192.168.0.29;202.**126.47.72 # SMSC CONNECTIONS -- SMPP group=smsc smsc=smpp smsc-id=SMPP