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 <akamat.sa...@gmail.com>
Sent: Thursday, April 20, 2023 11:53:17 AM
To: rm mobbis.am <r...@mobbis.am>
Cc: Tolga Ulas <tolga.u...@tolgaulas.com>; users@kannel.org <users@kannel.org>
Subject: 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<http://mobbis.am> 
<r...@mobbis.am<mailto:r...@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 <users-boun...@kannel.org<mailto:users-boun...@kannel.org>> on 
behalf of akamat sarat <akamat.sa...@gmail.com<mailto:akamat.sa...@gmail.com>>
Sent: Wednesday, April 19, 2023 7:32:45 PM
To: Tolga Ulas <tolga.u...@tolgaulas.com<mailto:tolga.u...@tolgaulas.com>>
Cc: users@kannel.org<mailto:users@kannel.org> 
<users@kannel.org<mailto: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 
<akamat.sa...@gmail.com<mailto:akamat.sa...@gmail.com>> 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 
<tolga.u...@tolgaulas.com<mailto:tolga.u...@tolgaulas.com>> 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 
<akamat.sa...@gmail.com<mailto:akamat.sa...@gmail.com>> 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 
<tolga.u...@tolgaulas.com<mailto:tolga.u...@tolgaulas.com>> 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 
<akamat.sa...@gmail.com<mailto:akamat.sa...@gmail.com>> 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

Reply via email to