Link between RemoteDestinationProfile and EndUser in the database

Version 1
    This document was generated from CDN thread

    Created by: Stephan Steiner on 15-12-2008 01:13:13 PM
    Does anybody know where that link is stored? A RemoteDestinationProfile is an entry in the deviceType with tkModel = 134, but my RDP has no entry in the table that links end users and devices (enduserdevicemap) nor in in any of the tables the CCM queries when I do a getRemoteDestinationProfile. Here's an example of what the CCM does when I use AXL to look up the RDP:

    2008-12-15 13:47:07,129 INFO [http-8443-Processor12] axl.AXLRouter - Received request 1227096838078 from sdkuser at IP 10.145.6.3
    2008-12-15 13:47:07,129 INFO [http-8443-Processor12] axl.AXLRouter - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <axl:getRemoteDestinationProfile xmlns:axl="http://www.cisco.com/AXL/1.0" xsi:schemaLocation="http://www.cisco.com/AXL/1.0 http://ccmserver/schema/axlsoap.xsd" sequence="1234"> <name>sste_Mobile</name></axl:getRemoteDestinationProfile> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
    2008-12-15 13:47:07,130 DEBUG [http-8443-Processor12] axl.AXLRouter - Getting service parameters...
    2008-12-15 13:47:07,160 DEBUG [http-8443-Processor12] axl.AXLRouter - AXL_ENABLE_ENCODINGINFO: F; AXL_NAMESPACE: T
    2008-12-15 13:47:07,175 DEBUG [http-8443-Processor12] axl.AXLRouter - Request is not a write request
    2008-12-15 13:47:07,176 INFO [http-8443-Processor12] axl6_1.Handler - Handler initializing
    2008-12-15 13:47:07,179 DEBUG [http-8443-Processor12] axl6_1.Handler - select paramvalue from processconfig where paramname = 'CheckForNamespaceInTag'
    2008-12-15 13:47:07,183 DEBUG [http-8443-Processor12] axl6_1.Handler - T
    2008-12-15 13:47:07,184 DEBUG [http-8443-Processor12] axl6_1.Handler - select pkid from device where my_lower(name ) =my_lower('sste_Mobile' )
    2008-12-15 13:47:07,187 DEBUG [http-8443-Processor12] axl6_1.RemoteDestinationProfileHandler - select device.ctiid, device.name, device.description, device.tkProduct, device.tkModel, device.tkClass, device.tkDeviceProtocol, device.tkProtocolSide, device.networkHoldMOHAudioSourceId, device.userHoldMOHAudioSourceId, device.ignorePI, device.ikdevice_primaryPhone, MOH.name as nMOHName, MOH1.name as uMOHName, CSS.name as callingSearchSpaceName, RERCSS.name as rerouteCallingSearchSpaceName, cgpnTCSS.name as cgpnTransformationCSSName, EU.userid as userId, DP.name as devicePoolName, DPD.tkStatus_CallinfoPrivate as callInfoPrivacyStatus from device, outer devicepool DP, outer callingsearchspace CSS, outer callingsearchspace RERCSS, outer callingsearchspace cgpnTCSS, outer MOHAudioSource MOH1, outer MOHAudioSource MOH, outer EndUser EU, outer DevicePrivacyDynamic DPD where DP.pkid=device.fkDevicePool AND CSS.pkid=device.fkcallingsearchspace AND RERCSS.pkid=device.fkcallingsearchspace_reroute AND cgpnTCSS.pkid=device.fkcallingsearchspace_cgpntransform AND MOH1.sourceid=device.userHoldMOHAudioSourceId AND MOH.sourceid=device.networkHoldMOHAudioSourceId AND EU.pkid=device.fkenduser_mobility AND DPD.fkDevice=device.pkid AND device.pkid= '9da080b2-7180-9215-c4cc-9b2aec064efb'
    2008-12-15 13:47:07,212 INFO [http-8443-Processor12] axl6_1.Handler - Product found in TypeTables
    2008-12-15 13:47:07,213 INFO [http-8443-Processor12] axl6_1.Handler - Model found in TypeTables
    2008-12-15 13:47:07,215 INFO [http-8443-Processor12] axl6_1.Handler - Class found in TypeTables
    2008-12-15 13:47:07,216 DEBUG [http-8443-Processor12] axl6_1.DeviceHandler - select DeviceNumPlanMap.*, RecordFlag.name as recordingFlag, RProfile.name as recordingProfileName, CSSMon.name as monitoringCSSName, D.tkProduct as product from DeviceNumPlanMap, outer device D , outer recordingprofile RProfile, outer callingsearchspace CSSMon, outer (recordingdynamic RD, outer typerecordingflag RecordFlag) where fkdevice='9da080b2-7180-9215-c4cc-9b2aec064efb ' and D.pkid=DeviceNumPlanMap.fkdevice and RProfile.pkid = devicenumplanmap.fkrecordingprofile and CSSMon.pkid = devicenumplanmap.fkcallingsearchspace_monitoring and RD.fkdevicenumplanmap=devicenumplanmap.pkid and RecordFlag.enum = RD.tkrecordingflag
    2008-12-15 13:47:07,276 DEBUG [http-8443-Processor12] axl6_1.DeviceHandler - select DMEM.*, EndU.userid as userId from DeviceNumPlanMapEnduserMap DMEM, outer enduser EndU where fkdevicenumplanmap='6bee545a-e467-925f-2ac8-5bebbcdf92d6' and DMEM.fkenduser=EndU.pkid
    2008-12-15 13:47:07,286 INFO [http-8443-Processor12] axl.AXLRouter - <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><axl:getRemoteDestinationProfileResponse xmlns:axl="http://www.cisco.com/AXL/API/6.1" xmlns:xsi="http://www.cisco.com/AXL/API/6.1" sequence="1234"><return><remoteDestinationProfile ctiid="64" uuid="{9DA080B2-7180-9215-C4CC-9B2AEC064EFB}"><name>sste_Mobile</name><description/><product>Remote Destination Profile</product><model>Remote Destination Profile</model><class>Remote Destination Profile</class><protocol>Remote Destination</protocol><protocolSide>User</protocolSide><callingSearchSpaceName>c_all</callingSearchSpaceName><devicePoolName>dp_Kloten</devicePoolName><networkHoldMOHAudioSourceId>1</networkHoldMOHAudioSourceId><userHoldMOHAudioSourceId>1</userHoldMOHAudioSourceId><lines><line index="1" uuid="{6BEE545A-E467-925F-2AC8-5BEBBCDF92D6}"><label/><asciiLabel/><display/><dirn uuid="{FC56A40A-4889-FBB3-FA44-1009139465C7}"/><ringSetting>Ring</ringSetting><consecutiveRingSetting>Use System Default</consecutiveRingSetting><ringSettingIdlePickupAlert>Use System Default</ringSettingIdlePickupAlert><ringSettingActivePickupAlert>Use System Default</ringSettingActivePickupAlert><displayASCII/><e164Mask/><dialPlanWizardId>0</dialPlanWizardId><mwlPolicy>Use System Policy</mwlPolicy><maxNumCalls>2</maxNumCalls><busyTrigger>2</busyTrigger><callInfoDisplay><callerName>true</callerName><callerNumber>false</callerNumber><redirectedNumber>false</redirectedNumber><dialedNumber>true</dialedNumber></callInfoDisplay><recordingFlag>Call Recording Disabled</recordingFlag><audibleMWI>Default</audibleMWI><speedDial/><partitionUsage>General</partitionUsage></line></lines><callInfoPrivacyStatus>Off</callInfoPrivacyStatus><userId>sste</userId><ignorePresentationIndicators>false</ignorePresentationIndicators><rerouteCallingSearchSpaceName>c_all</rerouteCallingSearchSpaceName><cgpnTransformationCSSName>c_all</cgpnTransformationCSSName><primaryPhoneName/></remoteDestinationProfile></return></axl:getRemoteDestinationProfileResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    2008-12-15 13:47:07,287 INFO [http-8443-Processor12] axl.AXLRouter - Request 1227096838078 was process in 239ms

    Now I figure the last SQL query should be the one that mentions sste anywhere.. but it doesn't.. and still the RDP returned has the proper userId set, so the CCM must've gotten it somewhere but that somewhere isn't anywhere in the queries it executes.

    Subject: Re: Link between RemoteDestinationProfile and EndUser in the database
    Replied by: Stephan Steiner on 15-12-2008 01:24:53 PM
    As usual, shortly after writing it all down I found the solution. If anybody is interested, the association is directly on the device. Here's an SQL query string to look up all RDPs belonging to the user sste

    SELECT d.name FROM device d WHERE tkmodel = 134 AND fkenduser_mobility = (SELECT pkid FROM enduser WHERE userid = '" + userId + "')'

    Subject: Re: Link between RemoteDestinationProfile and EndUser in the database
    Replied by: Wes Schochet on 06-01-2009 06:51:36 PM
    Thanks for posting this. It seems that there is some strange behavior here. If I send the phone name in the request, I get back essentailly a getPhone response with a
    <remoteDestinationProfile ctiid="133" uuid="{7BD1F096-56AC-311F-D1B4-97EE92D9A2D5}">

    added to it.

    If I send an actual remote destination profile name in the name tag, I do get the actual profile back frmo AXL, but that's partially what I was trying to find (by device name) in the first place. In any case, I sure don;t get the list of destinations which is what I'm after in the long run.

    Thanks for doing the schema research!

    Subject: Re: Link between RemoteDestinationProfile and EndUser in the database
    Replied by: Stephan Steiner on 07-01-2009 08:37:21 AM
    Can you post the two requests and responses (soap headers optional)? Using what I've posted my code is running just fine so I suspect there might be something off with your queries.