Querry CDR for specific Calling number using CLI ?

Answered Question
Sep 30th, 2010

Is it possible to run a SQL querry for a perticular Calling number  or Called number from Callmanager 7 CLI ? 

Correct Answer by kusatija about 6 years 4 months ago

Yup,


Aaron mentioned should work.


Basically if you should focus on the query syntax and see what columns are there to get the output from the tables using sql.


Once you get the hang of that,  you can easily manupilate the queries to get desired results..


HTH

kunal

Correct Answer by Aaron Harrison about 6 years 4 months ago

Hi


You can use the 'like' keyword to enable wildcard matching, and the wildcard character is %


So for example:


All numbers starting with 55212448


run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber,datetimestamporigination from car:tbl_billing_data where originalcalledpartynumber like  '55212448%'

All numbers containing 55212448


run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber,datetimestamporigination from car:tbl_billing_data where originalcalledpartynumber like  '%55212448%'


Regards


Aaron


Please rate helpful posts...

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (5 ratings)
Loading.
kusatija Thu, 09/30/2010 - 14:55

Hello,


try this query from the cli of the publisher:


run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber,
datetimestamporigination from car:tbl_billing_data where originalcalledpartynumber = '911'


basically the feild after where is the one which we are getting the output for, it can calling party, called party, and the '911' means the number(calling or called); if you play around with it, i am sure you will get the hang of it, if you have any specific question, do let me know.


HTH

kunal

kusatija Thu, 09/30/2010 - 14:55

Also i am assuming CDR data is woking with out any issues in the cluster.


Regards

Kunal

rhegde Thu, 09/30/2010 - 18:28

Kunal,


Thanks for the reply.. I will test it tomorrow and let you know.


Rav

rhegde Thu, 09/30/2010 - 20:31

Kunal,


It worked just fine for perticular Called number. If I want to list all the calls originated from a perticular site, by its Calling number how should I formulate the querry. Can we list all the calls originated by a DID range begins with +55212448 ?


Thanks in advance,


Rav

Correct Answer
Aaron Harrison Fri, 10/01/2010 - 00:56

Hi


You can use the 'like' keyword to enable wildcard matching, and the wildcard character is %


So for example:


All numbers starting with 55212448


run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber,datetimestamporigination from car:tbl_billing_data where originalcalledpartynumber like  '55212448%'

All numbers containing 55212448


run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber,datetimestamporigination from car:tbl_billing_data where originalcalledpartynumber like  '%55212448%'


Regards


Aaron


Please rate helpful posts...

Correct Answer
kusatija Fri, 10/01/2010 - 01:03

Yup,


Aaron mentioned should work.


Basically if you should focus on the query syntax and see what columns are there to get the output from the tables using sql.


Once you get the hang of that,  you can easily manupilate the queries to get desired results..


HTH

kunal

Actions

This Discussion