Ok, i see what your point. But I wanted this flow: 1. Client submits SMS to opensmppbox 2. Opensmppbox stores that SMS in mysql db (using sqlbox) 3. Now Sqlbox submits these SMS to bearerbox.
So I don't want BB to interact directly with opensmppbox. So all I want is that whenever SMS is received, it should be pushed in MySQL table. I've read many config examples in this mailing list and based on that I've done the aforementioned configuration. But I don't understand why opensmppbox is not passing anything to sqlbox. I am pretty new to opensmppbox and after trying hard for past few days I've come to you guys as last resort. I'd really appreciate if anyone can brief me how to store the SMS in mysql received by opensmppbox. On Sat, Sep 28, 2013 at 3:31 PM, Minh Tuan <[email protected]> wrote: > This is another question that is very clear in opensmppbox manual. Refer > to it, you absolutely have to use smsc-route to route clients to particular > SMSC. > > Back to your original question, cause you are using "allowed-smsc-id = > Promotional" in your smsc configuration, so if you don't specify smsc in > your submissions, BB will not route to this SMSC automatically. > > > On Sat, Sep 28, 2013 at 4:11 PM, <[email protected]> wrote: > >> Send users mailing list submissions to >> [email protected] >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://www.kannel.org/mailman/listinfo/users >> or, via email, send a message with subject or body 'help' to >> [email protected] >> >> You can reach the person managing the list at >> [email protected] >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of users digest..." >> >> >> Today's Topics: >> >> 1. Re: Opensmppbox issue: NACK/No SMSC (Saurabh Pandey) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Sat, 28 Sep 2013 14:41:21 +0530 >> From: Saurabh Pandey <[email protected]> >> To: Minh Tuan <[email protected]> >> Cc: [email protected] >> Subject: Re: Opensmppbox issue: NACK/No SMSC >> Message-ID: >> <CAHiPY2UYBPgUPNnmziwbpeJq= >> [email protected]> >> Content-Type: text/plain; charset="utf-8" >> >> Hi, >> >> thanks for the reply. But I want different smsc routing for different smpp >> clients. If i add route-to-smsc, wouldn't that direct all traffic to a >> single smsc? >> >> >> >> On Sat, Sep 28, 2013 at 1:50 PM, Minh Tuan <[email protected]> wrote: >> >> > You should add into your Opensmppbox.conf on Kannel server: >> > route-to-smsc = Promotional >> > >> > Try to submit another message and paste the bearerbox-asscess.log of >> > Kannel server here for more information. Thank you. >> > >> > Brs, >> > Tuan. >> > >> >> >> >> ------------------------------ >> >> >> >> Message: 2 >> >> Date: Sat, 28 Sep 2013 12:49:47 +0530 >> >> From: Saurabh Pandey <[email protected]> >> >> To: [email protected] >> >> Subject: Opensmppbox issue: NACK/No SMSC >> >> Message-ID: >> >> < >> >> cahipy2xp1-upxqd_0bt-y4efsv3xqqu2hvg9ro7-lu6qzav...@mail.gmail.com> >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> >> Hi, >> >> >> >> I am submitting SMS from Kannel based SMPP client to a different server >> >> having kannel based setup+opensmppbox+sqlbox stack. The SMS is always >> >> getting REJECTED. The issuea are: >> >> >> >> 1.) Opemsmppbox is taking system-id (username in smpplogins.txt) as >> SMSC >> >> and then rejecting it >> >> 2.) SQLBOX shows no activity except an error: sql_id cannot be null >> >> >> >> I have this setup >> >> >> >> SMSC<---> BB <---> SQLBOX <----> Opensmppbox <---> SMPP client >> >> >> >> //------------ HERE ARE THE CONFIG FILES-------------// >> >> >> >> >> >> //Kannel.conf >> >> >> >> group=core >> >> admin-port = 14000 >> >> smsbox-port = 13001 >> >> admin-password = sam >> >> status-password = >> >> log-file = "/var/log/kannel/kannel.log" >> >> box-deny-ip = "*.*.*.*" >> >> box-allow-ip = "127.0.0.1" >> >> access-log = "/var/log/kannel/access.log" >> >> store-file = "kannel.store" >> >> dlr-storage = mysql >> >> >> >> #--------------------------------------------- >> >> # SMSC CONNECTIONS >> >> >> >> group=smsc >> >> smsc = smpp >> >> smsc-id = Promotional >> >> host = xxx.xx.xxx.xxx >> >> port = xxxx >> >> smsc-username = xxxxx >> >> smsc-password = xxxxx >> >> system-type = VMA >> >> source-addr-ton = 0 >> >> source-addr-npi = 0 >> >> dest-addr-ton = 0 >> >> dest-addr-npi = 0 >> >> allowed-smsc-id = Promotional >> >> transceiver-mode = true >> >> receive-port = xxxx >> >> >> >> >> >> >> >> #--------------------------------------------- >> >> # SMSBOX SETUP >> >> >> >> group=smsbox >> >> smsbox-id = main-box >> >> bearerbox-host = 127.0.0.1 >> >> sendsms-port = 14014 >> >> global-sender = 14014 >> >> log-file = "/tmp/smsbox.log" >> >> access-log = "/tmp/access.log" >> >> >> >> >> >> group=smsbox-route >> >> smsbox-id = smppclient >> >> smsc-id = Promotional >> >> >> >> #--------------------------------------------- >> >> # SEND-SMS USERS >> >> >> >> group=sendsms-user >> >> username = sam >> >> password = sam >> >> max-messages = 5 >> >> concatenation = true >> >> >> >> >> >> #--------------------------------------------- >> >> # SERVICES >> >> >> >> group=sms-service >> >> keyword = nop >> >> text = "You asked nothing and I did it!" >> >> >> >> group=sms-service >> >> keyword = default >> >> get-url = " >> >> http://domain.com/index.php?senderid=%P&phone=%p&reply=%a&smscid=%i" >> >> max-messages = 0 >> >> >> >> group = mysql-connection >> >> id = mydlr >> >> host = localhost >> >> username = xxxx_sam >> >> password = "xxxx" >> >> database = xxxx_xxx >> >> max-connections = 5 >> >> >> >> group = dlr-db >> >> id = mydlr >> >> table = sc_kannel_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 = boxc >> >> >> >> >> >> >> >> // Opensmppbox.conf >> >> >> >> group = core >> >> dlr-storage = mysql >> >> >> >> group = opensmppbox >> >> opensmppbox-id = nvsmpp >> >> opensmppbox-port = 2345 >> >> bearerbox-host = localhost >> >> bearerbox-port = 13014 >> >> use-systemid-as-smsboxid = true >> >> log-file = "/var/log/smpp/smppbox.log" >> >> our-system-id = "VSMSC" >> >> smpp-logins = smpplogins.txt >> >> >> >> group = mysql-connection >> >> id = mydlr >> >> host = localhost >> >> username = xxxx_xxx >> >> password = xxxx >> >> database = xxxx_xxx >> >> >> >> #DLR Table Structure >> >> group = dlr-db >> >> id = mydlr >> >> table = sc_smpp_dlr >> >> field-smsc = smsc >> >> field-timestamp = timestamp >> >> field-destination = destination >> >> field-source = source >> >> field-service = service >> >> field-url = url >> >> field-mask = mask >> >> field-status = status >> >> field-boxc-id = boxc_id >> >> >> >> >> >> >> >> >> >> // SQLbox.conf >> >> >> >> group = sqlbox >> >> id = sqlbox-db >> >> smsbox-id = sqlbox >> >> bearerbox-host = localhost >> >> bearerbox-port = 13001 >> >> smsbox-port = 13014 >> >> smsbox-port-ssl = false >> >> sql-log-table = sc_sqlbox_log >> >> sql-insert-table = sc_smpp_incoming >> >> log-file = "/var/log/nvsmpp/test_smpp/sqlbox.log" >> >> log-level = 0 >> >> >> >> group = mysql-connection >> >> id = sqlbox-db >> >> host = localhost >> >> username = xxxxx_xxx >> >> password = xxx >> >> database = xxxx_xxxx >> >> # you can increase this upon a higher load >> >> max-connections = 5 >> >> >> >> // SMPPlogins.txt file >> >> >> >> smppclient goodsmpp testsmpp *.*.*.* >> >> >> >> >> >> >> >> >> >> Now I've done everything as directed but still, its not working. Here >> is >> >> what I got from SMPPBOX>LOG file >> >> >> >> //-----------------------------------SMPP PDU DUMP------------- >> >> >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: SMPP[smppclient]: Got PDU: >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: SMPP PDU 0x7f9874001380 dump: >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: type_name: submit_sm >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: command_id: 4 = 0x00000004 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: command_status: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: sequence_number: 2377 = >> >> 0x00000949 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: service_type: NULL >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: source_addr_ton: 5 = >> 0x00000005 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: source_addr_npi: 0 = >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: source_addr: "OPAUTO" >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: dest_addr_ton: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: dest_addr_npi: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: destination_addr: "9694304016" >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: esm_class: 3 = 0x00000003 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: protocol_id: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: priority_flag: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: schedule_delivery_time: NULL >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: validity_period: NULL >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: registered_delivery: 1 = >> >> 0x00000001 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: replace_if_present_flag: 0 = >> >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: data_coding: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: sm_default_msg_id: 0 = >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: sm_length: 18 = 0x00000012 >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: short_message: "TEST using >> >> smppbox" >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: SMPP PDU dump ends. >> >> >> >> //------------------------------DB Operations in >> >> smppbox.log------------------ >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: DLR[mysql]: Adding DLR >> >> smsc=smppclient, ts=21f20c77, src=OPAUTO, dst=9694304016, mask=19, >> >> boxc=smppclient >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: adding DLR entry into database >> >> 2013-09-28 02:14:17 [2578] [11] DEBUG: sql: INSERT INTO `sc_smpp_dlr` >> >> (`smsc`, `timestamp`, `source`, `destination`, `service`, `url`, >> `mask`, >> >> `boxc_id`, `status`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0) >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: SMPP[smppclient]: Sending PDU: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: SMPP PDU 0x7f9874000d70 dump: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: type_name: submit_sm_resp >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: command_id: 2147483652 = >> >> 0x80000004 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: command_status: 69 = >> 0x00000045 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: sequence_number: 2377 = >> >> 0x00000949 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: message_id: NULL >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: SMPP PDU dump ends. >> >> 2013-09-28 02:14:17 [2578] [10] INFO: We received an SMS message. >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: DLR[mysql]: Looking for DLR >> >> smsc=smppclient, ts=21f20c77, dst=9694304016, type=16 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: sql: SELECT `mask`, `service`, >> >> `url`, `source`, `destination`, `boxc_id` FROM `sc_smpp_dlr` WHERE >> >> `smsc`=? >> >> AND `timestamp`=? LIMIT 1 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: column=mask buffer_type=253 >> >> max_length=0 length=250 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: column=service buffer_type=253 >> >> max_length=0 length=250 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: column=url buffer_type=252 >> >> max_length=0 length=16777215 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: column=source buffer_type=253 >> >> max_length=0 length=250 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: column=destination >> buffer_type=253 >> >> max_length=0 length=250 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: column=boxc_id buffer_type=253 >> >> max_length=0 length=250 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: DLR[mysql]: created DLR message >> for >> >> URL <21f20c77> >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: removing DLR from database >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: sql: DELETE FROM `sc_smpp_dlr` >> >> WHERE >> >> `smsc`=? AND `timestamp`=? LIMIT 1 >> >> >> >> >> >> //---------------------------RESPONSE >> >> --------------------------------------- >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: SMPP[smppclient]: Sending PDU: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: SMPP PDU 0x7f9880003fd0 dump: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: type_name: deliver_sm >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: command_id: 5 = 0x00000005 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: command_status: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: sequence_number: 0 = >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: service_type: NULL >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: source_addr_ton: 2 = >> 0x00000002 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: source_addr_npi: 1 = >> 0x00000001 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: source_addr: "OPAUTO" >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: dest_addr_ton: 2 = 0x00000002 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: dest_addr_npi: 1 = 0x00000001 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: destination_addr: "9694304016" >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: esm_class: 4 = 0x00000004 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: protocol_id: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: priority_flag: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: schedule_delivery_time: NULL >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: validity_period: NULL >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: registered_delivery: 0 = >> >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: replace_if_present_flag: 0 = >> >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data_coding: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: sm_default_msg_id: 0 = >> 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: sm_length: 0 = 0x00000000 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: short_message: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: Octet string at >> 0x7f988000ac90: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: len: 112 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: size: 1024 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: immutable: 0 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 69 64 3a 32 31 66 32 >> 30 >> >> 63 37 37 20 73 75 62 3a id:21f20c77 sub: >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 30 30 31 20 64 6c 76 >> 72 >> >> 64 3a 30 30 30 20 73 75 001 dlvrd:000 su >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 62 6d 69 74 20 64 61 >> 74 >> >> 65 3a 31 33 30 39 32 38 bmit date:130928 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 30 32 31 34 20 64 6f >> 6e >> >> 65 20 64 61 74 65 3a 31 0214 done date:1 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 33 30 39 32 38 30 32 >> 31 >> >> 34 20 73 74 61 74 3a 55 309280214 stat:U >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 4e 44 45 4c 49 56 20 >> 65 >> >> 72 72 3a 30 30 30 20 74 NDELIV err:000 t >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: data: 65 78 74 3a 4e 41 43 >> 4b >> >> 2f 6e 6f 20 53 4d 53 43 ext:NACK/no SMSC >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: Octet string dump ends. >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: message_state: 5 = 0x00000005 >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: receipted_message_id: >> "21f20c77" >> >> 2013-09-28 02:14:17 [2578] [10] DEBUG: SMPP PDU dump ends. >> >> >> >> //--------------- >> >> >> >> Now you can clearly see NACK/No SMSC in the response. Please guide me >> how >> >> do I fix this. >> >> -------------- next part -------------- >> >> An HTML attachment was scrubbed... >> >> URL: < >> >> >> http://www.kannel.org/pipermail/users/attachments/20130928/14ef8276/attachment.html >> >> > >> >> >> >> ------------------------------ >> >> >> >> Subject: Digest Footer >> >> >> >> _______________________________________________ >> >> users mailing list >> >> [email protected] >> >> http://www.kannel.org/mailman/listinfo/users >> >> >> >> >> >> ------------------------------ >> >> >> >> End of users Digest, Vol 85, Issue 37 >> >> ************************************* >> >> >> > >> > >> > >> > -- >> > <====((=o-( ',_,' )-o=))=====> >> > >> > B?n ch?t t?t nh?ng cu?c ??i x? ??y! >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://www.kannel.org/pipermail/users/attachments/20130928/32f50426/attachment.html >> > >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> users mailing list >> [email protected] >> http://www.kannel.org/mailman/listinfo/users >> >> >> ------------------------------ >> >> End of users Digest, Vol 85, Issue 39 >> ************************************* >> > > > > -- > <====((=o-( ',_,' )-o=))=====> > > Bản chất tốt nhưng cuộc đời xô đẩy! >
