CustomOutboundCall (Managed Code Sample)
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The CustomOutboundCall sample shows how to create a dialog application that takes a user-supplied phone number, calls the number, and determines whether the phone is answered, rings with no answer, or rings busy. If the phone is answered, a dialog application starts.
The sample application consists of a single StatementActivity whose MainPrompt is "Hello. Welcome to Speech Server." When this StatementActivity executes, the call has been answered and the outbound dialog application starts. The sample merely says "Goodbye."
If the phone rings with no answer, the calling application throws an Unreachable exception.
If the phone rings busy, the calling application waits for an application-specified amount of time (five seconds in the sample) and attempts to place the call again. If the call rings busy for an application-specified number of times (five times in the sample), the calling application throws a SIP.Busy exception.
Running the Sample
To run the sample
In the Samples\Workflow\CustomOutboundCall\ directory of the Speech Server installation directory, open the sample solution file.
To start debugging, press F5.
In the Voice Response Debugging Window dialog box, click the SIP Phone tab, and then click Outbound Trigger.
On the OutboundCallCampaign Trigger page, enter a phone number in the Phone Number box, and then click Send Trigger.
The following text appears: Trigger sent successfully.
Minimize the trigger page.
In the Incoming Call Control dialog box, click Answer.
The application responds with "Hello. Welcome to Speech Server. At this point, you know you have a connected call and your outbound dialog application begins. For this example, we just say Goodbye."
Remarks
This code sample is intended to demonstrate specific Speech Server features. It does not necessarily reflect best practices with respect to security and privacy. You should carefully review any code that you deploy in production for potential security risks and privacy issues.