Welcome to GotSpeech.NET Sign in | Help
Blue Badge
I've been very lucky in my career so far. I've had the pleasure of working on some amazing software with many brilliant people over the years. And starting in two weeks, I'll be continuing that trend.

Starting at the end of the month, I'll be joining Microsoft. The official title is "Senior ISV Architect Evangelist" but, as with most titles, it doesn't really tell you much. Basically I'll be helping ISVs leverage the Microsoft stack. I'm excited because it means I'll...
Read More
Implementing InstanceDependencyProperty
If you were looking to the UCMA 3.0 documentation for information on how to use InstanceDependencyProperty, don’t. Its incomplete and what is there is incorrect.

In an effort to implement my custom activities in the same way as Microsoft, I wanted to ensure that property values didn’t get destroyed when you moved on to the next activity in your workflow. This is vital if you plan on returning values from a Workflow Activity for another Activity to make use of. For...
Read More
Building a New Record Audio Activity
One of the key activities missing from UCMA that we used in Speech Sever 2007 is the Record Audio Activity. This was one of my “go to” tools in the Speech Server arsenal, so I’ve been hurting without. So to eliminate my pain, and hopefully some other’s, I’ve started building a replacement.  While what I’ve built so far isn’t nearly feature-complete, it will hopefully provide a suitable starting point for those looking to simply record some audio. Trust me, starting...
Read More
UCMA 3 How-To: Inbound Call Throttling
Speech Server included a setting in the Administrator Console for inbound call throttling, simply set it and forget it. Here we’ll discus how we can accomplish graceful inbound call throttling with UCMA 3.0.

The basis for what we’re discussing here is covered in the prior article “Decline A Call”. We’ll extend this code such that it checks for the number of calls currently connected to the application and gracefully declines calls with a busy signal we’ve reached capacity.

One thing to understand...
Read More
UCMA 3 How-To: Decline A Call

In Speech Server we had an activity for declining a call. Typically this was used when you wanted to pull your application “off-line” for some reason. UCMA 3.0 doesn’t have this activity, but the Core API still has support for it.

Rather than declining the call within the Workflow, we’ll be declining the call prior to the Workflow starting. I’ll show how to do this using the out-of-the-box code you get when creating a new CommunicationWorkflow.

If you look inside Program.cs you’ll find the StartWorkflow() method. When we reach this point in the application we already have a “call” object which makes it trivial to Decline the call.

