Geo-Location for an Australian Toll-Free Number

September 04, 2024
Written by
Reviewed by
Paul Kamp
Twilion


Geo-Location for an Australian Toll Free Number

Twilio has recently added a new feature to our Australian-based toll-free numbers, allowing you to extract the geolocation data from incoming mobile-originated calls in Twilio Programmable Voice. This information can then be used to determine the approximate area the mobile user is calling from.

Unlike other providers, Twilio provides you with all the tools and data to build location-based call handling directly, without the need for complex IVR (Interactive Voice Response) design projects. Tools such as Twilio Studio puts you in control of the incoming information provided by the Twilio toll-free numbers, and gives you the power to build, modify, and adapt your toll-free call handling quickly and efficiently.

In this article, we will explore how to enable this feature, how to extract the location information, and how to utilise it in a typical Studio implementation that can be used to replace the more traditional IN-based Toll Free systems available today.

Background

In Australia, the location information of an incoming mobile-originated call is known as MOLI (Mobile Location Information), and the lookup data is provided by the Communications Alliance. MOLI is typically used to direct incoming toll-free calls to the correct state, department, or even the right pizza store for that matter! The map below shows an example of some of the areas covered by MOLI.

MOLI map showing locations in NSW
These areas are provided by the mobile operators and passed on via the toll-free number providers, such as Twilio, as a 3-digit MOLI code. The code to area lookup is provided here. This information should be incorporated into a backend system to act as a lookup for the MOLI code provided by Twilio, narrowing down the location of the incoming mobile call to a geographical area. Below is an example of some of the codes to areas.
Extract from MOLI lookup database
This is a simple data structure that could easily be stored in a database, or even stored within the Twilio environment utilising Twilio Sync as a Sync List; this allows for quick access from Twilio Studio or Functions.

Granularity

Most MOLI codes cover a significant area in Australia. As such, the granularity of a region may not always be fine enough to pinpoint the user location. In these cases, you would thus have to narrow down the specific user location for a store or service, by passing them through some additional questions in a Studio IVR flow.

Prerequisites

Geolocation is already enabled on your Twilio Australian toll-free number(s).All calls originating from a mobile to these toll free number(s) will contain a new parameter called TollFreeMobileOriginationLocation, which contains the previously mentioned MOLI value.

Utilising Geolocation

Let’s set up a simple call to illustrate how the MOLI value is passed into Twilio and made available to utilise.

Toll-Free Number

The first step is to procure an Australian Twilio toll-free number in the Twilio Console. Under Phone Numbers > Manage > Buy a number, use the Advanced Search to filter for Toll-free numbers. Then, select a number and purchase it.

Twilio Console showing Toll Free Numbers
You will require a local Australian address to be configured before you can purchase a toll-free number. This can be done under Regulatory Compliance > Addresses in the same Phone Numbers section of the Twilio Console.

Next, we need to configure a webhook destination on the toll free number where the MOLI data can be viewed. A quick way to demonstrate this is to head to Webhook.site and grab the webhook URL provided there; https://webhook.site/16bd2fc0-5xxxxx for example, in this case.

Webhook.site showing your unique URL for webhook calls

Copy this value and paste it in the number's URL field as shown below, replacing the default value. Click Save Configuration at the bottom of the screen, to complete the setup.

Twilio Console showing configuration of the Toll Free number with a new webhook

This will now trigger a request to this URL whenever a call is made to this number, providing all the call's details.

Let’s try this out now!

  • Open the Webhook.site web page
  • Place a call to your Twilio toll-free number from a mobile phone; the call will fail.
  • Check the data on the Webhook.site page
  • Find the TollFreeMobileOriginationLocation value
This will only work if the call is from an Australian mobile.

The result is shown below:

View the Toll-free origination location

Now that we have the MOLI value via the TollFreeMobileOriginationLocation field, we can do a quick lookup against the MOLI data and determine the location that could service this particular user, and direct their call to the appropriate Flex queue or SIP trunk in your contact centre.

This was a simple demonstration of obtaining the value. This is the most basic example and we can build more complex solutions using Twilio Studio for example, ones more akin to the typical traditional toll-free tools most carriers provide.

Below is an example using Studio to handle an inbound call from mobiles. This extracts the MOLI value from the incoming call, by grabbing the value from the flow Trigger; specifically: trigger.call.TollFreeMobileOriginationLocation.

The example below illustrates how a typical geolocation IVR could be used to send calls to a Flex Agent in Twilio Flex for Sydney based customers, while passing Perth customers to one of two destinations, based on a 70/30 split of calls.

Studio flow for extracting Geo-location for Toll-free Australian numbers

In this example, the call handling logic is as follows:

  • Extract the MOLI value from trigger.call.TollFreeMobileOriginationLocation in the Split widget.
  • If the value matches 001, then go to a Flex queue in the Sydney branch.
  • If the value matches 120, then go to the Perth load balancer.
  • Select a random number to split calls 70% to the local store and 30% to the Business process outsourcing (BPO) leg.
  • Send 70% of the calls to the local store for example by placing an outbound call to the number.
  • Send 30% of the calls to the BPO partner by placing an outbound call to that number.

As mentioned, this is a simplistic Twilio Studio example showing how to extract the MOLI value. Once the information has been extracted, you have the ability to utilise all the power of Twilio Studio to create dynamic, data-driven flows that can be changed at any time, as needed, rather than being locked in to legacy tools.

Utilising Twilio allows you to future proof your implementation and create a self-determined roadmap to grow your customer experience using tools such as Twilio Studio, Functions, Sync, and integration into your own backend systems to extract rich customer data.

Additional Use Cases

There are a plethora of use cases where the location information can be used to create exceptional customer experiences. When would I want to use geolocation?

Outages

Utility and banking sectors could utilise the information from customers calling in to check on a geographic service, such as a bank branch or a power outage at home, to direct calls to an overflow queue. Rather than customers holding up the main enquiries line, the affected location customers can now be sent to a dedicated queue.

Fast Food, Dealerships, and Real Estate to local stores

This is a fairly obvious one, but you need to know your closest pizza store if you are calling to order a pizza. There's no point having a Perth store preparing your pizza if you are in Sydney. It will take quite a while to get there!

Location information ensures that enquiries from a particular customer are routed to the correct franchise or dealership, quickly and effectively.

Marketing Agencies

Another area that could benefit from geolocation information is the marketing sector. Rather than just knowing what number called in on what day, you can now also add a layer of information pertaining to the rough location of the person calling. This information can add an additional layer of data slicing to marketing intelligence for mobile users.

Conclusion

In this article we looked at how you enable geolocation information from mobile callers using the MOLI value. We also looked at how you can extract the value from the call data and use it in a simplistic Twilio Studio IVR example. We also explored possible use cases where geolocation can be used to handle failure, overflow, and enriched data customer situations.

Des is a concept hacker, looking to push tech to align with user expectations. Working as a Twilio Solution Engineer in Sydney, Australia, you can almost always catch him discussing how there should be a simpler way to do something with a cup of coffee for inspiration. Reach him at dhartman [at] twilio.com.