Internet telephony enables a wealth of new service possibilities. Tradition
al telephony services, such as call forwarding, transfer, and 800 number se
rvices, can be enhanced by interaction with e-mail, Web, and directory serv
ices. Additional media types, like video and interactive chat, can be added
as well. One of the challenges in providing these services is how to effec
tively program them. Programming these Services requires decisions regardin
g where the code executes, how it interfaces with the protocols that delive
r the services, and what level of control the code has. In this article we
consider this problem in detail. We develop requirements for programming In
ternet telephony services, and we show that at least two solutions are requ
ired - one geared For service creation by trusted users (such us administra
tors), and one geared for service creation by untrusted users (such as cons
umers). We review existing techniques for service programmability in the In
ternet and in the telephone network, and extract the best components of bot
h. The result is a common gateway interface that allows trusted users to de
velop services, and the Call Processing Language that allows untrusted user
s to develop services.