twiSQL is a project that is designed to make your SQL server integrate with the service offering of Twilio.com. In short this project will allow your Microsoft SQL server to place telephone calls and send text messages using a single line of user friendly SQL code. The project is delivered as a .net assembly and is integrated to the SQL server using a few supplied user defined functions.  Included in the current build of the project are methods to:
  • Send Text (SMS) Message - Asynchronous call that returns a status and unique message identifier.
  • Place Telephone Call - Supply the number to call, the text to say and the gender to read it in. The function will return to your SQL code a status and a unique call identifier. If you prefer you can provide a public URL to an MP3 file to play when the call is connected.
  • View Message - Using the unique identifier of a specific message the details of delivery and other metadata are returned in user friendly XML format.
  • View Call - Using the unique identifier of a specific call the details of the call and other metadata are returned in user friendly XML format.
  • Place Call Verify Human - This function allows you to place an automated call but only play the message you intend to play after the call recipient presses a key to verify they are on the line.
  • Place Call Verify Human Forward Option - Just like the above with the exception that you can give the caller an option to be bridged to a live operator. This works well if you need to reschedule an appointment as an example.
  • Place Call Verify Human Voicemail Option - Just like the above with the exception that you can give the caller an option to leave a voicemail which will be delivered to an agent via email.
Show Me Using the project is simple... lets send a text message using SQL server:
DECLARE @testResult varchar(max)
SELECT @testResult = dbo.msgTwilioSendText('11 Digit Recipient','11 Digit Sender','Test Message','ACCOUNT SID','AUTH TOKEN')
SELECT @testResult

How about placing a telephone call using SQL server and a text to speech engine:
DECLARE @testResult varchar(max)
SELECT @testResult = dbo.msgTwilioMakeCall(('11 Digit Recipient','11 Digit Caller','This is a test.','f','ACCOUNT SID','AUTH TOKEN')
SELECT @testResult

Curious?
The project is free to download and use with one restriction - it is speed limited to five seconds per function call. As a token of my appreciation those that choose to donate $50 USD to the cause will receive an uninhibited download to remove this speed restriction. 

This project, like all future projects, is being release with one financial goal in mind - the adoption of our daughter. If you would like to read more about this check it out here. Please consider sharing this link in effort to get the word out. The cause is good and the product works - please consider donating. This project has been a lot of fun to put together, and I hope it is of use to others.

Telephony integration does not have to be hard, and while the current build only implements a limited subset of the Twilio.com API the basic features are here to build a simple auto-dialer or notification delivery mechanism for any size business. If you need additional functionality that isn't presently supported let's talk about it and see what we can come up with to solve your problem. :
Copyright © 2014 Copyright 2010 by Austin Henderson