Querry CDR for specific Calling number using CLI ?

Answered Question
Sep 30th, 2010
User Badges:

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 10 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 10 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
User Badges:
  • Silver, 250 points or more

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
User Badges:
  • Silver, 250 points or more

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


Regards

Kunal

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

Kunal,


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


Rav

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

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
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

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
User Badges:
  • Silver, 250 points or more

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