With the release of 4.0(2) I've posted most of the example VB 6
projects that show how to administer your Unity server programmatically
directly through the SQL database running underneath Unity. Some of these
tools are offered in versions that work on 4.0(3) and later vs. 4.0(1)/4.0(2) -
I've done this since 4.0(3) offers a number of new views and options that allow
me to simplify the code quite a bit. This is part
of a larger effort to get a book on Unity out the door that includes, among
other things, a chapter on programmatically administering Unity - some of the
chapters for this book are slowly showing up over on the
Documents page. If you're currently running 4.0(1) I strongly
recommend you upgrade to 4.0(3) before delving too deep into the programmatic
admin examples. Several of the stored procedures and the off box licensing
capability and the like did not work properly in 4.0(1) and are necessary for
several of these examples. Head over the the Links
page for information on where to obtain 4.0(3) on line and how to get
temporary testing licenses if you need them.
All applications are written in VB 6 using SP5 and are designed and tested
against Unity 4.0(2) and later. We will NOT
help you out trying to make these work with earlier versions of Unity so please
don't ask. I can assure you, in most cases you will come to ruin tying to
do this - many improvements for such support were included in 4.0(2) which is
why we're starting there.
As long as you understand all liability rests with you and you alone, you are
free to use all or parts of these code samples for whatever purpose you like.
If you have code samples of your own you'd like to post I'd be more than happy
to take a look at what you have and post it if appropriate. If you have
ideas for other samples you'd like to see or improvements to existing ones, or
questions about existing ones, please drop a line in the Unity
forum.
|
Generating SA links Code (added 2/4/2003)
Help File |
Application that demonstrates how to construct
URLs to jump you right to any given call handler, subscriber, interview
handler, name lookup handler, location object, distribution list or
restriction table in the Unity SA. You can also jump to the Subscriber
SA page on another Unity server simply by passing in the correct server
name. This can be useful for leveraging the existing SA functionality
in your applications easily without having to do all the administration
front end yourself. We've used this technique in dbWalker, Audiotext
Manager and Global Subscriber Manager among others. Very handy. |
|
SQL Sample Queries Code
(Added 2/4/2003)
Help File |
Around a dozen sample queries for doing
everything from showing all subscribers in a dialing domain to locating all
active transfer rules for subscribers on the box to counting up all users
associated with each Class of Service in the system quickly. The source
code for this one is provided for style points but really what you want to
see is in the help file - the query strings themselves along with short
explanations for what they're doing. |
|
Call Handler Information Dump Code
(Updated 3/22/2003)
Help File |
Walks through the process of picking out most of
the useful
information about a call handler you see in the SA and dumping it out to a
text box for demonstration purposes. Shows how to filter out the rows
from all the tables for getting at the user input keys, transfer rules,
greetings and the like. |
|
Subscriber Information Dump Code
(Updated 3/22/2003)
Help File |
Pulls out most of the useful information
associated with subscribers from the UnityDB database that's not included in the above Call Handler Information
Dump. Dealing with notification devices, MWIs, alternate extensions,
COS assignments, private lists and the like are covered here. |
|
Remove Subscriber Properties Code (Added 2/27/2003)
Help File |
This is the code for a somewhat simplified version of the
"Remove Subscriber Properties" tool currently out here. It uses the
ADSI interface which provides something very similar to using ADO connection
to a standard database to navigate around the containers in AD and show
users, manipulate properties and the like. Most notably it shows how
to determine if an object in AD is a Unity subscriber or not and to remove
those properties such that they are no longer considered a subscriber. |
| Cisco Unity
Access Library (CUAL) (Updated 3/22/2003) |
You need to install these
files on your 4.0(2) server for the create, import, update and remote
connectivity examples below to function properly. Without these files
you can't hit the web pages and get license and server information necessary
to do these things from off box. This is not necessary with Unity 4.0(3) -
all the files are already there and ready to roll. This wont damage your Unity server - it's just
adding a few additional web pages that spit out some XML that contain the
information we need - it's harmless and well tested. |
| Creating Subscribers From Scratch
In AD Code (4.0(1) and 4.0(2)) (Updated 3/22/2003)
Help
file |
Make new subscribers and leverage the SQLSyncSvr
to create new AD/Exchange accounts for you without having to touch anything
other than the UnityDB SQL database. Deals with checking for available
licenses, the
asynchronous creation model and getting return codes to ensure your creation
attempt was successful.
Be sure to read the help file on this one
folks! For you guys testing this out on 4.0(1) you'll
want to upgrade to 4.0(2) and be sure to install CUAL (above) so you can
get at the licensing information from off box.
|
|
Creating Subscribers From Scratch
In AD Code (4.0(3) and later) (Added 11/4/2003)
Help
file |
Make new subscribers and leverage the SQLSyncSvr
to create new AD/Exchange accounts for you without having to touch anything
other than the UnityDB SQL database. Deals with checking for available
licenses, the
asynchronous creation model and getting return codes to ensure your creation
attempt was successful.
This version of the example code only works on Unity 4.0(3) and later.
|
| Importing Subscribers From AD Code
(4.0(2))
(Updated 3/22/2003)
Help File |
Make a standing mail enabled AD account a Unity
subscriber. Shows you how to check for available licenses, making sure
your extension is unique, how to kick of an SQL synch to the directory and
check for errors asynchronously - everything you need to write your own
import from AD application.
Be sure to read the help file on this one
folks! For you guys testing this out on 4.0(1) you'll
want to upgrade to 4.0(2) and be sure to install CUAL (above) so you can
get at the licensing information from off box.
|
|
Importing Subscribers From AD Code
(4.0(3) and later)
(Added 11/4/2003)
Help File |
Make a standing mail enabled AD account a Unity
subscriber. Shows you how to check for available licenses, making sure
your extension is unique, how to kick of an SQL synch to the directory and
check for errors asynchronously - everything you need to write your own
import from AD application.
This version of the example only works on 4.0(3) and later.
|
| Modifying Subscribers Code
(4.0(2))
(Added 3/22/2003)
Help File |
Using stored procedures to update subscriber properties and
dealing with synchronizing the data to the directory when necessary by
leveraging the SQLSyncSvr service.
NOTE: This is for Unity 4.0(2).
|
|
Modifying Subscribers Code
(4.0(3) and later)
(Added 11/4/2003)
Help File |
Using stored procedures to update subscriber properties and
dealing with synchronizing the data to the directory when necessary by
leveraging the SQLSyncSvr service.
NOTE: This is for Unity 4.0(3) and later.
|
| Deleting Subscribers Code
(Updated 11/4/2003)
Help File |
Shows how to delete a subscriber without corrupting the
database in the process. Also includes a special bonus feature for
you direct-API folks: shows you how to remove the directory and mail
accounts associated with a subscriber when you delete the subscriber
account - I get this request all the time and we can't do it in the SA for
various security reasons but you can do it yourself.
NOTE: This is for Unity 4.0(2) and
later |
| Attaching to Unity Remotely Code
(Updated 3/22/2003)
Help File |
Shows how to find all Unity servers on the network and
attach to the UnityDB database on one of those servers. Also includes
a technique to get at some basic Unity server data not available in SQL
(version info, licensing information, back end configuration etc.). This
requires the CUAL setup to have been run on your Unity 4.0(2) server to work
properly. NOTE: For you guys testing
this out on 4.0(1) you'll want to upgrade to 4.0(2) and be sure to install
CUAL (above) so you can get at the licensing and system information
from off box.
|
| Bridge
Log Parsing Code
(Added 2/4/2003)
Help File |
Some folks wanted to extend and customize the reports
offered by the Bridge Traffic Analyzer
so I ripped the parsing engine out and posted the code here. The
help file contains information about the data you'll find in the raw logs
and what you'll find in the two tables that end up in the Access 2000 database
created by this sample application. You can either do your own
parsing or use my engine and use the resulting tables for your own
reports/graphs/tables whatever. |
| Edit
Distribution Lists Code (Added 10/27/2003)
Help File |
This example shows how to create and delete public
distribution lists and add members to existing distribution lists as well as
push those changes to the Exchange 5.5/2000/2003 directory (AD) back end.
NOTE: This example only works with Unity
4.0(3) and later since the stored procedures used in this example did not
exist in earlier versions. This example also only works with Exchange
5.5/2000/2003 as the back end for Unity. |
| TTY WAV Maker
(added 4/1/2004) |
This is a simplified version of the TTY WAV Reader (which
is, itself, a simplified version of TTY Angel). This includes all the
details you'll need to take text and convert it into a WAV file that will
play on just about any TTY/TDD device we've tested. I ripped out all
the Unity specific stuff, logging, the help engine, localization and all
that good stuff and got it down to the bare bones. It takes a text
string you give it and converts it into a WAV file. That's about it.
You should be able to take this and do whatever you need with it. There's
nothing proprietary in here - it's all just simple WAV file construction.
Sorry, but I can't post code that shows how to go from a TTY WAV message
back to text - that includes some Cisco proprietary tone recognition logic
that I can't give away.
I may post an OCX for this out here that will let folks drop in a control
to do these types of conversions easily. |
| Send
Voice Mail via CDO (added 6/29/2004
Help File |
This example shows how to create a new email with a WAV
attachment and then set the extended MAPI properties on the message and
attachment that allow Unity (both the phone conversation and the VMO forms)
to treat it as a voice mail message. |