RangerMSP Business Automation for successful ITs


Go Back   RangerMSP Forums > RangerMSP Software Discussion Forum (CCRM)

Thread Tools Search this Thread
 
February 14th, 2017, 05:17 AM
Screwloose83
 
Posts: 6
HI Guys

I'm looking at making our phone system talk to PHP but i can not find a way to look up a contact via the PHP API. Can you point me in the right direction?

Also is there a way to POP a CommitCRM screen application via the API? Or if not is there a way to open a chrome window with the account already open via a URL?
 
February 14th, 2017, 06:06 AM
Support Team
 
Posts: 7,519
Thank you for asking. If I get this correctly you are looking for a way to have an incoming call look for a contact in your RangerMSP's database and the pop a message with the contact details. This can be implemented, though you probably won't be using PHP for that but rather C#, C++ or VB.NET and use the API. Using the API you can query the Accounts and Contacts database and get the entire record details, and then your custom program can simply pop a message with the details, also - your program will be able to open a URL that will take the user directly the Contact/Account details page as displayed in the Web portal. Please ping us once you get to this phase and we'll provide you with the relevant details on how to construct the URL. Hope this helps.
 
February 14th, 2017, 09:26 AM
Screwloose83
 
Posts: 6
Thanks Going to be using vb.net
 
February 14th, 2017, 09:30 AM
Screwloose83
 
Posts: 6
I was looking for a way to look up names form phone numbers from PHP so i could get the CDR records in the freeswitch system to work correctly. I can get it to query a mysql database but at commit dont have a connector for centos to its DB i need to use the PHP API. Do you know if this can be done. A simple http://commitip:8888/search.php?number=555555555 returns Bill?
 
February 14th, 2017, 10:35 AM
Support Team
 
Posts: 7,519
That's doable. You'll need to write a small program that listens on any port you choose, it will then parse the URL, get the phone number and will look it up. Hope this helps.
 
February 14th, 2017, 04:32 PM
lpopejoy
 
Posts: 942
Just use odbc drivers. Works perfectly for what you are describing. Though you may need to use IIS and Windows
 
February 16th, 2017, 03:48 PM
Screwloose83
 
Posts: 6
What odbc connector did you use? Are you interested in sharing your code you used for the look ups?

Thanks
 
February 16th, 2017, 05:14 PM
lpopejoy
 
Posts: 942
Info on ODBC: here

Note, I think you need CommitCRM SQL version to use this.

Setup the ODBC connections as a system DSN on a windows box.

Then in IIS / Apache on that same windows box, in PHP use something like this, for example:

$conn=odbc_connect('CommitCRM','','');

//get a listing of companies that match phone # - btw, I didn't test this query. :)
//note that you may want to sanitize the phone # field - like what if there are - or ( or )'s?
$sql="select fullname, recid from cards where phonenumber like '%some cleaned up string%' order by fullname desc";
$rs=odbc_exec($conn,$sql);
while (odbc_fetch_row($rs)){
$employeenamesAr[odbc_result($rs,2)]=trim(odbc_result($rs,1));
}
 
July 16th, 2017, 07:29 AM
Screwloose83
 
Posts: 6
Thanks. I got it working. Just a few notes for others. Need to use 32bit ODBC. And i had to change some of the Field Names. But its a start. Thanks
<?php
$conn=odbc_connect('CommitCRM','','');
if ($conn) {
//echo "Connection established.";
} else{
die("Connection could not be established.");
}

//get a listing of companies that match phone # - btw, I didn't test this query. :)
//note that you may want to sanitize the phone # field - like what if there are - or ( or )'s?
$sql="select FULLNAME , recid from cards where PHONE1 like '%some cleaned up string%' order by FULLNAME desc";
$rs=odbc_exec($conn,$sql);
while (odbc_fetch_row($rs)){
echo $employeenamesAr[odbc_result($rs,2)]=trim(odbc_result($rs,1));
}
Reply





All times are GMT -6. The time now is 01:06 AM.

Archive - Top    

RangerMSP - A PSA software designed for MSPs and IT Services Providers
Forum Software Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.