[SR-Users] Prepaid billing solution for a service provider

Daniel-Constantin Mierla miconda at gmail.com
Fri Jan 6 11:17:04 CET 2012


Just to add here the option of using kamailio's dialog module to 
implement prepaid systems. It will be at signaling level (so no 
ivr/media capabilities), which can fit very well in many scenarios.

If it is the case of 1 call per user at a time, then practically can be 
done from kamailio config only. When call starts, compute the max 
duration for that call based on caller/destination (e.g., call a stored 
procedure via sqlops) and set the dialog timeout to that duration. When 
call ends (BYE in main route or timeout route) update the credit 
accordingly.

For many simultaneous calls, you can write a small module that uses the 
dialog API, to update the timeout of ongoing calls based on the costs 
for new calls.

Also, dialog module can be used as a controller of the signaling, being 
handled by an external billing engine. When a call starts, inform the 
billing engine about it. When there is no more credit, the billing 
engine can send MI/RPC command (e.g., via xmlrpc) to end the call.

Cheers,
Daniel

On 1/5/12 3:02 PM, Stoyan Mihaylov wrote:
> Prepaid is very simple task. User must put some money in his account. 
> User selects target. You calculate how long could be the call, and you 
> dial target.
> At the end of call - you calculate call, and you take money from user.
> Complications - recharging account. There are lot of problems there, 
> mainly with security.
> If you would like to allow your users to make more then 1 simultaneous 
> call.
> There are couple of things, you should decide:
> 1. If you plane to offer some specific solution - then you should 
> select opensource project, or you even should start from scratch.
> 2. You can look for problems with different solutions on market.
>
> "How I can choose the right solution" - mission impossible - in all 
> cases you will see later that there is may be some better solutions.
> Best you can do is to select more or less good solution which will do 
> job you need.
> Commercial products, in theory have better support. But they rely on 
> provider.
> As you see with Kamailio - free products can rely on provider 
> and community, and you can get paid support, you also can easily (more 
> or less) switch supporter.
> There are hosting solutions also, but I have no experience with them 
> at all.
> My main experience is with freelance support for Asterisk through ssh, 
> and this is why I cant help with freeswitch. Best advantage of 
> Asterisk (except I know it better) is it allows any language for AGI 
> scripts, and with them you can do everything.
>
> On Thu, Jan 5, 2012 at 3:42 PM, Carlo Dimaggio <jaasmailing at gmail.com 
> <mailto:jaasmailing at gmail.com>> wrote:
>
>     Hi Stoyan,
>
>     I prefer Freeswitch, but I know that Asterisk can do prepaid and
>     there are different prepaid solutions.
>     Anyway, as the prepaid server is a mission-critical component, I
>     would like to have your (and the community) opinion about the
>     preferred architecture and experiences about opensource/commercial
>     solution (advantages and drawbacks).
>     All the billing solution are good enough for a service provider
>     environment? How I can choose the right solution if all vendors
>     say that their solution is the best one? :)
>
>     Regards,
>
>
>
>     Il 05/01/12 13.18, Stoyan Mihaylov ha scritto:
>>     I can suggest using Asterisk for prepaid job.
>>     I mean you can use Kamailio and couple of Asterisk servers behind
>>     it to do prepaid. There are lot of prepaid solutions for
>>     Asterisk. But again, if I have to do it I will prefer my
>>     solution, or using parts from what is available.
>>     PS
>>     We did prepaid things for Asterisk.
>>
>>     On Thu, Jan 5, 2012 at 1:08 PM, Carlo Dimaggio
>>     <jaasmailing at gmail.com <mailto:jaasmailing at gmail.com>> wrote:
>>
>>         Hi all,
>>
>>         I'm working in a project for a service provider in which
>>         prepaid is an essential requirement. They have about 12000
>>         subscribers.
>>         The core infrastructure will be Kamailio+RTPProxy while I
>>         have some doubts about the prepaid feature. I'm thinking
>>         about a B2BUA (SEMS or Freeswitch) that is called if the user
>>         belong to a "prepaid group" and perform authorization and
>>         accounting; in this case the SIP flow could be: Kamailio ->
>>         B2BUA(Prepaid) -> Kamailio. Is a good choice?
>>
>>         At the moment I cannot estimate the effort needed to develop
>>         this section (base prepaid feature) of the project... Do you
>>         have some hints?
>>
>>         What are the prepaid solution implemented by you? Do you use
>>         your own developed solution or do you think that is better to
>>         choose a commercial solution (that provide also calling-card
>>         and other features)?
>>         I have seen some commercial products (Portabilling,
>>         Jerasoft/Bilberry, ...); what do you think about?
>>
>>
>>         Best Regards,
>>
>>
>>         _______________________________________________
>>         SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
>>         mailing list
>>         sr-users at lists.sip-router.org
>>         <mailto:sr-users at lists.sip-router.org>
>>         http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>
>>     _______________________________________________
>>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>     sr-users at lists.sip-router.org  <mailto:sr-users at lists.sip-router.org>
>>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120106/a741213f/attachment-0001.htm>


More information about the sr-users mailing list