Billing (Automatically add Credits for every MO received)

178 views
Skip to first unread message

Wakibi Chris

unread,
May 22, 2015, 3:39:03 AM5/22/15
to jasmin-sm...@googlegroups.com
Hello Jasminsms Community,

I just stumbled upon jasmine a couple of days ago, and, I must say its pretty impressive. I have Kannel background, but needed some functionality from Jasmin, for example billing. However, for my use case, I need each SMPP account to be added more credits each time an MO message is routed to their SMPP account. What is the best way to do this? I thought of going into the code and editing a few things maybe, but I guess I needed expert views first.

Thanks,
Chris

zoufou

unread,
May 22, 2015, 10:02:35 AM5/22/15
to jasmin-sm...@googlegroups.com, wak...@gmail.com
Hello Wakibi and welcome on board !

You can easily do this without touching Jasmin's source code, all messaging traffic is done on top of an AMQP message broker: RabbitMQ, this is the key for your case:
  • You have to write a third party program to consume (1) and get a real time event whenever a MO is received,
  • Your program will go and update the user's balance, in order to achieve this you can:
    • Make your program connect to jCli telnet console and do the action through the usual syntax,
    • Make your program connect to Perspective Broker and do the action through the low-level API (2),

Wakibi Chris

unread,
Jun 11, 2015, 8:12:37 AM6/11/15
to jasmin-sm...@googlegroups.com, wak...@gmail.com
Hi,

I have followed through, and I am actually using Perspective Broker. Working as expected, but there are a couple of questions that came up when I was doing my extensive testing.

1. JCLI, and PB API seem to be consuming details from different places in memory. i.e after updating the user balances, it does not get reflected in the JCLI side. Not until I persist it to disk, and then reload it through JCLI. I thought they both consume from the same memory, as Jasmin is run in-memory as per documentation. Or maybe it's me that's not loading it correctly to read from memory through PB API? In other words, how can I make JCLI and PB API be in sync (or have the same values) with out first persisting using PB API and then reloading using JCLI. I am asking this because for my use case, I am building a web GUI that will handle most of this work. So assuming a user is on the web GUI, and am logged in via JCLI, should they persist before me, my configurations will overwrite theirs!

2. When I change some parameters in the configuration file e.g persistence_timer_secs = 30 under [router] and authentication         = True under [jcli], I stop connecting to Jasmin, both through JCLI and PB API. Any clues on what am doing wrong?

Thanks,

zoufou

unread,
Jun 11, 2015, 8:35:51 AM6/11/15
to jasmin-sm...@googlegroups.com, wak...@gmail.com
Hello Wakibi,

I've created two issues where you can follow:
Reply all
Reply to author
Forward
0 new messages