Trying to get cgrates working with opensips

379 views
Skip to first unread message

Gart Nilis

unread,
May 1, 2018, 11:38:50 AM5/1/18
to CGRateS
I read the documents about 100 times but they are quite cryptic.  


I downloaded the two config files from here.

I have OpenSIPS and CGrates talking to each other but at a loss what to do next.

I loaded the demo tarrif plan
https://cgrates.readthedocs.io/en/latest/tut_cgrates_usage.html#loading-cgrates-tariff-plans
cgr-loader -verbose -path=/usr/share/cgrates/tariffplans/tutorial
However, this command and various permutations of it does not work
cgr-console 'cdrstats_metrics StatsQueueId="*default"'
I have enabled cdrstats in the config file by adding
"cdrstats": {
 	"enabled": true,
 	"save_interval": "1m",
 },
and
cgr-console cdrstats_queueids
Shows queues.  That is as far as I got.  It is not clear to me what I need to do next.  It would be nice if there was a simple introductory tutorial showing all configs and commands line by line to walk a person through things.


Gart Nilis

unread,
May 1, 2018, 3:40:26 PM5/1/18
to CGRateS
Btw, adding the below lines to enable a required feature was not explained in the documentation.  It would be helpful if it was. 
"cdrstats": {
 	"enabled": true,
 	"save_interval": "1m",
 },

Dan B

unread,
May 2, 2018, 4:02:02 AM5/2/18
to cgr...@googlegroups.com
Gart,

It will help if you could try what are you trying to achieve. Are you looking to bill calls or compute stats for the calls?
As you would hopefully find out, CGRateS is quite versatile in what it does, the effort of maintaining the sources is not to be ignored so if the software communicates already with your OpenSIPS instance, we should be doing something right already.
Regarding docs, due to our limited resources and maybe talent in this regard, a large part of them was written by community members like you. If you find parts missing or incorrect docummented, please feel free to fork us on github and update the docs folder which goes straight up to live readthedocs documentation. For the parts which you don't understand, just post here your questions and we will do our best to help.

Thanks
DanB

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+u...@googlegroups.com.
To post to this group, send email to cgr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgrates/8b8a4c13-ea3c-4bc8-ad01-2ee775095794%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gart Nilis

unread,
May 7, 2018, 3:23:01 PM5/7/18
to CGRateS
I am just trying to get CGRates installed and working with the one and only tutorial I can find which seems to have important pieces of the puzzle missing.  It's very frustrating.

Actually doing something practical with it is light years away from where I am now because I can't even get past the basic install with what documentation is available.

Normally people install CGrates for billing calls.  I am trying to get the tutorial working and that tutorial describes how to bill calls.

Gart Nilis

unread,
May 7, 2018, 9:45:03 PM5/7/18
to CGRateS
Somehow I think I got the tutorial working.  It took days and a lot of head scratching.  It should not be this hard.  The tutorial loads the tariffs which helps a LOT, but the explanations are not so good sometimes.  Since the "Loading CGRatesS Tariff Plans" tutorial is common to all the different installs (Asterisk, Freeswitch, Kamailio, OpenSips) I think it is important that it is explained well.  

One of the more frustrating things is that the tutorial will often say to do something using cgr-console but then not show the command.  It seems to assume we have the commands memorized.  There should really be a list of common CLI commands somewhere. Especially since there is no viable GUI. I searched and could not find command listed.  using cgr-console --help dumps a large list but not very easily readable and the commands are often quite long and involved.

I know that someone may respond that it is open source and if we don't like it we should help improve it.  However, I am still trying to understand the basics.  Someday, if I understand things enough, I can perhaps improve the documentation.  I am not at that point yet.

A GUI would probably help a lot.  I know about cgratesadmin gui but the install instructions are, again, very cryptic, and there are no screenhots. 

Dan B

unread,
May 8, 2018, 2:37:39 AM5/8/18
to cgr...@googlegroups.com
Hi Gart,

Thanks for sharing. If you have any question on the tutorial files, please do not hesitate to ask.

DanB

Darren Williams

unread,
May 12, 2018, 5:36:45 AM5/12/18
to CGRateS
Though it can be a bit disheartening at first just persevere, the pieces very slowly fall into place.

If there were a proper CGRates book, I expect it would be a good 1000+ pages and growing all the time. The same goes for a GUI, because of the endless possibilities you cannot really have something generic it has to be built for your use case.

I still use a commercial GUI today for CGRates but I know it does not even scratch the surface of the available features.

Compared to the many open source billing systems out there, the engine that sits here is like comparing the latest rolls royce jet engines to something you knock together in your basement at weekend with chicken wire and plastic padding :)
Reply all
Reply to author
Forward
0 new messages