Chapter: Internet & World Wide Web HOW TO PROGRAM - Web Accessibility

| Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail |

CallXML

Another advancement in voice technology for people with visual impairments is CallXML, a technology created and supported by Voxeo (www.voxeo.com).

CallXML™

 

Another advancement in voice technology for people with visual impairments is CallXML, a technology created and supported by Voxeo (www.voxeo.com). CallXML creates phone-to-Web applications that control incoming and outgoing telephone calls. Some ex-amples of CallXML applications include voice mail, interactive voice response systems and Internet call waiting. While VoiceXML assists individuals with visual impairments by reading Web pages, CallXML provides individuals with visual impairments access to Web-based content through telephones.

 

When users access CallXML applications, a text-to-speech (TTS) engine reads infor-mation contained within CallXML elements. A TTS engine converts text to an automated voice. Web applications respond to the caller’s input. [Note: A touch-tone phone is required to access CallXML applications.]

 

Typically, CallXML applications play pre-recorded audio clips or text as output, requesting a response as input. An audio clip may contain a greeting that introduces callers to the application or to a menu of options that requires callers to make touch-tone entries. Certain applications, such as voice mail, may require verbal and touch-tone input. Once the input is received, the application responds by invoking CallXML elements such as text, which contain the information a TTS engine reads to users. If the application does not receive input within a designated time frame, it prompts the user to enter valid input.

 

When a user accesses a CallXML application, the incoming telephone call is referred to as a session. A CallXML application can support multiple sessions, enabling the appli-cation to receive multiple telephone calls at once. Each session is independent of the others and is assigned a unique sessionID for identification. A session terminates either when the user hangs up the telephone or when the CallXML application invokes the hangup ele-ment. Our first CallXML example shows the classic Hello World example (Fig. 34.8).

 

Line 1 contains the optional XML declaration.Value version indicates the XML version to which the document conforms. The current XML recommendation is version 1.0. Value encoding indicates the type of Unicode encoding to use. For this example we use UTF-8, which requires eight bits to transfer and receive data. More information on Unicode may be found in Appendix G, Unicode®.

 

 

    <?xml version = "1.0" encoding = "UTF-8"?>

 <!-- Fig. 34.8: hello.xml --> 4 <!-- The classic Hello World example -->

        <callxml>

        <text>Hello World.</text>

</callxml>


Fig. 34.8 Hello World CallXML example. (Courtesy of Voxeo, © Voxeo Corporation 2000–2001.)

 

The <callxml> tag on line 6 declares the contents of a CallXML document. Line 7 contains the Hello World text. All text that is to be spoken by a text-to-speech (TTS) engine needs to be placed within <text> tags.

 

To deploy a CallXML application, register with the Voxeo Community (commu-nity.voxeo.com), a Web resource for creating, debugging and deploying phone appli-cations. For the most part, Voxeo is a free Web resource. However, the company charges fees when CallXML applications are deployed commercially. The Voxeo Community assigns a unique telephone number to each CallXML application so that external users may access and interact with the application. [Note: Voxeo assigns telephone numbers to appli-cations that reside on the Internet. If you have access to a Web server (IIS, PWS, Apache, etc.), use it to post your CallXML application. Otherwise, open an Internet account using one of the many Internet-service companies (e.g., www.geocities.com, www.angelfire.com). These companies allow you to post documents on the Internet by using their Web servers.]

 

Figure 34.8 demonstrates the logging feature of the Voxeo Account Manager, which is accessible to registered members. The logging feature records and displays the “conversation” between the user and the application. The first row of the logging feature displays the URL of the CallXML application and the global variables associated with each session. The application (program) creates and assigns values to global variables at the start of each session, which the entire application can access and modify. The subsequent row(s) display(s) the “conversation.” This example shows a one-way conversation (because the application does not accept any input from the user) in which the TTS says Hello World. The last row shows the end of session message, which states that the phone call has ter-minated. The logging feature assists developers in debugging their applications. By observing the “conversation,” a developer can determine at which point the application ter-minates. If the application terminates abruptly (“crashes”), the logging feature states the type and location of the error, so that a developer knows the particular section of the appli-cation on which to focus.

The next example (Fig. 34.9) shows a CallXML application that reads the ISBN values of three Deitel textbooks—Internet and World Wide Web How to Program: Second Edi-tion, XML How to Program and Java How to Program: Fourth Edition—based on the user’s touch-tone input. [Note: The following code has been formatted for presentation pur-poses.]

 

    <?xml version = "1.0" encoding = "UTF-8"?>

 

 <!-- Fig. 34.9: isbn.xml --> 4 <!-- Reads the ISBN value of three Deitel books -->

    <callxml>

    <block>

<text>

