Re: MO Routing on the fly
Ruben, Thank you so much. I don't know how I managed to fail to notice that smsbox was not up. so stupid. You are the man. Everybody else who was kind enough to reply with helpful suggestions, I thank you as well your help is appreciated. On Mon, Apr 24, 2023 at 12:55 PM rm mobbis.am wrote: > Hi Akamat, > > Your Warning is not related to sms routing. > > Please check if your smsbox is up. > > > > Core config example: > > > > # -- CORE --core.conf > > > > group=core > > admin-port = 19000 > > smsbox-port = 19005 > > admin-password = * > > status-password = * > > admin-allow-ip = " > > admin-deny-ip = "*.*.*.*" > > log-file = "/var/log/kanpsms/bearerbox.log" > > log-level = 3 > > access-log = "/var/log/kanpsms/SentReceivedSMS.log" > > access-log-clean = true > > access-log-format = "%t %l [SMSC:%i] [SVC:%n] [ACT:%A] [BINF:%B] [FID:%F] > [META:%D] [from:%p] [to:%P] [flags:%m:%c:%M:%C:%d] [msg:%L:%b] [udh:%U:%u]" > > box-allow-ip = "127.0.0.1;*.*.*.*" > > sms-combine-concatenated-mo=true > > # -- > > store-type = file > > store-location = /home/KANNEL_PSMS/STORE > > dlr-storage = spool > > dlr-spool = /home/KANNEL_PSMS/DLR > > > > > > # -- OUTBOUND-SMS-CENTERS - > > include="/home/KANNEL_PSMS/smsc/smsc1.conf" > > include = "/home/KANNEL_PSMS/smsc/smsc2.conf" > > include = "/home/KANNEL_PSMS/smsc/smsc3.conf" > > > > #- SMSBOX--- > > include = "/home/KANNEL_PSMS/configs/smsbox.conf" > > > > #SENDSMS USERS-- > > include = "/home/KANNEL_PSMS/users/SendSMSusers.conf" > > > > # -- SMS-SERVICE -- > > include = "/home/KANNEL_PSMS/services/services.conf" > > > > > > *Other configs examples you can find in previous email* > > > > *Steps to RUN KANNEL* > > > > *Step1: /usr/local/kanpsms/bearerbox --parachute > /home/KANNEL_PSMS/configs/core.conf &* > > > > *Step2: usr/local/kanpsms/smsbox --parachute > /home/KANNEL_PSMS/configs/core.conf * > > > > *Best regards,* > > *Ruben Melikyan* > > > > > > *From:* akamat sarat > *Sent:* 24.04.2023 13:31 > *To:* rm mobbis.am > *Cc:* Tolga Ulas ; users@kannel.org > *Subject:* Re: MO Routing on the fly > > > > Dear All, > > Thank you for your advice. I have tried all of your suggestions but > cant get it to work like you say it should. > Without an smsbox-route, when ever an MO comes in I still get the > "WARNING: smsbox_list empty" warning. > Below my complete setup is below, what am I doing wrong? > > group = core > > admin-port = 13000 > > admin-password = ADMINPW > > status-password = STATUSPW > > smsbox-port = 13032 > > log-file = "/var/log/kannel/kannel.log" > > log-level = 5 > > box-allow-ip = "*.*.*.*" > > access-log = "/var/log/kannel/access.log" > > store-type = spool > > store-location = /var/spool/kannel/store > > smsbox-max-pending = 100 > > dlr-storage = "internal" > > sms-resend-freq = 1200 > > sms-resend-retry = 1 > > > > > > > > group = smsbox > > bearerbox-host = localhost > > bearerbox-port = 13032 > > sendsms-port = 13033 > > log-file = "/var/log/kannel/nosmscidsmsbox.log" > > log-level = 3 > > reply-emptymessage = "" > > http-request-retry = 2 > > http-queue-delay = 15 > > sms-length = 500 > > mo-recode=yes > > > > > > > > group = sms-service > > keyword = default > > catch-all=true > > omit-empty = true > > assume-plain-text = yes > > concatenation = true > > max-messages = 0 > > get-url = "my_gt_uri" > > > > > > group = smsc > > smsc = smpp > > smsc-admin-id = SMSC > > smsc-id = SMSC > > allowed-smsc-id = SMSC > > preferred-smsc-id = SMSC > > host = host > > port = port > > transceiver-mode = 1 > > smsc-username = USERNAME > > smsc-password = PASSWORD > > dest-addr-ton = 0 > > dest-addr-npi = 0 > > source-addr-ton = 0 > > source-addr-npi = 0 > > throughput = 30 > > enquire-link-interval = 30 > > log-file = /var/log/kannel/SMSC.log > > log-level = 0 > > system-type = "" > > > > > > > > > > > > > > > > > > > > On Mon, Apr 24, 2023 at 10:02 AM rm mobbis.am wrot
Re: MO Routing on the fly
Dear All, Thank you for your advice. I have tried all of your suggestions but cant get it to work like you say it should. Without an smsbox-route, when ever an MO comes in I still get the "WARNING: smsbox_list empty" warning. Below my complete setup is below, what am I doing wrong? group = core admin-port = 13000 admin-password = ADMINPW status-password = STATUSPW smsbox-port = 13032 log-file = "/var/log/kannel/kannel.log" log-level = 5 box-allow-ip = "*.*.*.*" access-log = "/var/log/kannel/access.log" store-type = spool store-location = /var/spool/kannel/store smsbox-max-pending = 100 dlr-storage = "internal" sms-resend-freq = 1200 sms-resend-retry = 1 group = smsbox bearerbox-host = localhost bearerbox-port = 13032 sendsms-port = 13033 log-file = "/var/log/kannel/nosmscidsmsbox.log" log-level = 3 reply-emptymessage = "" http-request-retry = 2 http-queue-delay = 15 sms-length = 500 mo-recode=yes group = sms-service keyword = default catch-all=true omit-empty = true assume-plain-text = yes concatenation = true max-messages = 0 get-url = "my_gt_uri" group = smsc smsc = smpp smsc-admin-id = SMSC smsc-id = SMSC allowed-smsc-id = SMSC preferred-smsc-id = SMSC host = host port = port transceiver-mode = 1 smsc-username = USERNAME smsc-password = PASSWORD dest-addr-ton = 0 dest-addr-npi = 0 source-addr-ton = 0 source-addr-npi = 0 throughput = 30 enquire-link-interval = 30 log-file = /var/log/kannel/SMSC.log log-level = 0 system-type = "" On Mon, Apr 24, 2023 at 10:02 AM rm mobbis.am wrote: > Hi Akamat. Sorry for late response. > > > > The point is that you organize routing outside kannel and inside your > script or your MO sms handler web application side. This gives you > possibility to implement sms-service with any difficulty. > > > > *Below are essential configs examples:* > > > > # -- SMSBOX GROUP -- > > group = smsbox > > bearerbox-host = localhost > > bearerbox-port = 19005 > > sendsms-port = 19555 > > log-file = "/var/log/kanpsms/smsbox.log" > > log-level = 3 > > access-log = "/var/log/kanpsms/smsbox-sms-access.log" > > sendsms-chars = "0123456789 +#._" > > reply-couldnotfetch = // If set, replaces the SMS message sent back to > user when Kannel could not fetch content // > > reply-couldnotrepresent = // If set, replaces the SMS message sent back > when Kannel could not represent the result as a SMS message// > > reply-requestfailed = // If set, replaces the SMS message sent back when > Kannel could not contact http service.// > > reply-emptymessage = "" > > http-request-retry = 2 > > http-queue-delay = 15 > > sms-length = 500 > > mo-recode=yes > > > > # -- SMS SERVICE -- > > group = sms-service > > keyword = default > > catch-all=true > > omit-empty = true > > assume-plain-text = yes > > concatenation = true > > max-messages = 0 > > get-url = //Link to your script// > > > > # -- SENDSMS USER GROUPS -- > > group = sendsms-user > > username = SMSC1 > > password = * > > user-deny-ip = "*.*.*.*" > > user-allow-ip = "” > > concatenation = true > > max-messages = 4 > > forced-smsc = SMSC-ID1 > > > > group = sendsms-user > > username = SMSC2 > > password = ** > > user-deny-ip = "*.*.*.*" > > user-allow-ip = "” > > concatenation = true > > max-messages = 4 > > forced-smsc = SMSC-ID2 > > > > group = sendsms-user > > username = SMSC3 > > password = *** > > user-deny-ip = "*.*.*.*" > > user-allow-ip = "” > > concatenation = true > > max-messages = 4 > > forced-smsc = SMSC-ID3 > > > > > > *Please note, that there is no smsbox-route config in my setup.* > > > > *Explanation* > > When kannel receives MO message it forwards received message to your > script. > > Message handling, processing, saving your message to related DB, > generating answer and also submitting reply/answer message to related SMSC > (using the *KANNEL’S *HTTP interface to send SMS messages) must be > implemented in your script or your MO sms handler web application side. > > > > *Best regards,* > > *Ruben Melikyan* > -- > > *From:* akamat sarat > *Sent:* Thursday, April 20, 2023 11:53:17 AM > *To:* rm mobbis.am > *Cc:* Tolga Ulas ; users@kannel.org < > users@kannel.org> > *Subject:* Re: MO Routing on the fly > > > > Do you mean something like the following? > group = sms-serv
Re: MO Routing on the fly
Do you mean something like the following? group = sms-service get-url = "http://get-url.com; catch-all = yes This kind of setup does not work without adding smsbox-route. smsbox-route is either short code or smsc-id specific. If you mean something else, can you write an example please? Than k you On Wed, Apr 19, 2023 at 9:32 PM rm mobbis.am wrote: > Hi Akamat, > > Honestly, I suspect that I do not fully understand your situation ( > because if I usnderstand you in right way, it has very obvious solution). > Thus if I understand your request correctly, you just need to: > >1. configure sms-service >2. set your script on apache or iis >3. use get-url or post-url and other sms-service related parameters >according your needs > > Thus you will have smsc independet script which will handle all your MO > requests especially if you set catch-all parameter to true. > > Best regards, > Ruben Melikyan > ------ > *From:* users on behalf of akamat sarat < > akamat.sa...@gmail.com> > *Sent:* Wednesday, April 19, 2023 7:32:45 PM > *To:* Tolga Ulas > *Cc:* users@kannel.org > *Subject:* Re: MO Routing on the fly > > Even though I could not figure it out, the smsc-id parameter is not > mandatory for the smsbox-route group. > Does this imply it can be SMSC independent if some other configuration is > properly applied? possibly. I've tested smsbox-route group without > specifying any smsc-ids and this did not work. > But I'm probably missing something. > > On Wed, Apr 19, 2023 at 7:28 PM akamat sarat > wrote: > > I figured out a way to set it up the way I need it to work. > So like I said, I wanted to route all MOs originating from all SMSCs to a > single script to handle all of them. > In my SMSc configuration I am using reroute-smsc-id to re-route all > incoming MOs to a single HTTP SMSc that will invoke my script. > The thing that kept me back is the preferred-smsc-id setting, because if > it is used in conjunction with reroute-smsc-id then reroute-smsc-id is > completely ignored without any mention of it in kannel logs. > > > > On Wed, Apr 19, 2023 at 7:12 PM Tolga Ulas > wrote: > > Not sure on top of my head whether it can be smsc independent, check with > the documentation in the related section of thart smsc-id part and > smsbox-route functioning in general. > Tolga Ulas > > > > On Wed, Apr 19, 2023 at 5:51 PM akamat sarat > wrote: > > Thank for coming back, you mean something like: > > group=smsbox-route > smsbox-id=mysmsbox > smsc-id=SMSC1; SMSC2; SMSC3... > > If so, this means that every time a new SMSC is added, I will need to add > it to the smsc-id's list in the above configuration. > After that I will need to restart kannel which I do not want to do. > If thats not what you mean can you write an example? > > Thank you. > > > On Wed, Apr 19, 2023 at 5:39 PM Tolga Ulas > wrote: > > Put a single route to a single smsbox which has a single service and > define all your smscs in the route as origin. > > Tolga Ulas > > > On Wed, Apr 19, 2023 at 5:22 PM akamat sarat > wrote: > > To all kannelers, > > I am trying to find a way to configure kannel so that all incoming > messages (MOs) from all SMSCs to go to the same script. > The problem is that i could not find a working solution that does not rely > on smsbox-routes > and it is not possible to add smsbox-routes on the fly. > > Any help would be appreciated > >
Re: MO Routing on the fly
Even though I could not figure it out, the smsc-id parameter is not mandatory for the smsbox-route group. Does this imply it can be SMSC independent if some other configuration is properly applied? possibly. I've tested smsbox-route group without specifying any smsc-ids and this did not work. But I'm probably missing something. On Wed, Apr 19, 2023 at 7:28 PM akamat sarat wrote: > I figured out a way to set it up the way I need it to work. > So like I said, I wanted to route all MOs originating from all SMSCs to a > single script to handle all of them. > In my SMSc configuration I am using reroute-smsc-id to re-route all > incoming MOs to a single HTTP SMSc that will invoke my script. > The thing that kept me back is the preferred-smsc-id setting, because if > it is used in conjunction with reroute-smsc-id then reroute-smsc-id is > completely ignored without any mention of it in kannel logs. > > > > On Wed, Apr 19, 2023 at 7:12 PM Tolga Ulas > wrote: > >> Not sure on top of my head whether it can be smsc independent, check with >> the documentation in the related section of thart smsc-id part and >> smsbox-route functioning in general. >> Tolga Ulas >> >> >> >> On Wed, Apr 19, 2023 at 5:51 PM akamat sarat >> wrote: >> >>> Thank for coming back, you mean something like: >>> >>> group=smsbox-route >>> smsbox-id=mysmsbox >>> smsc-id=SMSC1; SMSC2; SMSC3... >>> >>> If so, this means that every time a new SMSC is added, I will need to >>> add it to the smsc-id's list in the above configuration. >>> After that I will need to restart kannel which I do not want to do. >>> If thats not what you mean can you write an example? >>> >>> Thank you. >>> >>> >>> On Wed, Apr 19, 2023 at 5:39 PM Tolga Ulas >>> wrote: >>> >>>> Put a single route to a single smsbox which has a single service and >>>> define all your smscs in the route as origin. >>>> >>>> Tolga Ulas >>>> >>>> >>>> On Wed, Apr 19, 2023 at 5:22 PM akamat sarat >>>> wrote: >>>> >>>>> To all kannelers, >>>>> >>>>> I am trying to find a way to configure kannel so that all incoming >>>>> messages (MOs) from all SMSCs to go to the same script. >>>>> The problem is that i could not find a working solution that does not >>>>> rely on smsbox-routes >>>>> and it is not possible to add smsbox-routes on the fly. >>>>> >>>>> Any help would be appreciated >>>>> >>>>
Re: MO Routing on the fly
I figured out a way to set it up the way I need it to work. So like I said, I wanted to route all MOs originating from all SMSCs to a single script to handle all of them. In my SMSc configuration I am using reroute-smsc-id to re-route all incoming MOs to a single HTTP SMSc that will invoke my script. The thing that kept me back is the preferred-smsc-id setting, because if it is used in conjunction with reroute-smsc-id then reroute-smsc-id is completely ignored without any mention of it in kannel logs. On Wed, Apr 19, 2023 at 7:12 PM Tolga Ulas wrote: > Not sure on top of my head whether it can be smsc independent, check with > the documentation in the related section of thart smsc-id part and > smsbox-route functioning in general. > Tolga Ulas > > > > On Wed, Apr 19, 2023 at 5:51 PM akamat sarat > wrote: > >> Thank for coming back, you mean something like: >> >> group=smsbox-route >> smsbox-id=mysmsbox >> smsc-id=SMSC1; SMSC2; SMSC3... >> >> If so, this means that every time a new SMSC is added, I will need to add >> it to the smsc-id's list in the above configuration. >> After that I will need to restart kannel which I do not want to do. >> If thats not what you mean can you write an example? >> >> Thank you. >> >> >> On Wed, Apr 19, 2023 at 5:39 PM Tolga Ulas >> wrote: >> >>> Put a single route to a single smsbox which has a single service and >>> define all your smscs in the route as origin. >>> >>> Tolga Ulas >>> >>> >>> On Wed, Apr 19, 2023 at 5:22 PM akamat sarat >>> wrote: >>> >>>> To all kannelers, >>>> >>>> I am trying to find a way to configure kannel so that all incoming >>>> messages (MOs) from all SMSCs to go to the same script. >>>> The problem is that i could not find a working solution that does not >>>> rely on smsbox-routes >>>> and it is not possible to add smsbox-routes on the fly. >>>> >>>> Any help would be appreciated >>>> >>>
Re: MO Routing on the fly
Thank for coming back, you mean something like: group=smsbox-route smsbox-id=mysmsbox smsc-id=SMSC1; SMSC2; SMSC3... If so, this means that every time a new SMSC is added, I will need to add it to the smsc-id's list in the above configuration. After that I will need to restart kannel which I do not want to do. If thats not what you mean can you write an example? Thank you. On Wed, Apr 19, 2023 at 5:39 PM Tolga Ulas wrote: > Put a single route to a single smsbox which has a single service and > define all your smscs in the route as origin. > > Tolga Ulas > > > On Wed, Apr 19, 2023 at 5:22 PM akamat sarat > wrote: > >> To all kannelers, >> >> I am trying to find a way to configure kannel so that all incoming >> messages (MOs) from all SMSCs to go to the same script. >> The problem is that i could not find a working solution that does not >> rely on smsbox-routes >> and it is not possible to add smsbox-routes on the fly. >> >> Any help would be appreciated >> >
MO Routing on the fly
To all kannelers, I am trying to find a way to configure kannel so that all incoming messages (MOs) from all SMSCs to go to the same script. The problem is that i could not find a working solution that does not rely on smsbox-routes and it is not possible to add smsbox-routes on the fly. Any help would be appreciated
Missing delivery reports from SMSC dropping delivery reports
Dear All, Thank you for your replies. We are using kannel 1.4.5 with the following setup: sqlbox -> bearerbox -> smsc and connected in transceiver mode to SMSC. we are inserting into mysql send_sms table for sending. We are working with several SMSC and they where able to provide us with logs clearly showing that they have submitted a DLR to our kannel server and have received ACK from our kannel server. In the example below the final Deliver_sm WE DO NOT see in any of the logs (access or SMSC) once or ever and the DLR is stuck in dlr table with where ts = 150903932114 There aren't any errors in sql box logs (we are using mysql). We do not see any errors in SMSC logs except: "Could not parse DLR string sscanf way, fallback to old way. Please report!" I will reiterate that missing DLRs are happening intermittently about 25% of them are stuck in dlr table, and even with the error above 75% of them still come in normally. Also in the BB logs we have a lot of the following: " sms_router: handling message Routing failed, re-queued " Not sure if it is all connected or not ... Any help would be much appreciated! here is an example: ( sensitive parts were redacted) Our Submit_sm as logged on our server: 022-03-30 07:11:59 [9] [11] DEBUG: type_name: submit_sm 2022-03-30 07:11:59 [9] [11] DEBUG: command_id: 4 = 0x0004 2022-03-30 07:11:59 [9] [11] DEBUG: command_status: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: sequence_number: 8513 = 0x2141 2022-03-30 07:11:59 [9] [11] DEBUG: service_type: "" 2022-03-30 07:11:59 [9] [11] DEBUG: source_addr_ton: 5 = 0x0005 2022-03-30 07:11:59 [9] [11] DEBUG: source_addr_npi: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: source_addr: "srcaddr" 2022-03-30 07:11:59 [9] [11] DEBUG: dest_addr_ton: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: dest_addr_npi: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: destination_addr: "***" 2022-03-30 07:11:59 [9] [11] DEBUG: esm_class: 3 = 0x0003 2022-03-30 07:11:59 [9] [11] DEBUG: protocol_id: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: priority_flag: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: schedule_delivery_time: NULL 2022-03-30 07:11:59 [9] [11] DEBUG: validity_period: NULL 2022-03-30 07:11:59 [9] [11] DEBUG: registered_delivery: 1 = 0x0001 2022-03-30 07:11:59 [9] [11] DEBUG: replace_if_present_flag: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: data_coding: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: sm_default_msg_id: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: sm_length: 48 = 0x0030 2022-03-30 07:11:59 [9] [11] DEBUG: short_message: 2022-03-30 07:11:59 [9] [11] DEBUG:Octet string at 0x7ffb08002320: 2022-03-30 07:11:59 [9] [11] DEBUG: len: 48 2022-03-30 07:11:59 [9] [11] DEBUG: size: 50 2022-03-30 07:11:59 [9] [11] DEBUG: immutable: 0 2022-03-30 07:11:59 [9] [11] DEBUG: data: MY 2022-03-30 07:11:59 [9] [11] DEBUG: data: SHORT 2022-03-30 07:11:59 [9] [11] DEBUG: data: MESSAGE 2022-03-30 07:11:59 [9] [11] DEBUG:Octet string dump ends. 2022-03-30 07:11:59 [9] [11] DEBUG: SMPP PDU dump ends. As logged on their server 9:11:59.460 DEBUG @ [SMPPServer]: Read PDU [submit_sm seq 8513 status 0] - service_type='' source_addr_ton='5' source_addr_npi='0' source_addr='srcaddr' des t_addr_ton='0' dest_addr_npi='0' destination_addr='***' esm_class='3', protocol_id='0' priority_flag='0', schedule_delivery_time='', validity_period='', registered_delivery='1', replace_if_present= '0', data_coding='0', sm_default_msg_id='0', short_message='my short message', Their Submit_sm_resp as logged on our server (In dlr talbe there is pending dlr with ts =150903932114 ): 2022-03-30 07:11:59 [9] [11] DEBUG: type_name: submit_sm_resp 2022-03-30 07:11:59 [9] [11] DEBUG: command_id: 2147483652 = 0x8004 2022-03-30 07:11:59 [9] [11] DEBUG: command_status: 0 = 0x 2022-03-30 07:11:59 [9] [11] DEBUG: sequence_number: 8513 = 0x2141 2022-03-30 07:11:59 [9] [11] DEBUG: message_id: "150903932114" Their Deliver_sm as logged on their server *which we have no trace of*!: 09:12:07.737 DEBUG @ [SMPPServer]: Write PDU [deliver_sm seq 140444686 status 0] - service_type='' source_addr_ton='1' source_addr_npi='1' source_addr='' dest_addr_ton='0' dest_addr_npi='0' destination_addr='srcaddr' esm_class='4', protocol_id='0' priority_flag='0', schedule_delivery_time='', validity_period='', registered_delivery='0', replace_if_present_flag='0', data_coding='0', sm_default_msg_id='0', short_message='id:150903932114 sub:001 dlvrd:001 submit date:220330091159 done date:220330091203 stat:DELIVRD err: 000 text:DELIVERED', message_state='2' receipted_message_id='150903932114' 09:12:07.792 DEBUG @ [SMPPServer]: Read PDU [deliver_sm_resp seq 140444686 status 0] - message_id = ''
Missing delivery reports from SMSC dropping delivery reports
Dear Users, We are unable to debug an issue with SMSC having to do with delivery reports missing from SMSC over smpp bind. The connection to SMSC is working properly according to kannel logs. No obvious errors are visible in the logs. But we are missing delivery reports that SMSC is saying were delivered and ACKd by kannel. Specifically they are saying that they have 'CDRs state "Delivered Direct"' and that kannel ACKd the delivery report. We however cannot see it in kannel access logs or SMSC logs or in any logs. Having run tcpdumps we cannot locate it either. Any way to debug this issue that we are missing? Thanks, Akamat