The default code looks like this:

   1: private static void StartWorkflow(Call call, SipRequestData requestData)
   2: {
   3:   Debug.Assert(call != null, "call != null");
   4:   Debug.Assert(call is AudioVideoCall || call is InstantMessagingCall,
   5:       "Only AudioVideoCall and InstantMessagingCall are subscribed to above.");
   6:  
   7:   WorkflowInstance workflowInstance = _workflowRuntime.CreateWorkflow(typeof(Workflow1));

We’ll insert our code starting at line 6, we’ll also add some intelligence so that it allows me to call from my developer line while rejecting everyone else.

   1: private static void StartWorkflow(Call call, SipRequestData requestData)
   2: {
   3:     Debug.Assert(call != null, "call != null");
   4:     Debug.Assert(call is AudioVideoCall || call is InstantMessagingCall,
   5:      "Only AudioVideoCall and InstantMessagingCall are subscribed to above.");
   6:     
   7:     if (!call.RemoteEndpoint.Participant.UserAtHost.StartsWith("1234@"))
   8:     {
   9:      call.Decline(new CallDeclineOptions(503));
  10:      return;
  11:     }
  12:     
  13:     WorkflowInstance workflowInstance = _workflowRuntime.CreateWorkflow(typeof(Workflow1));
  14: ...

A couple of tips:

  1. Take a look at the call object. It has a lot of interesting properties that let you make intelligent decisions about the call before your workflow has started.
  2. Make sure you use a SIP code (CallDeclineOptions) that your gateways understand and make sense. You don’t want to toss a BUSY HERE if it isn’t in fact BUSY.
Testing UCMA Applications

One of the first things you notice when you start developing UCMA is the lack of an integrated SIP Phone for testing your applications. Speech Server made it trivial to test out your application, simply press F5 and everything was ready to go. UCMA lacks the integrated environment so you’ll need a software phone of some kind to try out your app.

I have been using one called PhonerLite for years. It is freely downloadable from http://www.phonerlite.de/index_en.htm and works like a charm. The key reasons I like it is that it supports UDP/TCP/TLS is extremely simply to use and has a build-in debugger that shows you the SIP messaging (something that is extremely useful when your application simply doesn’t answer your call).

I would recommend going with the beta version (currently 1.85) at http://www.phoner.de/PhonerLiteBeta.zip. Unzip it someplace and run the PhonerLite executable.

image
Select “manual configuration”

image
Give yourself a user name (I always use “1234”)

image
image
Take the defaults for the next two screens

image
Select the “Configuration” tab and then the “Network” sub-tab

image
Change your Port to something unused and your connection type to TCP

image
Enter the SIP address for your app in the “Destination name” field and click the green phone icon and you’re off.

Workflow Differences in UCMA 3.0

The following is a list of activities from Speech Server 2007 and UCMA 3.0. UCMA brings with it a number of new activities (due mostly to UCMA handling both Speech and Instant Messaging) but it also drops a number of activities we’ve become used to having in Speech Server.

Speech Server 2007

UCMA 3.0

AnswerCall

AcceptCall

BlindTransfer

BlindTransfer

Command

SpeechCommand

ConsecutiveNoInputsSpeechEvent

ConsecutiveNoInputsSpeechEvent

ConsecutiveNoRecognitionsSpeechEvent

ConsecutiveNoRecognitionsSpeechEvent

ConsecutiveSilencesSpeechEvent

ConsecutiveSilencesSpeechEvent

DeclineCall

-

DetectAnsweringMachine

-

DisconnectCall

DisconnectCall

FormFillingDialog

-

GetAndConfirm

-

GoTo

GoTo

HelpCommand

SpeechHelpCommand

InvokeWorkflow

-

MakeCall

OutboundCall

Menu

-

NavigableList

-

QuestionAnswer

SpeechQuestionAnswer

RecordAudio

-

RecordMessage

-

RepeatCommand

SpeechRepeatCommand

SaltInterpreter

-

SetTaskStatus

-

SpeechSequence

CommunicationsSquence

Statement

SpeechStatement

Validator

-

VoiceXmlInterpreter

-

-

CallDisconnectedEvent

-

CallOnHoldEvent

-

CallOnHoldTimeoutEvent

-

CallRetrievedEvent

-

GetPresence

-

InstantMessagingStatement

-

InstantMessagingQuestioNAnswer

-

InstantMessagingCommand

-

InstantMessagingCommand

-

InstantMessagingHelpCommand

-

ConsecutiveNoInputsInstantMessageEvent

-

ConsecutiveSilencesInstantMessagingEvent

-

ConsecutiveNoRecognitionsInstantMessagingEvent

In the coming weeks I’ll be covering some workarounds to the missing activities.

Lync 2010 Released

Lync 2010 has hit RTM - http://blogs.technet.com/b/uc/archive/2010/10/27/microsoft-lync-released-to-manufacturing.aspx

New Version, New Name

The press releases went up a few minutes ago so I can finally share this.

The overly long winded name Microsoft Office Communications Server is no more. The entire product line (including Office Communicator) has been rebranded as “Lync”.

The new product line will include:

  • Lync 2010 (replaces Communicator)
  • Lync Server 2010 (replaces Office Communications Server)
  • Lync Online (replaces Communications Online)
  • Lync Web App (replaces Web Communicator)

You can read the full press release here: http://www.microsoft.com/Presspass/press/2010/sep10/LyncPR.mspx

UPDATE: The UC Team has released some more details on their blog http://blogs.technet.com/b/uc/archive/2010/09/13/introducing-microsoft-lync-the-next-ocs.aspx

2010 MVP Award

Today I received word that I had been awarded an MVP for Microsoft Communications Server again. I’m very excited about Unified Communications and the upcoming  Microsoft Communications Server “14”. I’ll be doing a lot of work and posting regarding UCMA 3.0 over the next few months. If you’re thinking about UC development its time to start boning up on UCMA, it is where all the Microsoft UC goodness is heading.

image001

Google Voice

Somewhat quietly Google opened up Google Voice to the public last week.

If you haven’t had the chance to try Google Voice, I suggest taking a look. For people like me, with multiple phone numbers and locations, its a killer app.

With Google Voice you get a single phone number that simultaneously rings all your phones (first one to answer wins) and you can quickly transfer calls between those phones.  I’ve had conference calls that started in my office that I seamlessly transferred to my cell and then to my home phone without anyone noticing a thing.

You can also place free outbound calls using the service for free in the US (no idea about other locations). I use this feature to dramatically reduce my home telephone bill, I dropped all local and long distance service from my land-line and simply use my browser to initiate all calls. And thanks to syncing my Outlook contacts with Google this is extremely simple to do.

Outbound IVR types should also be ready for Google Voice. Google seems to be accomplishing the simultaneous ring and transfer functionality by using a conference bridge as the core technology. While this is a pretty cool idea, it does present a problem for those of us attempting to detect answering machines. Essentially Google has answered the call long before the remote caller has answered the phone. Google Voice needs to be treated similarly to recipients who play music instead of standard ringing.

Communicating Between Workflow and VXML

When working with the VoiceXML Interpreter Activity the simple act of passing data between your Workflow and your VXML applications can be tricky to figure out. Hopefully this post will save someone the time I spent scratching my head the first time around.

Passing Data In

Lets say I want to pass “The dog is brown” to my VXML application so that is can in turn relay this very vital information to the caller.

Prior to VXML activity I’ll drop a Code activity with the following in its ExecuteCode method:

VXML.ApplicationData.Add("PassedInVar", "The dog is brown");

To access this data from within my VXML application I’ll need to reference both my variable name and the ApplicationData collection itself. For example:

<block>
  <prompt>
    <value expr="ApplicationData['PassedInVar']" />                
  </prompt>            
</block>
Passing Data Out

VoiceXML has a standard method of passing data out of an application using the <exit> tag (<exit namelist="SomeVar"/>).  Variables passed back via the “namelist” are stored as a Dictionary object in the ApplicationData collection.

Inside my VoiceXML application I’ll declare a Var and return it in my <exit> tag.

<block> 
    <prompt> 
        <value expr="ApplicationData['PassedInVar']" />                
    </prompt> 
    <var name="ReturnedVar" expr="'The cat is black'" />        
    <exit namelist="ReturnedVar"/> 
</block>

Once back in the Workflow I’ll extract the data from the ApplicationData collection’s $_exit_ element. I’ll drop a Code activity after the VXML activity with following in its ExecuteCode method:

UCMA 2.0 Tip: Communications Sequence Activity

I’ve been playing around with the UCMA 2.0 SDK for the last few weeks, mainly in preparation for the upcoming v.next release of Communication Server. For those interested in what comes after Speech Server it is a worthy endeavor to dig into the UCMA. Going forward the UCMA will be the tool we use. 

When I first started playing I made one simple mistake that left me scratching my head for longer that I’d like to admit. In an effort to help others avoid my mistake (and to remind me should I forget again):

With the UCMA, all of your activities must live within a Communications Sequence Activity.

With Speech Server the tools automatically provide you with a “parent sequence” in which all your activities live. With the UCMA this isn’t the case; you need to include it in your workflow. When you create a new project it provides this for you, just don’t be like me and think its ok to just delete it….

FTR, the exception I received was:

System.InvalidOperationException: 'Workflow1' does not have a value for Call property. Please specify a name that corresponds to a call in the CommunicationsWorkflowRuntime service

KB974571 Breaks OCS 2007 R2

I came back from vacation to find that I was unable to login to OCS. Turns out that an update installed on 10/14 broke the front-end services for OCS. The event log shows the following error:

The evaluation period for Microsoft Office Communications Server 2007 R2  has expired. Please upgrade from the evaluation version to the full released version of the product.

Uninstalling the KB974581 update corrected the problem.

Big thanks to Dietmar Kraume’s blog post at http://tinyurl.com/yjefeg9 for pointing to the solution.

SpeechTEK 2009

I’m going to be at SpeechTEK August 25th and 26th (Tues and Wed). If anyone in the GotSpeech community is attending, drop me a line. It is always nice to meet in person for a change.

More Posts Next page »