One embodiment of the present invention provides a system that facilitates
web service access to telephony functionality. During operation, the
system receives a request at a web service to access the telephony
functionality using a Voice Over Internet Protocol (VOIP) network. In
response, the system selects an interface to the VOIP network, routes the
telephony functionality to a public switched telephone network (PSTN),
and accesses the telephony functionality.