Welcome to GotSpeech.NET Sign in | Join | Help

Creating a Click to Call Application w/Speech Server (2007)

Cool application from Mr. Dunn!

 
 

Sent to you by Brandon Tyler via Google Reader:

 
 

via Search results for '"Speech Server"' by midunn@microsoft.com on 4/8/08

The term "Click to Call" is thrown around a bit to mean slightly different things. In this post I'm going to show you how to create a web based interface, in which end users can type thier name and phone number and have your Speech Server (2007) application call them.

This sounds more diffcult than it actually is. Speech Server (2007) uses MSMQ to place outbound calls, meaning that my website only has to write messages to MSMQ to trigger an Outbound Call in Speech Server. When I write items to MSMQ I just need to pass it parameters such as phone number to call, the person's name, etc..

Step 1
Create a Private Transactional Queue in MSMQ and give it a name.

Step 2
Create an ASP.NET Website with input fields for both Name and Phone Number, along with a Submit Button.


Step 3
Add the MSMQ to the Code Behind for the Submit button, using the name of the Queue you created in Step 1. Add a reference to System.Messaging

protected void btnCallNow_Click(object sender, EventArgs e)
{

string outboundInfo = string.Format("OutboundPhoneNumber={0}&Name={1}", this.tbNumber.Text, this.tbName.Text);

MessageQueue queue = new MessageQueue(@".\private$\OutboundCallMe");
Message message = new Message(outboundInfo);

 

MessageQueueTransaction transaction = new MessageQueueTransaction();

transaction.Begin();
queue.Send(message, transaction);
transaction.Commit();

}

Step 4
Create a Speech Server application which will read the values from the query string, and use them to place an outbound call.

You could have a Code Activity prior to the Make Call Activity which will set the value based on the Queue object, as well as set the statement prompt which will speak the person's name.

private void setOutbound_ExecuteCode(object sender, EventArgs e)
{

this.makeCall.CalledParty = QueryString["OutboundPhoneNumber"];
this.makeCall.CallingParty = "5554861";

this.sayWelcome.MainPrompt.SetText("Hello {0}", QueryString["Name"]);

}

Step 5
In the Speech Server Administrator Console, Set the Outbound Queue property to the name of Queue created in Step 1.


Very little Code to create a simple "Click to Call" web based application...


 
 

Things you can do from here:

 
 
Published Thursday, April 10, 2008 9:43 AM by brandontyler

Comments

# re: Creating a Click to Call Application w/Speech Server (2007)

This will also work for Speech Server 2004. I did this 4 years ago so that I had a test interface for my outbound app. I liked to be able to test just the Speech Server app while leaving all of the SQL Notification Services out of the picture.

Friday, April 11, 2008 10:28 AM by marshallharrison
Anonymous comments are disabled