GlobalPhone Corporation offers discount telephone calling

Please Call Me
How It Works
- code samples
- documentation
Sign Up
About Us
Contact Us

Table of Contents




Your URL Address or SiteId
The Callback Phone Number
Number of Lines
SubGroup Information


Request Page
Success Page
Error Page


Sample HTML and ASP Code

The Good News!

The best news is probably that you don't really need to understand what's in this page to start using WebCallback. Filling out the on-line application and you will receive confirmation of your registration from GlobalPhone. If you are less confident, just contact us, or better still have us call you, we will do all the work that's required to put a functioning WebCallback page up. All you then have to do is insert links to your call request form in your site.

This technical guide details the requirements for using GlobalPhone's WebCallback service as a part of your webs. It includes sample code snippets to allow you to tailor your use of WebCallback.  You may wish to download a ZIP file containing all our sample code, or look at the HTML and other samples in this site.

If you need further assistance, or have suggestions for improving the service, please e-mail us with your ideas and/or questions, or (naturally) have us call you!

Operations Overview

By adding WebCallback buttons to your website, a person browsing the site will see an attractive telephone hotlink inviting them to click to call the company.

GlobalPhone will establish your account on its telephone switch with your pre-programmed callback number.

When the person browsing your site decides to make a call, he/she clicks on a Call Me! button. This takes the browser to a call request form, where the user is prompted for a telephone number. When the user submits this form, your web site posts a request to the WebCallback web site containing your company's account identification and the phone number of the browsing party.

The WebCallback switch immediately launches the call to your company. When someone in your office picks up, they hear an announcement that you have received a WebCallback call, and they know that GlobalPhone's switch is now launching a call to the person who initiated the call. Once this second call is answered the switch connects both parties in a conference call.

WebCallback consists of simple web pages that you can run on your server as an integral part of your site or on our server. The techniques discussed in this section allow you top completely integrate our WebCallback technology with your own and your clients' web sites. No-one need ever know that you are providing callback services through a third party.

For the quickest possible startup, when you sign up for service we give you a URL which points to a standard call request form on our server. This form is personalized wiht some of the information you entered in the sign-up form, and you can simply use the URL for your Call Me links.

The pages used by the service are:

  • Call Request Form - This is the page where the customer is prompted for their phone number. Your Call Me! hyperlinks refer to this page.
  • Success Page (optional) - Once a call is launched, the Success Page announces a call has been placed and returns the user to your website.
  • Error Page (optional) - If the call was not placed, for example, due to a bad phone number or all lines busy, the error page displays the reason and provides a return link to your website.

If you do not provide the optional pages the WebCallback system uses defaults. While these are not personalized to your site, they allow a fast startup with a minimum of web programming.

WebCallback is highly adaptable. It can run in any environment — plain HTML, PERL, ASP or Cold Fusion. Source code is provided free of charge. The HTML programmer can control unlimited phone numbers on any page, the number of lines available, the names and location of the success and error pages, the time available for calls, delayed calls, etc.

Implementation can be as simple or as complex as your needs dictate. At the simplest level, you may point a Call Me! hyperlink to a page on our website. At the other end of the spectrum you can create an extremely complex, interactive set of pages on your own site. The processes and variables are discussed below in further detail.

Filling Out The Application Form

In addition to standard address billing information, GlobalPhone needs certain pieces of information in order to process your call requests correctly. This information is requested in the application for service. You can provide this information via the web if you want, by filling out the on-line application form. If you are happier dealing through the mail or by fax then print out the Microsoft Word application form or the web page application form and mail it or fax it back to us. You can find our details on our company background page.

Your SiteId

Access to WebCallback service is authenticated by GlobalPhone by an agreed site identifier. If a call request does not use an authorized site identifier, the request is rejected.

To identify your site by an identifier you must agree a suitable identifier with a GlobalPhone representative. This is easily done in a telephone call taking less than two minutes. The on-line sign-up uses the Web Site URL field as the identity. We recommend that you omit the leading "http://", as this is not required to identify your site uniquely.

The Callback Phone Number

Enter the phone number at your company where you want the calls to go! This may be your call center, a specific department, e.g. Jewelry Sales, or even a single individual, e.g. John Doe, V.P. Investor Relations.

Note that the service can cope with more complex requirements, routing calls to different people or groups from different forms. You will need to discuss your requirements with a GlobalPhone representative before adding this feature to your WebCallback pages. Some of the details are discussed below, however.

Number of Lines

You may specify how many simultaneous calls you want your call center, department or individual to handle. Once this many calls are active, further call attempts will be rejected and the person browsing will see an error page indicating all lines are busy. The default is one line unless otherwise requested. Hint: ask your telephone guru how many operators are standing by to answer the phone.

SubGroup Information

If your application requires several different parties or departments to receive calls, you can subdivide the lines we allocate to your organization into different sub-groups. By specifying different sub-groups in different forms you can decide who receives which calls. You will need to talk to your GlobalPhone representative to decide whether this service would benefit your application.

Page Structures

You provide up to three pages, which we refer to as the Call Request Form, Success and Error pages. Normally these pages exist in the same directory by default, but the names and locations of these pages are under your complete control. You can also put many call request forms into your site if you so desire

These pages may be plain HTML, but are often programmed in some way to take advantage of the more advanced features of the WebCallback system. While the basic requirements are simple, some programming ensures more and better information is passed between pages and displayed to the user where necessary.

A zip file containing sample HTML and VBScript Active Server Pages (ASP) code for the three pages (including comments about the required functionality) can be downloaded from GlobalPhone's web site. Several sample call forms are provided in the zip file, showing varying levels of complexity.

Similar programming can easily be performed in Cold Fusion, Perl or most other server-side programming languages, and we will be adding to the examples as client needs dictate.

Call Request Form

This is the page which submits the request to the WebCallback system.

It will usually be a form, allowing the user to enter a number to dial with an optional country code. Some developers prefer to restrict the country codes, or make the country code a hidden field. The HTML code is provided to allow users to select all serviced countries from a pull-down menu in your call request form.

All WebCallback requests should be passed to the following URL:

You may choose to encode the information to be passed to the call setup phase directly in the URL of a link's HREF attribute if you wish. The WebCallback system will accept either method (POST or GET) of transferring the necessary information.

Most current users prefer to use the form, since this gives their users the chance to enter the telephone number where they wish to be called. However, you should remember that WebCallback is also extremely suitable for applications where a fixed set of numbers are to be called.

The following information should be provided as inputs to the call setup URL mentioned above. Information not explicitly shown as option is required.

CountryCode The international country code for the destination country.  This can be a simple text field, or a pull-down selection, or a set of radio buttons.
Number The telephone number, including all area code digits.  Any non-digit characters will be stripped from this number before it is used to set up the call, allowing users flexibility of entry.
SiteId The name of your site as agreed with your GlobalPhone representative or entered in the on-line sign-up form. Note that as a security precaution, until your SiteId is programmed into the WebCallback servers by our staff, test calls from your site(s) will be routed to the GlobalPhone help desk.
SubGroup (optional) If present, indicates a particular subset of callback numbers allocated to this web site: allows selection of individual lines and easy subsetting of a site's resources.
ReturnPage (optional) The URL to which the success and error pages should offer a link.  This argument is passed (as the Where argument) to both the success and error pages. See the note below about relative and absolute links.

This argument can be used to have the WebCallback system return the web user to the page they were browsing when they selected the Call Me! link to start the WebCallback process.

SuccessPage (optional) The URL to be called when a call attempt appears to have succeeded. When this link is used it will have two arguments appended: Number (whose value will be the number called) and Where (whose value will the ReturnPage above). See the note below about relative and absolute links.

If no SuccessPage argument is provided the system will call a system default page.

ErrorPage (optional) The URL to be called when a call attempt cannot be completed for some reason. If such a call is made there will be two arguments appended: Msg (whose value will be a message string) and Where (whose value will be the ReturnPage above). See the note below about relative and absolute links.

If no ErrorPage argument is provided the system will call a system default page.

DelayTime (optional)

The number of seconds' delay the system should provide before making the call attempt. This allows an Internet user with a single line to log off and free up the telephone line before the call attempt is made.

This item is usually provided as a drop-down, with zero identified as "Now" and larger values shown as the number of minutes.

Name (optional)

Text field of maximum 25 characters that will identify the person that is calling.

Extension (optional) A text field of max 4 characters in which the caller can enter his extension.

At present time this field has only an informative presence. The call will not actually dial the customer extension!!

Email (optional)

Text field of maximum 25 characters that will contain their e-mail address

Question (optional)

This is a checkbox field that can be used for having them answer to a specific question.

For example ask them permission to be added to your mailing list.

To completely avoid programming you may choose to direct browsers to a fixed web address after a call has been initiated, in which case you can specify ReturnPage in a hidden form field or as a fixed part of the URL. By default, if you do not specify a ReturnPage argument the system will try to find the correct page from the browser. You should be aware, however, that this method typically only works about 80% of the time.

Absolute and Relative URLs in Page Specifications

If you don't want your successfull calls to end up at a default page, you can edit the section of the HTML which reads:
<input type="hidden" name="ReturnPage" value="someURL">
so the Callback processor returns to some other page. Obviously you have to decide which URL to use instead of someURL in the exampler above.

You can similarly direct the flow of processing by adding SuccessPage and ErrorPage fields to your call request form. 

These can be a relative page addresses (like nextpage.htm, which would take you to that page in the same directory as the call request form, or ../nextpage.htm, which would take you to the directory above).

An address like /toplevel/secondlevel/nextpage.htm is called an absolute address, because it takes you to the same place no matter which page it is used from. It specifies a page in your site whose location is completely unrelated to the call request page.

Lastly you can use complete URLs, with or without the leading http:, such as // -- this can be useful when you are providing WebCallback service to other organizations.

Some Sample Forms Code

Here we show forms of varying complexity to give you some ideas of what you can do with WebCallback. 
Simple HTML Call Request Form
This form shows how easy WebCallback can be.  It uses a table to provide some control over the layout of the call request form, and always returns to the WebCallback home page (ReturnPage) after setting up a call to GlobalPhone (SiteId).   It also shows you the format of the CountryCode pull-down.  You can replace this with another text input if you prefer.
<form method="POST" action="">
<input type="hidden" name="ReturnPage" value="">
<input type="hidden" name="SiteId" value="globalphone">
<td>1. Select the country you are in</td>
<td>2. Enter your number</td> 
<td>3. Click here!</td> 
<td><select size="1" name="CountryCode"> 
<option value="Country Code">Country (Country Code)</option>
<table border="0" cellpadding="2" cellspacing="0">
<option value="93">Afghanistan (93)</option> 

<option value="263">Zimbabwe (263)</option> 
<td><input type="text" name="Number" size="20"></td> 
<td><input type="submit" value="Call Me Now" name="submit"></td> 
The code above will use the WebCallback default success and error pages.  If you want to use your own you should know that without programming the success page cannot display the called number like the default page does, and the error page cannot display the message generated by the system. 

This is very similar to the code used in the Web Callback "Call Me" page

Automatic Linking Back
Typically a user will click a "Call Me" link on one of your web site pages to see the call request form; they will then fill in their number and click on the "Call Me Now!" button to trigger the WebCallback.  Assuming the call request is successful, it would be a courtesy to return them to the original page on which they clicked the "Call Me" link. 

The call request form page is easily programmed to pick up its HTTP_REFERER and pass this through to WebRequest.asp as the ReturnPage argument (typically in a hidden field).  Then, after the call attempt is complete, the user's browser will return to the page from which the request page was linked. 

Here's an example of how that could be done in ASP.  The details are different in Perl or Cold Fusion, but the principles are very much the same. 

At the beginning of the call request form page (before the <HTML> tag) you would insert this code to build a form field for later use.  The field is built here to avoid FrontPage 98's valiant efforts to restructure the form! 

Referer = Request.ServerVariables("HTTP_REFERER")
ReturnPage = "<input name=""ReturnPage"" type=""hidden"" value="""&Referer&""">"
Later in the page's code, the hidden field is inserted as a part of the form using code similar to the last example.  The only difference is that the ReturnPage hidden field is now specified by programming, whereas in the last example it was a static URL: 
<form method="POST" action="">
<%= ReturnPage %>
<input type="hidden" name="SiteId" value="globalphone">
<table border="0" cellpadding="2" cellspacing="0">
<td>1. Select the country you are in</td>
<td>2. Enter your number</td>
<td>3. Click here!</td>
<td><select size="1" name="CountryCode">
<option value="Country Code">Country (Country Code)</option>
<option value="93">Afghanistan (93)</option>
<option value="263">Zimbabwe (263)</option>
<td><input type="text" name="Number" size="20"></td>
<td><input type="submit" value="Call Me Now" name="submit"></td>
Using SubGroups for Different Call Destinations
If you have arranged with GlobalPhone to split your allocated lines into subgroups, your call request can specify which subgroup is to be called by a particular attempt.   You can choose to do this by using different forms, each with a different SubGroup specified as a hidden field. 

The next example shows that you can give the caller the option of who to call by specifying the subgroup as an option in the form.  This particular example uses radio buttons, but a pull-down could equally well be used.  The assumption is that the any subgroup calls any available number, they guy subgroup calls Guy Jazynka's number only, and the steve subgroup calls Steve McCarthy's number only. 

<form method="POST" action=""> 
<input type="radio" value="any" checked name="SubGroup">
<input type="radio" name="SubGroup" value="Steve">
Steve McCarthy 
<input type="radio" name="SubGroup" value="Guy">
Guy Jazynka</b><br>
<strong><small>Country Code </small></strong>
<select name="CountryCode" size="1">
<option selected value="1">USA</option>
<option value="44">United Kingdom</option>
<option value="30">Greece</option>
</select> <strong>
<small>Area Code and Number </small></strong>
<input type="text" name="Number" size="21">
<input type="submit" value="Call Me!" name="B1"></p>

Success and Error Pages

By default these pages will be those we have programmed into our system, but you may specify your own pages to conform with your local coding conventions if you wish.  The WebCallback software allows these pages to be located in the same directory as the page making the callback request, in any other directory in your site, or at a completely different location.  The examples should give you the idea. 

To overcome this default, you may pass the addresses (URLs) of these pages to GlobalPhone as variables during the call process.  These may be relative to the call request form, or absolute URLs. 

A simple example of how a call form can use sucess and error pages is given by the WebCallback call request form, which includes code similar to the following as a part of the form: 

<form method="POST" action="">
<input type="hidden" name="SuccessPage" value="Success.asp">
<input type="hidden" name="ErrorPage" value="Error.asp">
Because these hidden fields are relative links, the call processor takes them as references to pages in the same directory as the call request form. 

Success Page

When the WebCallback routine is successfully completed, the user's browser is redirected to a success page within the directory identified by the prefix string. 

This page will be called by the GET method, with two arguments passed in the URL: 
Number The full (US-dialed) number which was called
Where The URL to be used to allow the user to return to the page from which they first requested use of the WebCallback service
The standard success page displays a message (including the Number argument) for a few seconds and then further redirects the browser to the URL provided as the Where argument. 

A Programmed Success Page
This example shows how it is possible for the success page to use the Msg and Where arguments to provide a better display and the convenience of automated linking back to the page on which the user originally requested WebCallback (this assumes that the call request from captured the page, as shown above). 

It uses a <META> tag to add a Refresh HTTP header to the page.   This means that after three seconds the success page will disappear in the user's browser, to be replaced by the page where the user originally clicked on the "Call Me" link. 

where = Request.QueryString("Where")
number = Request.QueryString("Number")
Header = "<META HTTP-EQUIV=""Refresh"" CONTENT=""3;URL="&where&""">"
<% = Header %>
<title>Call Success</title>
<h1 align="center"><em><strong><% = number %> </strong></em></h1>
<h1 align="center"><font color="#0000A0"><em><strong>Called!</strong></em></font></h1>
<h2 align="center"><strong><em>Your&nbsp; telephone should ring soon.</em></strong></h2> 
<p align="center"><em><strong>Thank you for using the GlobalPhone WebCallback service!</strong></em>.</p>

Error Page

Whenever any error is detected (except those errors to do with return linkage, which utilize a stand-alone error display which is a part of the WebCallback system), the system redirects the user's browser to this page. 

The page is called with two arguments appended to the URL:

Msg A message indicating the reason for the inability to complete the call request
Where The URL to be used in a link which allows the user to return to the page from which they first requested use of the WebCallback service

The standard error page simply displays the error message prominently and offers a link to allow return to the user's original URL. 

A Programmed Error Page
This page uses the Where argument (copied by the call processor from the ReturnPage argument passed by the call request from). This provides the user with a link back to their original web page after they have read the message, which is the Msg argument generated by the call processor. 

Again the HTML to link to the return page has to be generated as a whole at the head of the page to overcome FrontPage's fastidiousness about apparently unopened closing link tags.

<% where = "<a href="""&Request.QueryString("Where")&_
""">Return to call request page. </A>" %> 
<title>Call Error</title>
<h2 align="center">
The following problem occurred while we were
attempting to set up this call:</h2>
<p align="center"><strong><% = Request.QueryString("Msg") %></strong></p>
<p align="center">We are sorry we have been unable to complete this call.
Please <a href="CallMe.asp">try again</a> later. </p>
<p align="center"><% = where %>
  Top Of Page

Home | Please Call Me | How It Works | [ Implementation] | Resellers | Pricing | Sign Up | About Us | Contact Us
Code Samples | [ Documentation]

Copyright © 1998, 2004 GlobalPhone Corporation