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

sql query to find the transfered number

hi,

callmanager version is 4.1

i want to find the SQL query to find the calling number, called party and the number to which the call is transfered.

3 Replies 3

Adam Thompson
Level 4
Level 4

You should be able to use this query on the CDR database to find the information. The finalCalledPartyNumber would be where the call was transferred to.

select

callingPartyNumber, originalCalledPartyNumber,

finalCalledPartyNumber

from CallDetailRecord

If you want information for a specific phone number, you would want to add a where statement that gives the phone number you are looking for.

Example:

select callingPartyNumber,

originalCalledPartyNumber,

finalCalledPartyNumber

from CallDetailRecord

where originalCalledPartyNumber = '5551234'

Please rate post if helpful

Hi Adam,

Thanks for your reply.

I have this query and it will return all the called numbers but here how i will find the calls which came and got transfered to the PSTN numbers.

If you want to find all calls that were transferred to the PSTN, you could do something like the following.

Say all of your sites extensions start with a location code 555, you could build your query like this:

select callingPartyNumber,

originalCalledPartyNumber,

finalCalledPartyNumber

from CallDetailRecord

where finalCalledPartyNumber not like '555%'

or, if you DID range for your site is 555-123-(6000-7000), you could use this:

select callingPartyNumber,

originalCalledPartyNumber,

finalCalledPartyNumber

from CallDetailRecord

where finalCalledPartyNumber not like '5551236%'

and finalCalledPartyNumber not like '5551237%'

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: