Developer Info ::
VIXML specs ::
FAQ ::
VIXML examples ::
VIXML previewing ::
HTTP API scripts ::

Frequently Asked Questions



What happens if I make a voice call to a video IVR number?

Applications can be configured to either ignore or answer voice calls. If they choose to answer them, only the audio components of the VIXML document will be processed. Keypad interaction will be the same as usual. Note that the application will receive a flag notifying it that a voice call is taking place, and may choose to behave differently as a result.



How do I edit an XML document?

XML documents can be created directly with a regular text editor such as vi. However, numerous dedicated XML editors exist, such as Eclipse and oXygen, which can also perform validation using the schema VIXMLSchema.xsd.



How do I put comments in a VIXML document?

Anything appearing between <!-- and --> in an XML document is treated as a comment. For example

    <vixml>
      <!-- This is a comment -->
      <text>This is some text</text>
    </vixml>


How do I produce XML from a PHP script?

Ensure that your PHP script executes the following line before producing any output.

    header ("Content-Type: text/xml");


How do I play a video clip?

The easiest way to install a video clip is via the Content Management System (CMS).

  1. Log in through http://www.vivatel.com.au
  2. Select CMS from the left menu
  3. Upload your video clip (in any format) via the Upload file interface
  4. The file will now be uploaded to your home directory. Click the transcode link that appears next to it
  5. The transcode interface will create a playable file for you. To make it play by default when a call is answered, save the VIXML output to home.xml



How do I host my application on the Vivatel server?

If you choose to host your application on the Vivatel server you will be issued with a username and password. For example, username megacorp01, password MYPASSWORD.

To upload files to the Vivatel server, either use the Content Management System (CMS), or ftp to gateway.vivatel.com.au with the username and password provided.

Suppose you uploaded a file home.php. The internal URL for that page is http://gateway/megacorp01/home.php. This is the URL you use when configuring the start page for your application, and also when using the VIXML previewer.

The external URL will be http://gateway.vivatel.com.au/private/megacorp01/home/php, and will require your issued username and password to view it.

When hosting on the Vivatel server you will also be provided with a MySQL database named after your account. To access the database externally, connect to gateway.vivatel.com.au with the username and password provided. For example

    mysql -h gateway.vivatel.com.au -u megacorp01 -pMYPASSWORD megacorp01

To access the database locally from a PHP script, connect to the host dbhost. For example

    $db = mysql_connect ("dbhost", "megacorp01", "MYPASSWORD");
    mysql_select_db ("megacorp01", $db);


How do I capture video from a phone?

The following collection of three VIXML scripts shows how to capture a video call. Recording starts when the caller presses 1, and stops when they press #.

The first script start.xml is the starting point, and gives instructions on how to proceed.

    <vixml>
      <link keys="1" url="record.xml" />
      <text halign="centre" valign="centre" wordWrap="true">Press 1 to start recording</text>
    </vixml>

The second script record.xml starts the capture. The requested video format is video/x-msvideo, otherwise known as avi. The script capture.php (see below) will be notified. It is responsible for downloading and processing the stream.

    <vixml>
      <link keys="#" url="stop.xml" />
      <capture url="capture.php" contentType="video/x-msvideo" />
      <text halign="centre" valign="centre">Now recording. Press # to stop.</text>
    </vixml>

The final script, stop.xml, ends the capture and hangs up after a second.

    <vixml>
      <capture url="" />
      <text halign="centre" valign="centre">Done</text>
      <timeout delay="1000" url="system://hangup" />
    </vixml>

The following PHP script capture.php is notified as soon as capture begins. It downloads the video and e-mails it off. For a more complex example that allows the captured video to be played back on a phone, see the examples page.

    <?php
        $contentType = $_GET["contentType"];
        $body = file_get_contents ($_GET["url"]);

        $headers = "MIME-Version: 1.0\r\n"
                . "Content-type: $contentType\r\n"
                . "Content-Transfer-Encoding: base64\r\n";
        mail ("you@yourcompany.com", "Captured video",
                chunk_split (base64_encode ($body)), $headers);
    ?>


How do I display live streaming video?

The best way to stream video from a remote URL is with a conference call. Not only does this conserve bandwidth, but it also means that only the first caller will have to wait while the stream is buffered. Additional callers will connect immediately.

    <vixml>
      <text halign="centre" valign="centre">Connecting to webcam</text>
      <link keys="0123456789*#" url="endCall.xml" />
      <call phoneConference="http://www.yourserver.com/video.asf"
            type="video" conferenceType="broadcast"
            successURL="callResult.php?text=Done"
            engagedURL="callResult.php?text=Engaged"
            failedURL="callResult.php?text=Failed"
            rejectedURL="callResult.php?text=Rejected" />
    </vixml>