GotUC.Net
GotUC.Net - your developer resource for Microsoft Office Communications Server
Deploying the Inbound Outbound BOT sample

Introduction

The GotUC.net developer sandbox is a fully functioning Office Communications Server environment where you can host BOT applications. In order to deploy the application in this document you most have a GotUC.net Sandbox account. Please read this blog post for more information:  GotUC.net Developer Sandbox Technical Overview

To deploy the IMEcho BOT application you will need the following items installed on your developer PC.
•    Visual Studio 2008 SP1
•    .NET Framework 3.5 SP1 
•    UCMA 2.0 SDK
•    Office Communicator Client (Optional)
•    Inbound Outbound BOT sample application

 

Inbound Outbound Sample Application Configuration

If you don't have the UCMA 2.0 SDK Installed on your PC, it can be found here:

(32 BIT)
http://www.microsoft.com/downloads/details.aspx?familyid=768efa33-6606-4b2b-809a-6c69274621d3&displaylang=en

(64 BIT)
http://www.microsoft.com/downloads/details.aspx?FamilyID=b20967b1-6cf5-4a4b-b7ae-622653ac929f&displaylang=en

The Inbound Outbound BOT sample application  can be downloaded here: http://gotuc.net/media/p/100.aspx

 

To get started open the Inbound Outbound BOT project in Visual Studio and open the App.config file.

VSScreen
 

You will need to modify the sections highlighted above there is no need to change the ocsServerFqdn or the Domain these settings are already configured for you in the sample.

You should use the user, password and sip address of account number two provided in your Account Activation email.

  • UserName
  • Password
  • SipUri

 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="userEndpointSettings" type="System.Configuration.NameValueSectionHandler"/>
  </configSections>

  <userEndpointSettings>
    <add key="ocsServerFqdn" value="ae.gotuc.net"/>
    <add key="userName" value="testuserbot"/>
    <add key="password" value="password"/>
    <add key="domain" value="gotuc"/>
    <add key="sipUri" value="sip:testuserbot@gotuc.net"/>
  </userEndpointSettings>
</configuration>



Once you have changed the App.config settings save your changes.
Now open the workflow1.xoml file in Visual Studio, This is the Windows Workflow for our sample application.

WorkflowFile

 

You should now see the Workflow loaded in Visual Studio.
Select the getPresenceActivity and view its properties by pressing F4 on your keyboard.

Workflow

 

In the property window change the Targets property value to the sip address of account number one provided in your account activation email !

Step1

Now we need to change the CalledParty property value for the imOutbound and voiceOutbound activities. Set these values to the sip address of account number one provided in your account activation email

calledparty

 

Just to be clear on the sip address configuration i have a screen shot of my GotUC account activation email.
If you are confused about which account to use and where this should help clarify things.

email

 

Now press F5 to debug the sample application and you should see the following screen.
All three steps should show complete once this is completed logon to Office Communicator or Communicator Web Access.

 vstoolbar

Once the application starts you will see a command window appear, All three steps should show completed if you configured your app.config file correctly and you are on the Internet.

cmdwindow  

In communicator type the name of your BOT user you received in your account activation email, you should see the contact appear. Start a conversation with this contact to test the BOT.

communicatorstep1

Make sure you Presence is set to Available for the first demo.

Communicator1

Start an IM conversation with your BOT account send over a text message, you should see an inbound IM message arrive from the BOT after pressing enter.

Communicator2

You can see the invite in the screen shot below.

IMMessage

 

Click on the invitation from the BOT and you should see a response in your IM window.

Communicator3

 

Now lets change our presence to Busy and start a new conversation with our BOT.This time the workflow will place an outbound AudioCall because the IfElseActivty has logic to place an outbound call instead of an IM message based on the status of my presence.This was done using the getPresenceActivity in our workflow.

 Communicator4

Start a new conversation and after pressing enter you should receive an Inbound call from the BOT. The BOT will speak a text to speech message and hang up.

Communicator2

Click on the incoming call request and you should hear the message. (You will need audio configured to hear it)

Inbound Call

 

This sample demonstrated an out bound IM and Voice call based on the status of a users presence. The trigger was my inbound IM message to the BOT but this could easily be triggered by a service application that monitors a database or even an email arriving in Exchange.

 

Please send any comments or questions to keith@gotuc.net


Posted 05-20-2009 1:53 PM by Keith Kabza

Comments

Tomislav Bronzin wrote re: Deploying the Inbound Outbound BOT sample
on 07-27-2009 1:55 PM

Nice one!

When I can expect accounts for accessing UC SandBox?

Thank you in advance!

Copyright © 2009 - GotUC.Net
Powered by Community Server (Commercial Edition), by Telligent Systems