[Koha-devel] an SMS Send issue - wondering if it is possible to do with Koha

Indranil Das Gupta indradg at l2c2.co.in
Thu Oct 6 15:24:31 CEST 2022


Hi devs,

I have further explored the problem created by Indian federal rules
for SMS where each sms message template for every individual sender
requires to be pre-approved and registered with the country's SMS
anti-spam blockchain platform as DLT_TEMPLATE_IDs.

For Koha libraries in India this means each of our sms message
lettercodes e.g. CHECKOUT, CHECKIN, PDUE, ODUE, ODUE1 etc need to be
mapped against each library's DLT_TEMPLATE_ID for that specific
lettercode.

We can achieve this mapping using the YAML file (bug 13029).

I would like your advice as to which is the better option in the long term:

OPTION A :
Indicate lettercode to our custom send driver via C4::SMS->send_sms()
which being called from _send_message_by_sms($message) from
C4::Letters::SendQueuedMessages() and finally looking up the
DLT_TEMPLATE_ID for that lettercode from the YAML file.


OPTION B :
Place the DLT_TEMPLATE_ID (which are all equal length strings) with /
without an optional separator e.g. "^" before we start the actual
message template

Option A this will require C4/Letters.pm and C4/SMS.pm to be trivially
patched along with an additional syspref to enable / disable this
india specific feature and will require to undergo full bugzilla
workflow, but once/if accepted for release by the RM, it becomes part
of Koha. In case of option B, it's a quick-n-dirty hack without
requiring any bugzilla workflow but will remain susceptible to
possible code changes in Koha.


Indranil Das Gupta
L2C2 Technologies

Phone : +91-98300-20971
WWW : http://www.l2c2.co.in
Blog    : http://blog.l2c2.co.in
IRC     : indradg on irc://irc.freenode.net
Twitter : indradg

On Mon, 3 Oct 2022 at 03:17, Tomas Cohen Arazi <tomascohen at gmail.com> wrote:
>
> I'd say we could add a hook for plugins to inject variables for notices.
>
>
>
> El dom, 2 oct 2022 4:01, Indranil Das Gupta <indradg at l2c2.co.in> escribió:
>>
>> Hi all,
>>
>> I've written a new SMS::Send driver module for NIC SMS service (a
>> federal IT service provider to Govt agencies in India). It's working
>> fine on its own.
>>
>> India's current anti-spam rules demands that every message template
>> (e.g. "Dear member {#var#} you have checked out {#var#}") must have to
>> its unique 19 digit identifier mapped against the designated sender
>> (e.g. the library) in the federal blockchain system for SMS
>>
>> https://smsgw.sms.gov.in/failsafe/HttpLink?username=xxxx&pin=xxxxx&message=This
>> is a test message&mnumber=91XXXXXXXXXX&signature=sender_id&dlt_entity_id=xxxxxxx&dlt_template_id=xxxxxxx
>>
>> That last part - dlt_template_id will be different for each message
>> template mapped against a specific dlt_entity_id. The sender_id and
>> dlt_entity_id is easily taken care of via yaml (bug 13029).
>>
>> I can map the letter_code against dlt_template_id using the yaml, but
>> is there a way by which I can push it to SMS.pm?
>>
>> thanks in advance.
>>
>> --
>> Indranil Das Gupta
>> L2C2 Technologies
>>
>> Phone : +91-98300-20971
>> WWW : http://www.l2c2.co.in
>> Blog    : http://blog.l2c2.co.in
>> IRC     : indradg on irc://irc.freenode.net
>> Twitter : indradg
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org
>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : https://www.koha-community.org/
>> git : https://git.koha-community.org/
>> bugs : https://bugs.koha-community.org/


More information about the Koha-devel mailing list