Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
TIM Plus
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<div class="wiki-content"><h1>Overview</h1><p>Normally, to retrieve call audio recordings from TIM Plus, an authenticated web user must log in to the web interface, navigate to the desired call using the <span class="reference">Call View</span> screen or by running a report, click on the call, then play it using the built-in web-based call player.</p><p>It is also possible to programmatically retrieve call recordings using a two-step authenticated request process. This works in the following way:</p><ul><li>Obtain the <span class="keyword">datasource</span>, <span class="keyword">voicelocation</span> and <span class="keyword">voicefilename</span> values from the <img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3JlZmVyZW5jZW1hY3JvOkxhYmVsPWNhbGxzfQ&locale=en_GB&version=2" data-macro-name="referencemacro" data-macro-parameters="Label=calls"> table in the TIM Plus database for the call you want to retrieve.</li><li>Request a security token from TIM Plus, by authenticating using an authorised web user's login credentials</li><li>Request the call from the <span class="reference">Echo Service</span>, using the security token obtained above</li><li>Receive the call audio in WAV format, forcibly obfuscated if any such events apply to the requested call</li></ul><p>Below is an example code showing how to retrieve a voice recording from TIM Plus.</p><h1 class="pagetitle">C# example</h1><p>This is a very simple example of some <strong><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3JlZmVyZW5jZW1hY3JvOkxhYmVsPUMjfQ&locale=en_GB&version=2" data-macro-name="referencemacro" data-macro-parameters="Label=C#"> </strong>code to request a call's voice recording from TIM Plus. A more complex example would describe passing parameters in the class's constructor, for instance, but this should demonstrate the logic behind the procedure.</p><p>Use the following code to request a security token from TIM Plus, plugging in the appropriate values for the <span class="keyword">dataSource</span>, <span class="keyword">voiceFilename</span>, and <span class="keyword">voiceLocation</span> variables for the call you want to retrieve. These values can be obtained directly from the calls database table, reports, or web commands.</p><p>A security token in this context is a URL which is used to obtain the actual voice recording from the <span class="reference">Echo Service</span>.</p><table class="wysiwyg-macro" data-macro-name="code" data-macro-parameters="language=csharp|linenumbers=true|title=Simple call retrieval example" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6dGl0bGU9U2ltcGxlIGNhbGwgcmV0cmlldmFsIGV4YW1wbGV8bGluZW51bWJlcnM9dHJ1ZXxsYW5ndWFnZT1jc2hhcnB9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>using System; using System.Net; using System.Text; private class GetAudioFile { string dataSource = "3"; string voiceFilename = "344f91cf-ba35-48e4-8080-a80a3816f5e7"; string voiceLocation = "4"; string echoUrl = ""; using (WebClient client = new WebClient()) { client.Headers["User-Agent"] = "3rd-Party-Agent"; client.Credentials = new NetworkCredential("username", "password"); byte[] responseBody = client.DownloadData("http://enterprise.example.com/voice.wav?cmd=getvmsg&datasource=" + System.Uri.EscapeDataString(dataSource) + "recordingid=" + System.Uri.EscapeDataString(voiceFilename) + "voicelocation=" + System.Uri.EscapeDataString(voiceLocation) + "salt=" + System.DateTime.Now.Ticks); echoUrl = Encoding.UTF8.GetString(responseBody); } if (!string.IsNullOrEmpty(echoUrl)) { // Use another WebClient object to query the URL provided in "echoUrl" to retrieve the actual call recording... } } </pre></td></tr></table><p>Assuming the request was successful (and the response status was a <span class="keyword">200 OK</span>), the variable <span class="keyword">echoUrl</span> will now contain a full URL which you must request in a similar way, using another <span class="keyword">System.Net.WebClient</span> object.</p><p>The security token URL is valid for one minute (60 seconds).</p></div>
Attachments
Labels
Location
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced