voltier Posted January 28, 2016 Report Share Posted January 28, 2016 There is an example in there that involves getting 50 records. Is it possible to use Rest as a replacement to JSON to get full CDR records from server? Quote Link to comment Share on other sites More sharing options...
Vodia Telephone System Posted January 28, 2016 Report Share Posted January 28, 2016 There are two commands there: Get CDR count: {"action":"count-cdr-summary","start":0,"length":1000,"domain":true} And Get CDR records: {"action":"load-cdr-summary","start":0,"length":50,"domain":true,"user":"false","missed":"false"} The first one helps you determine how many there are. With the second one you can ask for any range. You can ask for all of them with length equal to the full count you got. I hope it helps. Quote Link to comment Share on other sites More sharing options...
voltier Posted January 28, 2016 Author Report Share Posted January 28, 2016 Thanks Snomonepbx, The context behind the question is we are trying to find a reliable/accurate way to retrieving all CDR records to be fed into our billing system. (PBX is a hosted instance). As i understand it (based on an old Snom One Administrators Guide), theres a number of ways to do it: CSV, email, Simple TCP, Soap/XML, Rest API, JSON. Right now we are using the CSV file stored on the Hosted PBX accessing the CSVs via FTP. We are wanting to remove this process by retrieving the data directly. Few follow up questions: Can CSV (file:) be sent externally For the methods listed above, how would the receiving CDR server know what CDRs are new only? i.e. not re-download the entire set of data (would it only retrieve the deltas) Are there any other permissions on the PBX that need to be enabled to ensure that the receiving CDR server is able to access the data Are there any examples or configurations documented anywhere that show how to configure the receiving CDR server Thanks. Quote Link to comment Share on other sites More sharing options...
Vodia Telephone System Posted January 29, 2016 Report Share Posted January 29, 2016 Well as you may seen in the CDR documentation found here: https://vodia.com/documentation/cdr You can write to a file the cdr folder on your server. Now giving access to that file and folder through http (on another port than the pbx http) or ftp from that server is up to you. Unfortunately not at this point. That part has to be managed by the receiving server as to what is new. But if you going to store the CDRs on a separate server, it would be a good idea to have them deleted automatically the PBX after a certain time to keep them short like for 7 days or so or even daily. Well you will have to know the login and password of the admin as that is necessary to login and get the sessionid before you are able to use the sessionid in the method I mentioned above for cdr retrieval. I am not sure what you are asking for here but in general it is up to you how to want to store the CDR's. Whether as files, as a database, as files in database. As you can see in the link above, we provide all kinds of CDR delivery depending on what kind of server the user wants to use, including mongoDB. You can also use webcdr (or json, jsons) to deliver the cdr that can be put in an SQL database. A very simple PHP example of which has been provided on the link given above, which is a very simple one and just to show how it can be done. You can implement it any way you want. I hope that helps. Thanks. Quote Link to comment Share on other sites More sharing options...
voltier Posted January 29, 2016 Author Report Share Posted January 29, 2016 Really appreciate your help Snomonepbx! In addition to your invaluable response, i did not know the vodia had a documentation section on its site. (i did not know about webcdr and mongodb and others - which is great!) Thanks again Quote Link to comment Share on other sites More sharing options...
Jonathan Posted April 4, 2016 Report Share Posted April 4, 2016 Well as you may seen in the CDR documentation found here: https://vodia.com/documentation/cdr You can write to a file the cdr folder on your server. Now giving access to that file and folder through http (on another port than the pbx http) or ftp from that server is up to you. Unfortunately not at this point. That part has to be managed by the receiving server as to what is new. But if you going to store the CDRs on a separate server, it would be a good idea to have them deleted automatically the PBX after a certain time to keep them short like for 7 days or so or even daily. Well you will have to know the login and password of the admin as that is necessary to login and get the sessionid before you are able to use the sessionid in the method I mentioned above for cdr retrieval. I am not sure what you are asking for here but in general it is up to you how to want to store the CDR's. Whether as files, as a database, as files in database. As you can see in the link above, we provide all kinds of CDR delivery depending on what kind of server the user wants to use, including mongoDB. You can also use webcdr (or json, jsons) to deliver the cdr that can be put in an SQL database. A very simple PHP example of which has been provided on the link given above, which is a very simple one and just to show how it can be done. You can implement it any way you want. I hope that helps. Thanks. Hi, Thanks for your explanation, I have gone through the example PHP code in the link you listed out. but I still little bit confused. As in the scenario that the CDR gonna be stored in a separate server, which will install mysql on it. In Vodia pbx, how do I put the CDR url? (is it possible to put json://mysqlserverIP/example.php)? If so, does vodia pbx will access the example php file in my separated server? Many Thanks! Quote Link to comment Share on other sites More sharing options...
Vodia Telephone System Posted April 4, 2016 Report Share Posted April 4, 2016 Yes that's the idea. The URL you give in the CDR setting, is what the PBX will access and the information. Thanks. Quote Link to comment Share on other sites More sharing options...
hsidhu Posted June 28, 2016 Report Share Posted June 28, 2016 Hello, I am working with these two rest commands Get CDR count: {"action":"count-cdr-summary","start":0,"length":1000,"domain":true} And Get CDR records: {"action":"load-cdr-summary","start":0,"length":50,"domain":true,"user":"false","missed":"false"} Here is the process i am using. I am logged in as extension user and than using session token with required (with POST method). But it returned me error - File json not found. Please ask your system administrator to check the log file. Thanks Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted June 28, 2016 Report Share Posted June 28, 2016 What is the exact path you are using? You can always check in the debug window of the browser how it should look like when you do the same thing in the web interface. Quote Link to comment Share on other sites More sharing options...
hsidhu Posted June 28, 2016 Report Share Posted June 28, 2016 Exact path is same as in user portal of vodia like http:://[ip]/json Got it i was missing Content-type Thanks for your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.