Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

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

Re: sql query to find the transfered number

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

New Member

Re: sql query to find the transfered number

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.

Re: sql query to find the transfered number

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%'

143
Views
0
Helpful
3
Replies
CreatePlease to create content