Welcome. To obtain the ISBN of the Internet and World  Wide Web How to Program: Second Edition, please enter 1. To obtain the ISBN of the XML How to Program,

            please enter 2. To    obtain the ISBN        of the Java    How   

            to Program: Fourth   Edition, please         enter 3. To     exit the

            application, please enter 4.

            </text>

                       

            <!-- obtains the numeric value entered by the user and -->

            <!-- stores it in the variable ISBN. The user has 60   -->

            <!-- seconds to enter one numeric value -->

            <getDigits var = "ISBN"      

            maxDigits = "1"        

            termDigits = "1234" 

            maxTime = "60s" /> 

                       

            <!-- requests that the user enter a valid numeric            -->

            <!-- value after the elapsed time of 60 seconds  -->

            <onMaxSilence>     

            <text>

            Please enter either 1, 2, 3 or 4.     

            </text>           

                       

            <getDigits var = "ISBN"      

            termDigits = "1234" 

            maxDigits = "1"        

            maxTime = "60s" /> 

                       

            </onMaxSilence>    

                       

            <onTermDigit value = "1">

            <text>

            The ISBN for the Internet book is 0130308978.

            Thank you for calling our CallXML application.

            Good-bye.     

            </text>

            </onTermDigit>

           

            <onTermDigit value = "2">

            <text>

            The ISBN for the XML book is 0130284173.

            Thank you for calling our CallXML application.

            Good-bye.

            </text>

            </onTermDigit>

           

            <onTermDigit value = "3">

            <text>

            The ISBN for the Java book is 0130341517.

            Thank you for calling our CallXML application.

            Good-bye.

            </text>

            </onTermDigit>

           

            <onTermDigit value = "4">

 

            <text>

            Thank you for calling our CallXML application.

            Good-bye.     

            </text>

            </onTermDigit>

            </block>

 

            <!-- event handler that terminates the call -->

            <onHangup />

            </callxml>


Fig. 34.9 CallXML example that reads three ISBN values. (Courtesy of Voxeo, © Voxeo Corporation 2000–2001.)

 

The <block> tag (line 7) encapsulates other CallXML tags. Usually, CallXML tags that perform a similar task should be enclosed within <block>...</block>. The block element in this example encapsulates the <text>, <getDigits>, <onMaxSilence> and <onTermDigit> tags. A block element can also contain nested block elements.

 

Lines 20–23 show some attributes of the <getDigits> tag. The getDigits ele-ment obtains the user’s touch-tone response and stores it in the variable declared by the var attribute (i.e., ISBN). The maxDigits attribute (line 21) indicates the maximum number of digits that the application can accept. This application accepts only one char-acter. If no number is stated, then the application uses the default value—nolimit.

The termDigits attribute (line 22) contains the list of characters that terminate user input. When a character from this list is received as input, the CallXML application is noti-fied that the last acceptable input has been received and that any character entered after this point is invalid. These characters do not terminate the call; they simply notify the applica-tion to proceed to the next step because the necessary input has been received. In our example, the values for termDigits are one, two, three or four. The default value for termDigits is the null value ("").

 

The maxTime attribute (line 23) indicates the maximum amount of time to wait for a user response (i.e., 60 seconds). If no input is received within the given time frame, then the CallXML application may terminate—a drastic measure. The default value for this attribute is 30 seconds.

 

The onMaxSilence element (lines 27–37) is an event handler that is invoked when the maxTime (or maxSilence) expires. An event handler notifies the application of the appropriate action to perform. In this case, the application asks the user to enter a value because the maxTime has expired. After receiving input, getDigits (line 32) stores the value in the ISBN variable.

 

The onTermDigit element (lines 39–68) is an event handler that notifies the appli-cation of the appropriate action to perform when users select one of the termDigits characters. At least one <onTermDigit> tag must be associated with the getDigits element, even if the default value ("") is used. We provide four actions that the application can perform depending on the user-entered value. For example, if the user enters 1, the application reads the ISBN value of the Internet and World Wide Web How to Program: Second Edition textbook.

Line 72 contains the <onHangup/> event handler, which terminates the telephone call when the user hangs up the telephone. Our <onHangup> event handler is an empty tag (i.e., there is no action to perform when this tag is invoked).

 

The logging feature in Fig. 34.9 displays the “conversation” between the application and the user. The first row displays the URL of the application and the global variables of the session. The subsequent rows display the “conversation”—the application asks the caller which ISBN value to read, the caller enters 1 (Internet and World Wide Web How to Program: Second Edition) and the application reads the corresponding ISBN. The end of session message states that the application has terminated.

 

Brief descriptions of several logic and action CallXML elements are provided in Fig. 34.10. Logic elements assign values to, and clear values from, the session variables, and action elements perform specified tasks, such as answering and terminating a telephone call during the current session. A complete list of CallXML elements is available at:

 

www.oasis-open.org/cover/callxmlv2.html

 

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.