Cisco Mediasense
Cisco Mediasense
RTP
On-demand
Query
MediaSense JSON
Subscribe
Client
Eevnts &
Application
metadata
Streaming
media
Downloaded
media
Application / MediaSense Integration
MediaSense Client APIs
• Design Goals
• Control, access, and manage MediaSense resources and features
• Allow easy client application development
• Web 2.0 (REST-like) Application Programming Interfaces
• API Structure
• Simple HTTPS URLs (HTTPS POST & GET)
• e.g. https://<host>:<port>/ora/queryService/query/getSessionByID
• Responses are returned in JSON format as a part of the HTTP Response body
• Security
• All APIs use HTTPS (except for events)
• Authentication is required to use the APIs
• User Authentication via CUCM
MediaSense Client APIs
• Synchronous Request/Response
• Requests via HTTPS GET or POST
• POST Requests and Responses in JSON form
• Asynchronous Events
• Symmetric Web Service mechanism
• Implemented as HTTP POST to the MediaSense Client
• Body in JSON form
Cisco
MediaSense
RTP
A B
Cisco Administrative XML
https://developer.cisco.com/site/collaboration/management/axl/overview/
CUCM
Client Authentication
• signIn
• https://<host>:<port>/ora/authenticationService/authentication/signIn
{
"requestParameters": {
"username": "<replace with your string>",
"password": "<replace with your string>" }
}
• signOut
• https://<host>:<port>/ora/authenticationService/authentication/signOut
API Client Hints in the SignIn Response
• These are instructions to the Search and Play application
• May be considered “hints” by any 3rd party client application
• Items are omitted if false or never configured by administrator
{
"responseCode": 2000,
"responseMessage": "Successful",
"archiveSearchEnabled" : < is a boolean >,
"inbrowserPlaybackEnabled" : < is a boolean >,
"lineNameDisplayConfig" : < is a boolean >,
"agentDataDisplayConfig" :
{
"loginIdDisplayConfig" : < is a boolean >,
"loginNameDisplayConfig" : < is a boolean >,
"firstNameDisplayConfig" : < is a boolean >,
"lastNameDisplayConfig" : < is a boolean >
}
}
Application Session Management
• JSESSIONID used to track authentication
• Via signIn API
• Cookie acknowledges authentication
• Included in Cookie name-value pair
• Session expires:
• When application explicitly logs out
• 30 minutes of inactivity
• (whichever comes first)
PCI and Privacy Controls
• PCI does not allow capture of personal information EVEN WHEN ENCRYPTED
https://www.pcisecuritystandards.org/documents/protecting_telephone-based_payment_card_data.pdf
• addSessionTag
• deleteSessionTag
Content Management
• Delete one or more recording sessions
• deleteSessions API
• Cannot delete an active session
RESPONSE
RTSP/1.0 200 OK
Server: Cisco MediaSense Media Server
CSeq: 5
Public: DESCRIBE, PLAY, SETUP, SET_PARAMETER, GET_PARAMETER, TEARDOWN, PAUSE, RECORD,
OPTIONS
Example: RTSP Authentication / Redirection
DESCRIBE (before authentication)
REQUEST
DESCRIBE rtsp://10.194.118.94/archive/e4137a336b0bf1 RTSP/1.0
CSeq: 6
User-Agent: LibVLC/1.1.9 (LIVE555 Streaming Media v2011.03.14)
Accept: application/sdp
RESPONSE
RTSP/1.0 401 Unauthorized
WWW-Authenticate: Basic realm="Secured Area"
CSeq: 6
Server: Cisco MediaSense Media Server
Example: RTSP Authentication / Redirection
DESCRIBE (with authentication)
REQUEST
DESCRIBE rtsp://10.194.118.94/archive/e4137a336b0bf1 RTSP/1.0
CSeq: 7
Authorization: Basic YXBpdXNlcjpjaXNjbw==
User-Agent: LibVLC/1.1.9 (LIVE555 Streaming Media v2011.03.14)
Accept: application/sdp
RESPONSE
RTSP/1.0 302 Moved Temporarily
Server: Cisco MediaSense Media Server
CSeq: 7
Location: rtsp://10.194.118.94:9554/archive/e4137a336b0bf1?token=abc123
NOTE: A token may include ^ character, which may or may not be considered a
legal URL based on conflicting RFC specifications. Client app must change to %2E
Example: RTSP Authentication / Redirection
DESCRIBE (after redirection)
REQUEST
DESCRIBE rtsp://10.194.118.94:9554/archive/e4137a336b0bf1?token=abc123 RTSP/1.0
CSeq: 8
User-Agent: LibVLC/1.1.9 (LIVE555 Streaming Media v2011.03.14)
Accept: application/sdp
RESPONSE
RTSP/1.0 200 OK
CSeq: 8
Content-Type: application/sdp
Content-Length=512
V=0
O=- 15237780159166911470 15237780159166912070 IN IP4 10.194.118.94
s=Cisco Live Media Streaming Session
Enhancements and Changes
• AgentInfo – Finesse gadget to collect agent metadata
• UCCX and UCCE
• Show example in S&P
• Retrieve list of all active sessions • All session queries must be time range limited
• Default 100, maximum 1000
• getAllPrunedSessions
• List of all system-deleted sessions
• getSessionsByDeviceRef
• Search by phone number, IP address or URI of device
• getSessionsByMediaType
• Valid types: Audio or Video
(“Video” means Audio+Video, but not audio-only sessions)
• getSessionsByTag
• Retrieve list of sessions based on content of tags
Playback and Live Monitoring
Built-In Media Player
• launchMediaPlayer
• HTTPS GET:https://<server>:<port>/ora/controlService/control/
• To play the session with the rtspUrl "13092154564622" in the Media Player:
• launchMediaPlayer?rtspUrl=rtsp://<server>/archive/2413e6746c8441
• Audio-only or Audio+Video
Requirements:
• Java p3 of user guide
• Browsers IE and FF. Chrome?
HTML5 Playback of Recordings
• Audio playback without Java media player (no Java download required)
• Leverage the browser’s native HTML5 capabilities
• 10.5 SU1 and later
HTML5 playback
window with
playback controls.
MediaSense S&P HTML 5 Playback
• HTML5 playback instead of using Java plug-in
• Using MP4 export and play with native browser playback
• Leverage native browser media features
Media and Access
Codec Client Access Built-in
Media Player
G.711 RTSP: streaming RTSP streaming
Mu-law, A-law HTTPS: RAW download
HTTPS: MP4 or WAV download
G.722 RTSP: streaming RTSP streaming
HTTPS: RAW download
HTTPS: MP4 or WAV download
G.729 RTSP: streaming RTSP streaming
HTTPS: RAW download except for Windows 64-bit Java
HTTPS: MP4 or WAV download
AAC-LD RTSP: --- Not supported
HTTPS: ---
HTTPS: MP4 or WAV download
H.264 RTSP: streaming RTSP streaming
HTTPS: ---
HTTPS: MP4 file download
NOTES:
• Capture exactly what is sent by endpoint, RTSP playback exactly what is captured
• Live monitoring supported via RTSP
Live Monitoring
Contact Center
Supervisor • Search for active recording sessions
• “Play” to monitor the call in real-time
Client
Application
Subscribe
Streaming
metadata
Eevnts &
media
1. 2. 3.
MediaSense
Asynchronous / Real-time Events
• Receive events based on session or platform activities
• Use subscriptionFilters to specify event types
• Start, End, Data Updated, Deleted by Application
• Deleted by System (pruned), Storage Thresholds
• subscribeToEvents
• Receive all or only specific events
• unsubscribeFromEvents
• Stop receiving all or only specific events
• verifySubscription
• Verify the subscription status
• Events use HTTP only
Asynchronous / Real-time Events
• sessionEvent
• Every time a recording session is initiated, updated or terminated
• tagEvent
• Every time a client or MediaSense itself adds or deletes a tag
• storageThresholdEvent
• Every time storage levels cross a warning or critical level
MediaSense API
Caller
Real-time or Post-Call Speech Analytics
Enterprise Analysis Agent Supervisor Analyst
Business Rules, Business
CRM data, etc.
Engine
Real-time events
MediaSense API
Playback from
MediaSense
MediaSense
Recording Session
Recording Session
[root@ccbu-sj-vm179 cluster-94]# ls –a
total 9064
drwxr-xr-x 2 root root 3985408 May 4 07:24 20140501
drwxr-xr-x 2 root root 3866624 May 7 19:45 20140502
drwxr-xr-x 2 root root 1404928 May 7 19:45 20140503
New Tab to
View and
Search
Archives
Search Archived
recordings by
participating
extensions.
Search Archive Using getArchiveSessions API
Recording Session
• Endpoints
• Extension
• Device ID Agent Information
• CUCM LineDisplayName UCCE
- firstName
• Time and Date - lastName
- loginId
- loginName
• Call IDs: UCCX (loginId will match loginName):
- lastName
• xRefCi (CUCM leg ID) - loginId
• Matches TAPI/JTAPI and CDR leg ID - loginName
(First name is not required and can be blank)
• Cisco-GUID (CUBE)
• Session ID
• Generated by MediaSense
Coordinating Metadata
• Many Sources of Metadata
• MediaSense / SIP, Finesse, UCCX, UCCE, CVP, CUCM
• Metadata depends on specific use case
• Call control method, components in call flow
• Real-Time vs. Historical Correlation
• Real-time: Use for pause/resume, tagging, live monitoring
• Historical: Use CUCM Call Detail Records (CDR) or other information sources
Coordinating Metadata
Metadata coordination mechanism Description
• Can involve associating call data with information from other systems
• Call flows typically determine how call segments can be correlated
View Call Associations
Supervisors can view all legs of the call
Call association available for all three recording topologies:
Built-in-Bridge CUBE-Dial Peer Forking CUCM-Network Based
Associations
show in a list
Typical Call Scenarios and Recording Method
UCCX / Non-CC UCCE
Call Type Call Flow Recording Method Recording Method
Inbound To Agent Built-in Bridge (NBR) Built-in Bridge (NBR)
CUBE (NBR) CUBE (Dial-Peer Forking)
CUBE (Dial-Peer Forking)
74
Call Association for CUBE and NBR Calls
•https://<host>:<port>/ora/queryService/query/getAssociatedSessions
{
"requestParameters":{
"sessionIdList" : [
(only one sessionId string permitted)
]
}
}
JTAPI
App
PSTN
Trunk
RTP audio
SIP signaling
JTAPI CTI
Call Flow
Inbound Call – CUCM Recording using Gateway
App JTAPI
PSTN
Trunk
RTP audio
SIP signaling
JTAPI CTI
Call Flow
Correlation of Recording Sessions: CUCM 10.x
Inbound Call – SIP Trunk via CUBE
• Recording session is controlled via IOS dial-peer
App
JTAPI
PSTN
Trunk
RTP audio
SIP signaling
JTAPI CTI
Call Flow
Inbound Call – SIP Trunk via CUBE with CVP
• Dial-peer recording control
App
JTAPI
PSTN
UCCE
Trunk
GUID from CTIOS
RTP audio
SIP signaling
JTAPI CTI
Call Flow
Correlation of Recording Sessions: CUBE Dial-peer
Call Correlation Details
• GUID is used by GWs and CUBE recording
• GUID and MediaSense CCID are the same
• Will carry across all segments of a single call
re-INVITE
• Calls still correlate Call segment 1 Call segment 2
• Search and Play
• Two successive but separate sessions CVP x1111 Agent x9999
SIP
• Different session IDs G.711 G.729
• Both share the same CCID/GUID
SessionID 123 SessionID 789
• Check with partner app
• Not all support correlating CCID 456 CCID 456
CUCM LineDisplayName
Agent Extension
Agent LoginID
Agent First and
Last Name
Agent Information via Finesse AgentInfo Gadget
Max Media Capacity = Recording + Playback + Raw Download + Live Monitor + Export
Recording has extra headroom to accommodate spikes
Recording capacity is shared across nodes in a cluster
Other media functions are on a per-node basis
• Email App
• Send a recording once a session ends
• Demonstrates use of events to monitor session activity
Sample: Client Tool
• Command-line Java application
• Exercise MediaSense APIs – use for troubleshooting
• Select and export content
• Single-session or bulk usage
• Code sample for basic functions
Sample: Email Application
• Send URI of recording session to email recipients upon end-of-session
• Demonstrates use of events to monitor a session
• Useful with on-demand and full-time recording
• Simple static configuration via XML
main/resources/conf/Config.xml
Documentation and
Resources
Further information
• Cisco MediaSense
• http://www.cisco.com/go/mediasense
• Cisco DevNet
• https://developer.cisco.com/web/mediasense
Call to Action
• Visit the World of Solutions for
• Cisco Campus
• Walk in Labs
• Technical Solution Clinics