FreePBX / superfecta

Provides simultaneous use of, and complete control over multiple caller id data sources.
http://www.freepbx.org
GNU General Public License v2.0
58 stars 93 forks source link

Ver. 2.11 no longer possible to cache results to Asterisk Phonebook #168

Open lgaetz opened 10 years ago

lgaetz commented 10 years ago

Since 2.11 no longer uses the FreePBX module Caller ID Lookup Sources, it is no longer possible to automatically cache results to the Asterisk Phonebook.

I suggest modifying the 2.11 module to include a user checkbox to enable caching. Then in post processing push the CID/CNAM to the APB provided the winning source is not already the APB. Need to be mindful of any user supplied or SPAM prefixes so they don't get cached (if possible).

tm1000 commented 10 years ago

This needs to be a post-processing module, not another global option

lgaetz commented 10 years ago

I think we are on the same page but want to make sure. You are saying the code to add CID/CNAM to APB goes in the post processing function of source-Asterisk_Phonebook.module correct?

tm1000 commented 10 years ago

Yes. We are on the same page :+1:

lgaetz commented 10 years ago

As part of coding this change, I have discovered in ver. 2.11.5 that the variable $winning_source is not being passed properly to the post_processing function; it always seems to be blank. I see that $winning_source is supposed to be set on line 62 of /processors/superfecta_single.php with the line:

$winning_source = $data;

edit 1: Line 103 same file calls post_processing function with NULL always passed as $winning_source param. Will code assuming that $winning source is not available.

edit 2: $this->astman class is not available in the post_processing function. This feature request is turning into a mess. I think this will be another whole issue.

tm1000 commented 9 years ago

edit 2: should be resolved now.

The rest I leave up to you. Though I can look into it at some point