cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
381
Views
0
Helpful
3
Replies

Table name in SQL for partition

j.mccartney
Level 1
Level 1

If I wanted to do an SQL search in CUCM6.1.2 for calls made by a particular partition what would I use for table name?

The partition we have setup for some users is: pt-Hastings

So I was wondering how do I list my query:

run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber, duration, datetimestamporigination, datetimestampdisconnect, "partition(??)" from car:tbl_billing_data where "partiton" IN ('pt-Hastings')

1 Accepted Solution

Accepted Solutions

Steffen.Baier
Level 1
Level 1

Sorry, was to quick..You want CDR ...

Info:

callingPartyNumber = 5 Digit Extension Number of the Calling Party

originalCalledPartyNumber = 5 Digit Extension or Longdial Number with 0 for Access Code or 97xxx

finalCalledPartyNumber = 5 Digit Extension or Longdial Number with 0 for Access Code or 97xxx

originalCalledPartyNumberPartition = example P-Trunk-Select

callingPartyNumberPartition = example P-IPphones

finalCalledPartyNumberPartition = example P-Trunk-Select

origDeviceName = SEPxxxxxxxxxxxx 12 Digit in Capitals

destDeviceName = example S1/DS1-0@ukgre0b-107-cm3

Example:

select * from CallDetailRecord where callingPartyNumber='58999'

gives you exactly all calls made by calling Party 58999

select * from CallDetailRecord where callingPartyNumber like '5899%'

gives you calls made by the digits before the % and

any length behind it.

0004969% would cover all calls to Frankfurt Area Code Germany

select * from CallDetailRecord where finalCalledPartyNumber like '0004969713671_8'

would give you the exact range from

0->9 before the last digit

View solution in original post

3 Replies 3

Steffen.Baier
Level 1
Level 1

Have a look if you find it here:

select NumPlan.DNOrPattern as DirectoryNumber, Device.Name as DeviceName, Device.Description as

UserDeviceProfileName, Device.LoginUserid as UserId, DeviceNumPlanMap.Display as

DisplayIntCallerID,DeviceNumPlanMap.Label as LineTextLabel,numplan.alertingname as

AlertingName,DeviceNumPlanMap.MaxNumCalls, DeviceNumPlanMap.BusyTrigger,

TypeModel.Name AS PhoneType, DeviceNumPlanMap.E164Mask as ExtPhoneMask, NumPlan.CFADestination as

CallFWDALL, NumPlan.CFNADestination as CallFWDNoAnswer, NumPlan.CFBDestination as CallFWDBusy,

devicepool.Name as DevPoolName

from numplan, devicenumplanmap, devicepool, device ,TypeModel

where DeviceNumPlanMap.fknumplan = numplan.pkid

and DeviceNumPlanMap.fkdevice = device.pkid

and device.fkdevicepool = devicepool.pkid

and TypeModel.Name = 'Cisco 7970'

and numplan.tkPatternUsage = 2

order by numplan.DnOrPattern

Steffen.Baier
Level 1
Level 1

Sorry, was to quick..You want CDR ...

Info:

callingPartyNumber = 5 Digit Extension Number of the Calling Party

originalCalledPartyNumber = 5 Digit Extension or Longdial Number with 0 for Access Code or 97xxx

finalCalledPartyNumber = 5 Digit Extension or Longdial Number with 0 for Access Code or 97xxx

originalCalledPartyNumberPartition = example P-Trunk-Select

callingPartyNumberPartition = example P-IPphones

finalCalledPartyNumberPartition = example P-Trunk-Select

origDeviceName = SEPxxxxxxxxxxxx 12 Digit in Capitals

destDeviceName = example S1/DS1-0@ukgre0b-107-cm3

Example:

select * from CallDetailRecord where callingPartyNumber='58999'

gives you exactly all calls made by calling Party 58999

select * from CallDetailRecord where callingPartyNumber like '5899%'

gives you calls made by the digits before the % and

any length behind it.

0004969% would cover all calls to Frankfurt Area Code Germany

select * from CallDetailRecord where finalCalledPartyNumber like '0004969713671_8'

would give you the exact range from

0->9 before the last digit

Thanks for your help, I was able to get the query working from your posting. It works great!

Thanks again.

John

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: