RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

How to Use the Telephone Abuse and Resolution API

How to Use the Telephone Abuse and Resolution API

There's no easy way to stop spam and scam phone calls. We looked at building a mobile application that'd rely on user data to build a reliable and open freely-available database but the process required garnishing millions of local users... but this process was just unreasonable and outside our areas of focus. The fact that a reliable real-time database of phone numbers likely associated with scams isn't made freely available by the Australian Government through the AMCA is just unacceptable when it'll potentially protect the thousands of Australians that lose hundreds of millions every year as a result of fraud. As part of our everyday phone usage we can generally rely on popular diallers made available from the likes of Google and Samsung to block shonky calls, but this isn't of any use to those of us that build applications that should include a measure of protection against (mainly offshore) malicious scammers.

Gaining access to a database that'll protect our customers is hard. Until then, our Phone API is more of a 'Resolution API' than the intended Abuse API... and quite frankly, we're unlikely to pursue the latter anytime soon.

  Phone Number API

Until our API reliably returns scam caller information, the primary purpose of the API to verify a phone number exists, return an approximate location, and convert the number to various formats. While the API is limited in terms of functionality, it still may be useful to those of our clients that build internal applications. In terms of our usage, each incoming phone number (associated with leads of enquires) is passed through the API, and we use it to force formatting of phone numbers in forms based on a resolved location.

The Country Code (Advanced): The country code of each user is required if used in a form. This value (for those building plugins on top of our own) can be referenced by a session variable. The timezone array is only generally accurate to the country code and offset level, and the returned timezone text string (in a format suitable for Microsoft) is generally used only for calendar date availability. The session variables we've recorded for you are ' (, )' - note that the offset and country code are likely accurate.

Number Regex (Advanced): If using on your website, call the bmpnf($id, $t, $cc) function with the field id, country code, and phone number to correct number formatting in real-time. The same function can be called on submit to return true or false for validity (include a fourth argument as true).

  API Endpoint

The API endpoint is shown below. As noted above, if making the request via your website you should generally access the country from the session variable rather than have the user waste their time with a dropdown.

api.beliefmedia.com/tel/tel.json?tel={tel}&country_code={cc}&apikey={key}

The API key used if your primary API Key. No usage limits apply.

  Example Response

We'll first query the Bunnings Hardware store at Sydney's Leppington, about 10 minutes southwest of Liverpool.

1
Array
2
(
3
    [code] => 200
4
    [message] => OK
5
    [is_scam] => 0
6
    [data] => Array
7
        (
8
            [countryCode] => 61
9
            [nationalNumber] => 297568200
10
            [extension] =>
11
            [rawInput] =>
12
            [countryCodeSource] => 4
13
            [preferredDomesticCarrierCode] =>
14
            [hasNumberOfLeadingZeros] =>
15
            [numberOfLeadingZeros] => 1
16
            [call_in_oz] => (02) 9756 8200
17
            [e164] => +61297568200
18
            [national] => (02) 9756 8200
19
            [international] => +61 2 9756 8200
20
            [resolved_location] => Liverpool
21
            [carrier] =>
22
            [timezones] => Array
23
                (
24
                    [0] => Australia/Sydney
25
                )
26
 
27
        )
28
 
29
)

The is_scam value is derived from limited scammer databases and by checking the number against known reputable numbers. However, any number can be spoofed so no method of scan detection can be relied upon. One of the important values from a marketing perspective is the resolved_location key (Liverpool) which we can use to map out a heat signature of activity.

If an international enquiry is made you can refer to the e164 value to determine the correct number to call.

Querying the AFCA's relay mobile number returns the following:

1
Array
2
(
3
    [code] => 200
4
    [message] => OK
5
    [is_scam] => 0
6
    [data] => Array
7
        (
8
            [countryCode] => 61
9
            [nationalNumber] => 423677767
10
            [extension] =>
11
            [rawInput] =>
12
            [countryCodeSource] => 4
13
            [preferredDomesticCarrierCode] =>
14
            [hasNumberOfLeadingZeros] =>
15
            [numberOfLeadingZeros] => 1
16
            [call_in_oz] => 0423 677 767
17
            [e164] => +61423677767
18
            [national] => 0423 677 767
19
            [international] => +61 423 677 767
20
            [resolved_location] =>
21
            [carrier] => Optus
22
            [timezones] => Array
23
                (
24
                    [0] => Australia/Adelaide
25
                    [1] => Australia/Brisbane
26
                    [2] => Australia/Eucla
27
                    [3] => Australia/Lord_Howe
28
                    [4] => Australia/Perth
29
                    [5] => Australia/Sydney
30
                    [6] => Indian/Christmas
31
                    [7] => Indian/Cocos
32
                )
33
 
34
        )
35
 
36
)

Mobile numbers can't be resolved to any single location so they should be considered 'National' (as reflected by the all-inclusive timezone array). The carrier might be useful for statistical purposes.

Invalid phone numbers, and those that can't be resolved, will serve a code of 404 with a relevant message.

  More Information

Our clients generally steer clear of building their own apps and instead focus on what puts their kids through school, but if you require more information it's expected that we'll include the full documentation in our FAQ module, although you're welcome to contact us in the meantime to see if the features of the API might be useful.

  Featured Image: The North Sydney telephone exchange, 1938. Source: NAA: C4076, HN5355A. [ View Image ]

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

RELATED READING

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment