RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
240 stars 214 forks source link

Charging/Billing Plugin for RestComm #159

Open deruelle opened 9 years ago

deruelle commented 9 years ago

Currently there is no way to charge accounts for a given call or SMS or app installation from RAS. We can implement some API and plugin at RestComm level to interconnect with different billing systems the same way it is done for phone number provisioning.

deruelle commented 9 years ago

We can provide a few plugins out of the box such as H20, Meveo (for pure FOSS play) and to make sure the plugin SPI is correctly defined.

ivelin commented 9 years ago

Agree. The main questions is which ones to prioritize first? H20 is US focused. ElephantTalk claims strength in International Markets.

Is Meveo the leading FOSS option? http://www.cio.com.au/article/324595/5_open_source_billing_systems_watch/

ivelin commented 9 years ago

http://www.manaty.net/products/meveo-open-source-billing-system

deruelle commented 9 years ago

the website is http://meveo.info/

manaty commented 9 years ago

Hi,

We would be very interested to plug MEVEO to Restcomm. A possible integration could be : when a user account / subscription is created in meveo, this trigger a provisionning on Restcomm of a client and when an access point is created this creates an incommingPhoneNumber in Restcomm

When Restcomm terminate a call or a SMS it could call a service of meveo to charge it giving the event info and its incommingPhoneNumber.

If you can describe those events we could create a REST API.

ivelin commented 9 years ago

Sounds like a good start. We would have to see what scenarios make most sense to users of both systems.

The first two use cases make sense to me:

  1. When an account is created in Meveo, trigger provisioning of an account in Restcomm.
  2. When an access point is created in Meveo, provision a matching Phone Number in Restcomm.

As far as phone call and SMS event notifications, it may be overwhelming to issue external web service requests each time a CDR record is logged. We may start with a more traditional approach of Meveo sweeping CDR logs once an hour or so to generate the respective billing records in Meveo.

Restcomm has a REST API for retrieving call records, but it will be limiting to use that for billing at scale.

A next step could be integrating Restcomm and Meveo via Diameter, which is designed for this purpose. Restcomm can fire a Diameter datagram when a CDR is logged. Eventually we can look at pre-paid scenarios. Those can be driven by further market demand.

manaty commented 9 years ago

Yes it's a good plan. We will add Restcomm provisionning and mediation to the feature list of Meveo v3.3 (available next month), prepaid and realtime charging is schedule in 4.0 for mid-2015 Can Restcomm produce the CDR logs in our format : dateTime; quantity; accessId; param1...;param4 ? Could you provide a demo env that we could plug to Meveo demo env (http://demo.meveo.info) ?

deruelle commented 9 years ago

RestComm produces CDRs for Calls that have this format http://docs.telestax.com/restcomm-api-calls/ and for SMS http://docs.telestax.com/restcomm-api-sms-messages/. @gvagenas might be able to point you to the DB schema structure.

On the demo env, you can either download RestComm itself from https://mobicents.ci.cloudbees.com/job/RestComm/lastSuccessfulBuild/artifact/ or use the AMI on https://aws.amazon.com/marketplace/pp/B00FFHJ6SU, would that be enough for the integration ?

manaty commented 9 years ago

We succesfully integrated Meveo with Restcomm for provisionning of Accounts and PhoneNumbers (both in creation and update mode) using webhooks of Meveo 4.0 version. We will release a short tutorial for that part. Now about CDRs, it is not convenient that meveo calls an API to retrieve them, it would be better that Restcom either produce cdr files that can be transfered to meveo (for postpaid) , or call meveo realtime charging services (for prepaid) : any suggestion for that part ?

manaty commented 9 years ago

you can find the video here : http://youtu.be/8MQYIWm04vc

ivelin commented 9 years ago

Excellent work! Broadcasted on social media.

Would you please create a follow up screencast that showcases the billing strengths of Meveo:

If there are screencast for that already out there, please forgive my ignorance. Just point me to the links.

Finally, would you be interested in writing a guest blog post about it? If so, please send me your email and I will generate registration invitation to the Telestax blog.

Thank you,

Ivelin

ivelin commented 9 years ago

@manaty, just noticed your questions about CDRs for post-paid and Restcomm authorization requests for pre-paid.

Do you implement Diameter? We can integrate Restcomm with Meveo via the Diameter Charging Server or directly via jDiameter if that makes more sense. The Ro (pre-paid) and Rf (post-paid) interfaces are designed for the purpose. More efficient than moving around large chunks of CRD files: https://code.google.com/p/charging-server/

@ammendonca is the Diameter expert. He needs to chime in here.

manaty commented 9 years ago

Hi Ivelin

We don't currently implement diameter, we have a REST API for realtime charging. Might be not so difficult to implement your diameter stack if some people can help with testing.

Currently Restcomm do not create CDR files that we could transfer to Meveo ? that would allow me to complete the postpaid use case.

Best regards, Sebastien

On Feb 24, 2015, at 2:13 PM, ivelin notifications@github.com wrote:

@manaty, just noticed your questions about CDRs for post-paid and Restcomm authorization requests for pre-paid.

Do you implement Diameter? We can integrate Restcomm with Meveo via the Diameter Charging Server or directly via jDiameter if that makes more sense. The Ro (pre-paid) and Rf (post-paid) interfaces are designed for the purpose. More efficient than moving around large chunks of CRD files: https://code.google.com/p/charging-server/

@ammendonca is the Diameter expert. He needs to chime in here.

— Reply to this email directly or view it on GitHub.

manaty commented 9 years ago

Ivelin,

Yes i'll do the screencast as soon as i can get Restcomm CDRs, and i'm also interested in writing a guest blog post. please just use my manaty.net email

Best regards, Sebastien

On Feb 24, 2015, at 2:07 PM, ivelin notifications@github.com wrote:

Excellent work! Broadcasted on social media.

Would you please create a follow up screencast that showcases the billing strengths of Meveo:

Show how a call going through Restcomm is charged to a user in Meveo Pre-paid vs post-paid Invoice generation Agent commission allocation Pricing modes - tiered, graded, etc. Reporting, analytics, dashboard If there are screencast for that already out there, please forgive my ignorance. Just point me to the links.

Finally, would you be interested in writing a guest blog post about it? If so, please send me your email and I will generate registration invitation to the Telestax blog.

Thank you,

Ivelin

— Reply to this email directly or view it on GitHub.

vikasbo commented 7 years ago

@deruelle We can meet the requirements against a customized version of jBilling CE 4x. One can already process cdrs over rest/soap api on a customized version.

deruelle commented 7 years ago

@vikasbo very interesting. Can you sign the Contributor License Agreement at https://telestax.com/open-source/#Contribute and do a pull request for that work ?

Did you implement that as an external batch to process the CDRs in a post paid fashion or you implemented a real time engine with Diameter Ro for pre paid ?

netg5 commented 6 years ago

Dear Senior Dev So would you please give what would be better integration for 1 million /sec prepaid transaction handler is that jDiameter / API will be perfect suite for Telco ?