Creating IVR

We are running Lync 2010 and I am trying to create an IVR Workflow in PowerShell.  The reason I have chosen to use PowerShell is because in the UI you can only transfer to a queue.  I am wanting to transfer to a URI.  The problem I am having is that when I choose the call action of TransferToUri, TransferToPSTN, or TransferToVoicemailUri I get the following error:

New-CsRgsWorkflow : Cannot set the action to "TransferToUri" in this context. Specify one of the following actions and try again : "TransferToQueue, TransferToQuestion".
CategoryInfo : NotSpecified: (:) [New-CsRgsWorkflow], ArgumentException
FullyQualifiedErrorID : System.ArgumentException,Microsoft.Rtc.Rgs.Management.NewOcsRgWorkflowCmdlet

Has anyone else had this problem?

This is the script I am running:

$ServiceId = ""
$InvalidPrompt = New-CsRgsPrompt -TextToSpeechPrompt "I'm sorry, I did not catch that.  Please try again."
$PromptA1 = New-CsRgsPrompt -TextToSpeechPrompt "Policy ready correspondence may be Faxed to xxx-xxx-xxxx."
$ActionA1 = New-CsRgsCallAction -Prompt $PromptA1 -Action TransferToURI -Uri ""
$AnswerA1 = New-CsRgsAnswer -Action $ActionA1 -DtmfResponse 1
$PromptB1 = New-CsRgsPrompt -TextToSpeechPrompt "Claims correspondence may be Faxed to xxx-xxx-xxxx"
$ActionB1 = New-CsRgsCallAction -Prompt $PromptB1 -Action TransferToURI -Uri ""
$AnswerB1 = New-CsRgsAnswer -Action $ActionB1 -DtmfResponse 2
$PromptC1 = New-CsRgsPrompt -TextToSpeechPrompt "Applications may be faxed to xxx-xxx-xxxx."
$ActionC1 = New-CsRgsCallAction -Prompt $PromptC1 -Action TransferToURI -Uri ""
$AnswerC1 = New-CsRgsAnswer -Action $ActionC1 -DtmfResponse 3
$PromptQ = New-CsRgsPrompt -TextToSpeechPrompt "If calling with a question or request on an existing property or casualty policy, press 1. If you are calling about a claim, press 2. If you are an agent calling to bind coverage or if you are returning a call from us, press 3."
$Question = New-CsRgsQuestion -Prompt $PromptQ -InvalidAnswerPrompt $InvalidPrompt -NoAnswerPrompt $PromptQ -AnswerList ($AnswerA1, $AnswerB1, $AnswerC1)
$ActionWM = New-CsRgsCallAction -Action TransferToQuestion -Question $Question
$Workflow = New-CsRgsWorkflow -Parent $ServiceId -Name "IVR" -Description "Default Attendant" -PrimaryUri "" -LineUri "tel:510" -Active $true -Anonymous $true -DefaultAction $ActionWM

No Data
  • I read through the technet article and saw that they are only used for the Holiday / After Hours actions.

    I did find a work around for this.  It sure doesn't seem like you should have to do it this way, but it is working now.

    I used the transfer to queue option and then configured the Queue with a "dummy" group with one user and set the "Enable Queue Overflow" option with 0 as the "Maximum Number of Calls" and then I was able to use the send to SIP URI action.  This causes the call to immediately transfer to the SIP URI.  The only problem is that you have to create an excessive number of Queues to get the job done.  Hopefully they will fix this in the next release.

No Data