Re: dlr-url call on sqlbox
Dear Rene, While working on sqlbox, I have come across some queries :- 1. When we insert on send_sms table, it invokes and sends it to sent_sms which further submits it to the Operator and it deletes the entry from send_sms. However when we receive the deliver_sm from operator, it doesn't deletes the entry from sent_sms table. 2. If the above scenario continues it would increase the size of sent_sms table and will affect the mysql performance. 3. How we will manage queue in sqlbox, is there any patch available which will give us the queue related information. 4. How to increase insertion speed to send_sms tables or sent_sms table. On Wed, Aug 1, 2012 at 6:24 PM, Rene Kluwen rene.klu...@chimit.nl wrote: I don’t understand quite what you mean with your questions. But to answer: ** ** **1. **Yes, you can send bulk sms through smsbox. It should work better than sending them via smsbox. **2. **Performance issues are dependant of a number of things. Check the complete chain (smsbox - sqlbox - mysql - bearerbox - smsc). Usually sqlbox is not the cause. ** ** == Rene ** ** *From:* Ravindra Gupta // Viva [mailto:ravin...@vivainfomedia.com] *Sent:* Wednesday, 01 August, 2012 12:29 *To:* Rene Kluwen *Cc:* us...@vm1.kannel.org *Subject:* Re: dlr-url call on sqlbox ** ** ** ** Dear Rene, ** ** Thanks for your response. ** ** We have successfully configured SQLBOX in our server. ** ** We need some query as given below. ** ** 1. Can we send bulk load using SQLBOX i.e ( 5 to 10 Lac sms). 2. SQLBOX totally on database so any performance issue occurred when we have inserted 1 Lac to 10 Lac sms. 3. We have used mysql 5.5 version. Kindly share your expert sugesstion for the same. ** ** On Wed, Aug 1, 2012 at 3:05 PM, Rene Kluwen rene.klu...@chimit.nl wrote: The error is self-explanatory. You should just dlrencode your parameters in the dlr-url. Not the url itself. So insert: http://10.0.0.1/sms/dlrNEW.php?dlr=%25d%26to%3D%25p%26smsID%3D%25A%26BatchID%3Dravi123-5d12d21asdq1asravi == Rene ** **
Re: Where I can download the previous version of opensmppbox
07.08.2012 17:35, spameden ?: instead of rollbacking to previous revision, you can do what Rene said you need to alter opensmppbox.conf configuration and it would work. 2012/8/7 admin ad...@platbox.ru mailto:ad...@platbox.ru Good time of day! I have installed the last version of opensmppbox and have the bug which is talked about here https://redmine.kannel.org/issues/649 Where I can download the .63 version? There is no this bug in this version as they wrote here. Thank you for help. Yes, i did it. Now my opensmppbox can start. But unfortunatelly I can't send sms by smpp, because get the errors: ERROR: opensmppbox: bearerbox_to_smpp: thread starts ERROR: opensmppbox: smpp_to_bearerbox: thread starts Here are my config files: kannel.conf group = core admin-port = 13000 admin-password = admin-deny-ip = *.*.*.* admin-allow-ip = 127.0.0.1 smsbox-port = 13001 log-file = /var/log/kannel/bearerbox.log log-level = 0 access-log = /var/log/kannel/kannel-access.log #box-deny-ip = *.*.*.* box-allow-ip = 0.0.0.0 dlr-storage = mysql smsbox-max-pending = 100 sms-resend-retry = 20 sms-resend-freq = 180 #unified-prefix = ,+ ssl-server-cert-file=/home/amst/commcert/cert.crt ssl-server-key-file=/home/amst/commcert/cert.key group = mysql-connection id = dlr host = 192.168.102.2 username = smsuser password = database = smsbox port = 3306 max-connections = 5 group = dlr-db id = dlr table = dlr field-smsc = smsc field-timestamp = ts field-destination = destination field-source = source field-service = service field-url = url field-mask = mask field-status = status field-boxc-id = boxcid group = smsbox bearerbox-host = 1.1.1.1 bearerbox-port = 13005 sendsms-port = 13131 sendsms-port-ssl = false mo-recode = 1 sendsms-chars = 0123456789 reply-couldnotfetch = Service unavailable log-file = /var/log/kannel/smsbox.log log-level = 0 group = sendsms-user username = user_test password = default-sender = test user-deny-ip = 1.1.1.2 user-allow-ip = *.*.*.* max-messages = 5 omit-empty = true split-chars = | concatenation = true default-smsc = process group = smsc smsc = smpp smsc-id = process allowed-smsc-id = process host = 2.2.2.2 port = 888 transceiver-mode = 1 smsc-username = test smsc-password = system-type = NULL source-addr-ton = 0x00 source-addr-npi = 0x00 dest-addr-ton = 0x00 dest-addr-npi = 0x00 reconnect-delay = 20 enquire-link-interval = 30 log-file = /var/log/kannel/smsc-operator-process.log log-level = 0 group = sms-service keyword = default catch-all = true accepted-smsc = process text = Hello max-messages = 5 concatenation = true omit-empty = true accept-x-kannel-headers = true Here is smppbox.conf group = core #dlr-storage = mysql # this group defines your opensmppbox group = opensmppbox box-dlr-storage = mysql # our boxc type opensmppbox-id = opensmppbox # the port to listen on for smpp connections opensmppbox-port = 13006 # we connect to the following host as a box bearerbox-host = localhost bearerbox-port = 13005 #bearerbox-dcs = utf-8 log-level = 1 log-file = /var/log/kannel/opensmppbox.log our-system-id = platbox route-to-smsc = process # ? ??? smsc-id , ? ??? kannel.conf smpp-logins = /etc/opensmppbox/clients # the following is just standard dlr configuration group = mysql-connection id = dlr host = 192.168.2.2 username = smsuser password = database = smsbox port = 3306 # you can increase this upon a higher load max-connections = 5 group = dlr-db id = dlr table = dlr field-smsc = smsc field-timestamp = ts field-destination = destination field-source = source field-service = service field-url = url field-mask = mask field-status = status field-boxc-id = boxcid Here is sqlbox.conf group = sqlbox id = sqlbox-db smsbox-id = sqlbox #global-sender = bearerbox-host = localhost bearerbox-port = 13001 smsbox-port = 13005 smsbox-port-ssl = false sql-log-table = sent_sms sql-insert-table = send_sms check-balance = 1 log-file = /var/log/kannel/kannel-sqlbox.log log-level = 0 #access-log = /var/log/kannel/sqlaccess.log #ssl-client-certkey-file = #ssl-server-cert-file = #ssl-server-key-file = #ssl-trusted-ca-file = # Database connection examples. Please uncomment as needed # Example MYSQL Connection group = mysql-connection id = sqlbox-db host = 192.168.2.2 username = smsuser password = database = smsbox port = 3306 max-connections = 5 Here is the /etc/opensmppbox/clietnts test Qwe123 localhost *.*.*.* test2 Qwe1234 smpp2 *.*.*.* Here is the peace of php check sms script ?php define('SMPP_HOST_P', '1.1.1.1'); define('SMPP_LOGIN_P', 'test'); define('SMPP_PASSWORD_P', 'Qwe123'); define('SMPP_PORT', 13006); define('SMPP_FROM', 'TestAddress'); class SMPP { // ? ? SMPP public $system_type = null; public $interface_version = 0x34; And here is the debug log by opensmppbox: 2012-08-08 15:23:17 [6805] [0] INFO: Starting to log to file /var/log/kannel/opensmppbox.l og level 1
Re: Where I can download the previous version of opensmppbox
Changed system-type from NULL to localhost in kannel.conf The same error... 08.08.2012 16:15, Rene Kluwen пишет: Specify localhost as system-type in your client. == Rene *From:*users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] *On Behalf Of *admin *Sent:* Wednesday, 08 August, 2012 13:34 *To:* spameden; us...@vm1.kannel.org *Subject:* Re: Where I can download the previous version of opensmppbox 07.08.2012 17:35, spameden пишет: instead of rollbacking to previous revision, you can do what Rene said you need to alter opensmppbox.conf configuration and it would work. 2012/8/7 admin ad...@platbox.ru mailto:ad...@platbox.ru Good time of day! I have installed the last version of opensmppbox and have the bug which is talked about here https://redmine.kannel.org/issues/649 Where I can download the .63 version? There is no this bug in this version as they wrote here. Thank you for help. Yes, i did it. Now my opensmppbox can start. But unfortunatelly I can't send sms by smpp, because get the errors: ERROR: opensmppbox: bearerbox_to_smpp: thread starts ERROR: opensmppbox: smpp_to_bearerbox: thread starts Here are my config files: kannel.conf group = core admin-port = 13000 admin-password = admin-deny-ip = *.*.*.* admin-allow-ip = 127.0.0.1 smsbox-port = 13001 log-file = /var/log/kannel/bearerbox.log log-level = 0 access-log = /var/log/kannel/kannel-access.log #box-deny-ip = *.*.*.* box-allow-ip = 0.0.0.0 dlr-storage = mysql smsbox-max-pending = 100 sms-resend-retry = 20 sms-resend-freq = 180 #unified-prefix = ,+ ssl-server-cert-file=/home/amst/commcert/cert.crt ssl-server-key-file=/home/amst/commcert/cert.key group = mysql-connection id = dlr host = 192.168.102.2 username = smsuser password = database = smsbox port = 3306 max-connections = 5 group = dlr-db id = dlr table = dlr field-smsc = smsc field-timestamp = ts field-destination = destination field-source = source field-service = service field-url = url field-mask = mask field-status = status field-boxc-id = boxcid group = smsbox bearerbox-host = 1.1.1.1 bearerbox-port = 13005 sendsms-port = 13131 sendsms-port-ssl = false mo-recode = 1 sendsms-chars = 0123456789 reply-couldnotfetch = Service unavailable log-file = /var/log/kannel/smsbox.log log-level = 0 group = sendsms-user username = user_test password = default-sender = test user-deny-ip = 1.1.1.2 user-allow-ip = *.*.*.* max-messages = 5 omit-empty = true split-chars = | concatenation = true default-smsc = process group = smsc smsc = smpp smsc-id = process allowed-smsc-id = process host = 2.2.2.2 port = 888 transceiver-mode = 1 smsc-username = test smsc-password = system-type = NULL source-addr-ton = 0x00 source-addr-npi = 0x00 dest-addr-ton = 0x00 dest-addr-npi = 0x00 reconnect-delay = 20 enquire-link-interval = 30 log-file = /var/log/kannel/smsc-operator-process.log log-level = 0 group = sms-service keyword = default catch-all = true accepted-smsc = process text = Hello max-messages = 5 concatenation = true omit-empty = true accept-x-kannel-headers = true Here is smppbox.conf group = core #dlr-storage = mysql # this group defines your opensmppbox group = opensmppbox box-dlr-storage = mysql # our boxc type opensmppbox-id = opensmppbox # the port to listen on for smpp connections opensmppbox-port = 13006 # we connect to the following host as a box bearerbox-host = localhost bearerbox-port = 13005 #bearerbox-dcs = utf-8 log-level = 1 log-file = /var/log/kannel/opensmppbox.log our-system-id = platbox route-to-smsc = process # здесь надо указать smsc-id , прописанного в основном конфине kannel.conf smpp-logins = /etc/opensmppbox/clients # the following is just standard dlr configuration group = mysql-connection id = dlr host = 192.168.2.2 username = smsuser password = database = smsbox port = 3306 # you can increase this upon a higher load max-connections = 5 group = dlr-db id = dlr table = dlr field-smsc = smsc field-timestamp = ts field-destination = destination field-source = source field-service = service field-url = url field-mask = mask field-status = status field-boxc-id = boxcid Here is sqlbox.conf group = sqlbox id = sqlbox-db smsbox-id = sqlbox #global-sender = bearerbox-host = localhost bearerbox-port = 13001 smsbox-port = 13005 smsbox-port-ssl = false sql-log-table = sent_sms sql-insert-table = send_sms check-balance = 1 log-file = /var/log/kannel/kannel-sqlbox.log log-level = 0 #access-log = /var/log/kannel/sqlaccess.log #ssl-client-certkey-file = #ssl-server-cert-file = #ssl-server-key-file = #ssl-trusted-ca-file = # Database connection examples. Please uncomment as needed # Example MYSQL Connection group = mysql-connection id = sqlbox-db host = 192.168.2.2 username = smsuser password = database = smsbox port = 3306 max-connections = 5 Here is the /etc/opensmppbox/clietnts test Qwe123 localhost *.*.*.* test2 Qwe1234 smpp2 *.*.*.* Here is the peace of php check sms script ?php
UNSUBSCRIBE
UNSUBSCRIBE Please , thanks :) Regards, Chen Alkabets VAS/Billing Manager CCIP/CCNP/CCSP/JNCIS. [cid:image001.png@01CD756E.89A44930] Mobile +224 65 777 772 Office +224 65 100 772 Israel +972 54 443 4545 MSN chenc...@gmail.commailto:chenc...@gmail.com Skype chenchuk1977 P Pour le respect de l'environnement, merci de n'imprimer ce mail qu'en cas de nécessité ** IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error, please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies thereof. *** eSafe scanned this email for viruses, vandals, and malicious content. *** **inline: image001.png
RE: Where I can download the previous version of opensmppbox
The error is self-explanatory: Mallformed addr `TestSMSSender', alphanum length greater 11 chars. Alpha sender addresses have a maximum length of 11 characters. == Rene From: admin [mailto:ad...@platbox.ru] Sent: Wednesday, 08 August, 2012 15:25 To: Rene Kluwen Cc: 'spameden'; us...@vm1.kannel.org Subject: Re: Where I can download the previous version of opensmppbox Ok, I did it. Now my script returned this: Binding transmitter... Send PDU: 42 bytes 00 00 00 2a 00 00 00 02 00 00 00 00 00 00 00 01 74 65 73 74 00 51 77 65 31 32 33 00 6c 6f 63 61 6c 68 6f 73 74 00 34 00 01 00 command_id: 2 sequence number: 1 Read PDU: 24 bytes 00 00 00 18 80 00 00 02 00 00 00 00 00 00 00 01 70 6c 61 74 62 6f 78 00 body len: 8 command id: -2147483646 command status: 0 sequence number: 1 Binding status: 0 Send PDU: 100 bytes 00 00 00 64 00 00 00 04 00 00 00 00 00 00 00 02 00 05 01 54 65 73 74 53 4d 53 53 65 6e 64 65 72 00 01 01 37 39 32 36 36 30 38 33 31 39 38 00 00 00 00 00 00 00 00 08 00 2a 00 48 00 61 00 73 00 74 00 61 00 20 00 6c 00 61 00 20 00 76 00 69 00 73 00 74 00 61 00 20 00 34 00 7a 00 7a 00 6d 00 6b 00 62 00 command_id: 4 sequence number: 2 Read PDU: 16 bytes 00 00 00 10 80 00 00 00 00 00 00 ff 00 00 00 02 body len: 0 command id: -2147483648 command status: 255 sequence number: 2 Unbinding... Send PDU: 16 bytes 00 00 00 10 00 00 00 06 00 00 00 00 00 00 00 03 command_id: 6 sequence number: 3 Read PDU: 16 bytes 00 00 00 10 80 00 00 06 00 00 00 00 00 00 00 03 body len: 0 command id: -2147483642 command status: 0 sequence number: 3 Unbind status: 0 array(1) { [0]= NULL } Test OK. Bye.. I did not receive the sms
RE: dlr-url call on sqlbox
Sorry. Now I see what is happening. You should comment out line 597 of the original gw/sqlbox.c as well. == Rene From: Ravindra Gupta // Viva [mailto:ravin...@vivainfomedia.com] Sent: Wednesday, 08 August, 2012 15:51 To: Rene Kluwen Cc: us...@vm1.kannel.org Subject: Re: dlr-url call on sqlbox Dear Rene, We have commented the code in sqlbox.c file and found the row in sent_sms table. /* if (msg_type(msg) == sms) { debug(sqlbox, 0, smsbox_to_bearerbox: sms received); msg_escaped = msg_duplicate(msg); gw_sql_save_msg(msg_escaped, octstr_imm(MT)); msg_destroy(msg_escaped); } */ /* if (msg_type(msg) == sms) {x, 0, smsbox_to_bearerbox: sms received); msg_escaped = msg_duplicate(msg); gw_sql_save_msg(msg_escaped, octstr_imm(MT)); msg_destroy(msg_escaped); } */ mysql select count(*) from sent_sms; +--+ | count(*) | +--+ | 10 | +--+ 1 row in set (0.00 sec) On Wed, Aug 8, 2012 at 6:14 PM, Rene Kluwen rene.klu...@chimit.nl wrote: Hello Ravindra, 1. The sent_sms table is a log table. It records all sms messages that have been sent, either through a connected smsbox or via an insert in send_sms. Entries are never deleted. If you don't need a log of your sms messages, you can comment out the line gw_sql_save_msg(msg, octstr_imm(MT)); in the gw/sqlbox.c file. 2. If you don't need them, you can just delete everything from the sent_sms table, for instance in a cron table. Or otherwise, see 1. 3. sqlbox doesn't manage an internal queue. If you need information about the sqlbox queue size, just apply a select count(*) from send_sms and it will give you the number of messages still in the queue. 4. There's several options. If you don't need a log of the messages that are sent, comment out the line that saves sent messages (see 1.). Also, if you want to increase speed of inserting messages in send_sms, you can look at the mysql syntax INSERT. DELAYED. This is what your client program should do. Another thing is to adjust the SQLBOX_MYSQL_SELECT_QUERY query in gw/sql_mysql.h. You can increase LIMIT 0,1 to a bigger value. I never bothered to test this out on high volumes. So please feel free to test and share your experiences in the list. Also there's a number of things you can do to increase mysql speed, which is beyond the scope of this mailinglist. Hope this helps, Rene From: Ravindra Gupta // Viva [mailto:ravin...@vivainfomedia.com] Sent: Wednesday, 08 August, 2012 09:34 To: Rene Kluwen Cc: us...@vm1.kannel.org Subject: Re: dlr-url call on sqlbox Dear Rene, While working on sqlbox, I have come across some queries :- 1. When we insert on send_sms table, it invokes and sends it to sent_sms which further submits it to the Operator and it deletes the entry from send_sms. However when we receive the deliver_sm from operator, it doesn't deletes the entry from sent_sms table. 2. If the above scenario continues it would increase the size of sent_sms table and will affect the mysql performance. 3. How we will manage queue in sqlbox, is there any patch available which will give us the queue related information. 4. How to increase insertion speed to send_sms tables or sent_sms table. On Wed, Aug 1, 2012 at 6:24 PM, Rene Kluwen rene.klu...@chimit.nl wrote: I don't understand quite what you mean with your questions. But to answer: 1. Yes, you can send bulk sms through smsbox. It should work better than sending them via smsbox. 2. Performance issues are dependant of a number of things. Check the complete chain (smsbox - sqlbox - mysql - bearerbox - smsc). Usually sqlbox is not the cause. == Rene From: Ravindra Gupta // Viva [mailto:ravin...@vivainfomedia.com] Sent: Wednesday, 01 August, 2012 12:29 To: Rene Kluwen Cc: us...@vm1.kannel.org Subject: Re: dlr-url call on sqlbox Dear Rene, Thanks for your response. We have successfully configured SQLBOX in our server. We need some query as given below. 1. Can we send bulk load using SQLBOX i.e ( 5 to 10 Lac sms). 2. SQLBOX totally on database so any performance issue occurred when we have inserted 1 Lac to 10 Lac sms. 3. We have used mysql 5.5 version. Kindly share your expert sugesstion for the same. On Wed, Aug 1, 2012 at 3:05 PM, Rene Kluwen rene.klu...@chimit.nl wrote: The error is self-explanatory. You should just dlrencode your parameters in the dlr-url. Not the url itself. So insert: http://10.0.0.1/sms/dlrNEW.php?dlr=%25d%26to%3D%25p%26smsID%3D%25A%26BatchID %3Dravi123-5d12d21asdq1asravi == Rene
UNSUBSCRIBE
UNSUBSCRIBE attachment: image001.png