Internet telephony enables a wealth of new service possibilities. Traditional telephony services such as call forwarding, transfer, and 800 number services, can be enhanced by interaction with e-mail, Web, and directory services. Additional media types, like video and interactive chat, can be added as well. One of the challenges in providing these services is how to effectively program them. Programming these services requires decisions regarding where the code executes, how it interfaces with the protocols that deliver the services, and what level of control the code has. In this article we consider this problem in detail. We develop requirements for programming Internet telephony services, and we show that at least two solutions are required-one geared for service creation by trusted users (such as administrators), and one geared for service creation by untrusted users (such as consumers). We review existing techniques for service programmability in the Internet and in the telephone network, and extract the best components of both. The result is a common gateway interface that allows trusted users to develop services, and the call processing language that allows untrusted users to develop services.