Welcome to GotSpeech.NET Sign in | Join | Help
302 Redirect and Box-2-Box Testing

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.

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.

Prior to initiating the outbound call you need to subscribe to the Redirecting event of the TelephonySession object.

TelephonySession.Redirecting += new EventHandler<Microsoft.SpeechServer.RedirectingEventArgs>(TelephonySession_Redirecting);

Then in the TelephonySession_Redirecting event handler you tell it to accept the redirect.

void TelephonySession_Redirecting(object sender, Microsoft.SpeechServer.RedirectingEventArgs e)

    e.Action = Microsoft.SpeechServer.RedirectAction.TryAll;
}

Posted: Thursday, March 12, 2009 11:11 PM by ml_

Comments

Martial Trevett said:

This is interesting because I have not run into this issue.  I have an outbound IVR Testing app that makes a call to the inbound IVR application.

Normally, I have the IVR Test app and inbound app on multiple servers so that there won't be contention for resources, but I can also run both on the same server without issue.

Perhaps because I'm using a Dialogic as a gateway.  

# August 21, 2009 3:10 PM

ml_ said:

Correct, your gateway handles the redirect for you. This issue comes up when you have two speech server boxes connecting to each other directly as SIP Peers.

# August 22, 2009 3:32 PM
Anonymous comments are disabled