As mentioned in item (1) above, WTAI functionality can be accessed via a URI link or via a WMLScript function call. The WTAI URI is defined as follows:
wtai://<library>/<function> (; <parameter>)* [! <result>]
where <library> refers to the type of function being called. Application developers will make use of the WTAPublic functions; therefore, the library "wp" will generally appear here. <function> is used to specify a function within the library. <parameter> refers to one or more parameters being passed to the function, while the optional <result> element specifies the WTA user-agent variable that may be set as a result of the function call. As an example, the following link would place a call to Tellme Networks' voice portal at 1-800-555-TELL:
<do type="accept" label="Tellme Networks"> <go href="wtai://wp/mc;18005558355"/> </do>
The WTAPublic WMLScript library also includes several functions that provide a telephony interface to WAP:
WTAPublic.makeCall(number) places a phone call.
WTAPublic.sendDTMF(dtmf) sends a DTMF tone sequence through the voice call most recently created using the WTAPublic.makeCall() function.
WTAPublic.addPBEntry(number, name) adds a new phonebook entry.
While the anchor/link metaphor works well if you're interested in connecting to some sort of back-end, voice-based information service (or simply placing a call to your best friend), WTAI can also be used to handle call acceptance. A class of functionality defined by the WTAI specification and known as Network Common WTAI Functions allows the WTA user agent that resides on the handset to also accept incoming calls and interact with the Wireless Application Environment (WAE). The WAE is basically WAP-speak for the browsing environment you're familiar with, so don't be too concerned with this new acronym! In this context, if the WTA user agent detects an incoming call, a WML/WMLScript form could be displayed in your browser, asking how you want to handle the call. Based on the capabilities of WTA that I introduced earlier, your options could include forwarding the caller to your voice mail, forwarding the caller to another number, or even (gasp!) answering the call yourself.