Skip to content

Commit

Permalink
FREEPBX-11702 switch to v3 api
Browse files Browse the repository at this point in the history
  • Loading branch information
jfinstrom authored and tm1000 committed Feb 29, 2016
1 parent eab166f commit 0ae0fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/source-OpenCNAM.module
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class OpenCNAM extends superfecta_base {

if ($run_param['Account_SID'] == null or $run_param['Auth_Token'] == null) {
// Hobbyist Tier URL (limited to 60 cached lookups per hour)
$url = "https://api.opencnam.com/v2/phone/" . $thenumber . "?format=pbx";
$url = "https://api.opencnam.com/v3/phone/" . $thenumber . "?format=pbx";
}
else {
// Professional Tier URL (unlimited real-time CNAM lookups)
$url = "https://api.opencnam.com/v2/phone/" . $thenumber . "?format=pbx&ref=possa&account_sid=".$run_param['Account_SID']."&auth_token=".$run_param['Auth_Token'];
$url = "https://api.opencnam.com/v3/phone/" . $thenumber . "?format=pbx&ref=possa&account_sid=".$run_param['Account_SID']."&auth_token=".$run_param['Auth_Token'];
}

$sname = $this->get_url_contents($url);
Expand Down

0 comments on commit 0ae0fd4

Please sign in to comment.