Hi All
I have a case logged with Microsoft and Im awaiting the results of their testing.
However when I ran the Lync Server 2010 Logging Tool I was able to capture a trace while calling a workflow which was configured with (among others) the following powershell command:
$prompt = New-CsRgsPrompt -AudioFilePrompt $audioFile
The trace is as follows:
(00000000002E949B)[7cc61f6e-bd46-19c7-58cd-d4ccaae63216] Handling an exception (System.ArgumentNullException: Value cannot be null.
Parameter name: alternateText
at Microsoft.Speech.Synthesis.PromptBuilder.AppendAudio(Uri audioFile, String alternateText)
at Microsoft.Rtc.Acd.Workflow.Activities.BusinessHoursActivity.OnCloseBusinessPromptTurnStarting(Object sender, SpeechTurnStartingEventArgs e)
at System.Workflow.ComponentModel.Activity.RaiseGenericEvent[T](DependencyProperty dependencyEvent, Object sender, T e)
at Microsoft.Rtc.Workflow.Activities.SpeechStatementActivity.OnTurnStarting()
at Microsoft.Rtc.Workflow.Activities.SpeechStatementActivity.StartSpeakAsync()
at Microsoft.Rtc.Workflow.Activities.SpeechStatementActivity.Execute(ActivityExecutionContext executionContext)
at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
at System.Workflow.Runtime.Scheduler.Run())
It seems that alternateText cannot be null. Next I tried:
$prompt = New-CsRgsPrompt -AudioFilePrompt $audioFile -TextToSpeechPrompt "Welcome to the help desk. Please hold."
This works as expected and the audio file is played. Although not documented it seems you must provide a text to speech string when using -AudioFilePrompt. Under what circumstances the text to speech is played I have no idea.
I came across this thread as I was trying to create an audio prompt for a workflow queue timeout. There are no options for this in the GUI therefore pressing save or confirm was not an option, it can only be done in powershell. Here is the powershell
code I used for this:
$audioFile = Import-CsRgsAudioFile -Identity "service:ApplicationServer:poolname.domain.com" -FileName "audio.wav" -Content (Get-Content C:\audio.wav -Encoding byte -ReadCount 0)
$prompt = New-CsRgsPrompt -AudioFilePrompt $audioFile -TextToSpeechPrompt "Sorry we cannot take your call"
$ca = New-CsRgsCallAction -Action TransferToVoiceMailUri -Prompt $prompt -Uri sip:address@domain.com
$q = Get-CsRgsQueue -Identity service:ApplicationServer:poolname.domain.com -Name "Queue Name"
$q.TimeoutAction = $ca
Set-CsRgsQueue $q
Julian