|
|||
|
|||
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? |
|
|||
|
|||
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.
|
|
|||
|
|||
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?
|
|
|||
|
|||
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)); } |
|
|||
|
|||
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)); } |