<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://gotspeech.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Speech Server', 'Troubleshooting', and 'Core API'</title><link>http://gotspeech.net/search/SearchResults.aspx?o=DateDescending&amp;tag=Speech+Server,Troubleshooting,Core+API&amp;orTags=0</link><description>Search results matching tags 'Speech Server', 'Troubleshooting', and 'Core API'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Avoiding Call Throttling on Outbound Calls</title><link>http://gotspeech.net/blogs/speakingfromtheedge/archive/2009/07/23/avoiding-call-throttling-on-outbound-calls.aspx</link><pubDate>Thu, 23 Jul 2009 14:06:36 GMT</pubDate><guid isPermaLink="false">ee4a8bf5-2c3f-4c6b-ae96-6f68de28010e:9209</guid><dc:creator>ml_</dc:creator><description>&lt;p&gt;&lt;a href="http://www.massivescale.com/blog_files/AvoidingCallThrottlingonOutboundCalls_8E27/image.png"&gt;&lt;img style="border-right-width:0px;margin:0px 5px 15px 15px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="right" src="http://www.massivescale.com/blog_files/AvoidingCallThrottlingonOutboundCalls_8E27/image_thumb.png" width="151" height="152" /&gt;&lt;/a&gt;One of the most common ways of queuing outbound calls with Speech Server is by using the built in MSMQ support. For the most part, using a message queue is extremely straightforward and easy to implement. But there is one gotcha – call throttling. &lt;/p&gt;  &lt;p&gt;When an outbound call fails to connect, Speech Server will start throttling down the number of messages it pulls from the queue. The assumption is that failures are the result of your system having insufficient capacity to handle the load. The more failures your have, the more it will throttle the load. This would be acceptable if it were not for two issues: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Almost any failure, even acceptable ones,&amp;#160; can result in throttling &lt;/li&gt;    &lt;li&gt;It will happy throttle you all the way down to 0, effectively shutting down your application &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Disabling call throttling needs to be done on a per-call bases by binding to the TelephonySession.OpenCompleted event prior to the MakeCall Activity. Typically I do this in a Code Activity at the very top of my workflow. &lt;/p&gt;  &lt;p&gt;Inside my initWorkflow Activity I bind to the OpenCompleted like so:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;font color="#0000ff" face="Courier New"&gt;TelephonySession.OpenCompleted += new EventHandler&amp;lt;Microsoft.SpeechServer.AsyncCompletedEventArgs&amp;gt;(TelephonySession_OpenCompleted);&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Then I use the following to disable throttling on any failure:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff" face="Courier New"&gt;void TelephonySession_OpenCompleted(object sender, Microsoft.SpeechServer.AsyncCompletedEventArgs e)        &lt;br /&gt;{         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (e.Error != null &amp;amp;&amp;amp; e.Error is SipPeerException)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SipPeerException sipEx = e.Error as SipPeerException;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sipEx.ShouldThrottleMsmqCalls = false;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }         &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>302 Redirect and Box-2-Box Testing</title><link>http://gotspeech.net/blogs/speakingfromtheedge/archive/2009/03/12/302-redirect-and-box-2-box-testing.aspx</link><pubDate>Fri, 13 Mar 2009 03:11:00 GMT</pubDate><guid isPermaLink="false">ee4a8bf5-2c3f-4c6b-ae96-6f68de28010e:8284</guid><dc:creator>ml_</dc:creator><description>&lt;P&gt;When testing Speech Server applications in our lab we often use what we call a “Box-2-Box” test. This is where we point two Speech Server instances at each other such that “Box A” makes an outbound call to “Box B” over the local LAN. This can be useful when load testing an the application beyond the number of physical ports you have available. &lt;/P&gt;
&lt;P&gt;One of the issues we ran into immediately however is that Speech Server issues a 302 Redirect upon answering a call to move the call to another TCP port. While most SIP endpoints will seamlessly handle the redirect, ironically the Speech Server MakeCall Activity isn’t one of them. Luckily there is a simple workaround to the issue. &lt;/P&gt;
&lt;P&gt;Prior to initiating the outbound call you need to subscribe to the Redirecting event of the TelephonySession object. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;TelephonySession.Redirecting += new EventHandler&amp;lt;Microsoft.SpeechServer.RedirectingEventArgs&amp;gt;(TelephonySession_Redirecting); &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then in the TelephonySession_Redirecting event handler you tell it to accept the redirect. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;void TelephonySession_Redirecting(object sender, Microsoft.SpeechServer.RedirectingEventArgs e) &lt;BR&gt;{&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Action = Microsoft.SpeechServer.RedirectAction.TryAll; &lt;BR&gt;} &lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description></item></channel></rss>