Browse files

AsteriskLogger Tweak for POTS lines, release notes

Added a case for extracting the phone number being called in dial events from Dialstring event.  This is needed on POTS asterisk installations.
Added Release notes file.
  • Loading branch information...
1 parent 88f24a1 commit e12a1e7abbf595f259949dc2533786e0a4055e71 @blak3r2 blak3r2 committed Nov 5, 2012
@@ -1,48 +0,0 @@
-STARFACE SugarCRM Connector is a computer telephony integration module for the
-SugarCRM customer relationship managment program by SugarCRM, Inc.
-Special Thanks go to to SugarCRM, Inc. who gave excellent support to get started
-to provide this Connector as an upgrade-safe SugarCRM module.
-You can contact vertico software GmbH at Amalienstr. 81-87, 76133 Karlsruhe,
-GERMANY or at the e-mail address
- o SugarCRM 6.0+ (Community, Professional, Enterprise)
- o PHP 5.2+ ! Important for Ajax !
- o MySql
- *******************************************************************************
- * Parts of this code are (c) 2009 abcona e. K.
- * Angelo Malaguarnera E-Mail
- *
- *******************************************************************************
-If you run CentOs 5.2 with PHP 5.1.6 you have to enabled the module.
-At first look if it is the module include:
-#ls -la /usr/lib64/php/modules/ | grep
--rwxr-xr-x 1 root root 92750 Jun 1 19:41
-(if not, try this
-#pecl install json
-or google how to install php-json.
-then add the json.ini file in /etc/php.d :
-#echo -e "; Enable json extension module \" > /etc/php.d/json.ini
-or upgrade php 5.2.9
-/etc/init.d/httpd restart
-Have Fun
@@ -0,0 +1,82 @@
+IMPORTANT: when upgrading, please see the instructions in the User Manual <>
+##Version 2.6.0 (2012-11-03)##
+### NEW Features ###
+User can have multiple extensions (comma separated) Issue #22
+Calls can now be related to contacts created even after the call is hung up.
+Short Call Status allow the user to specify whether or not missed calls get their Call Status set to "Missed" or "Held". If it's Missed, then the call will show up as an open task. I set the default ot be Held for future installs.
+### Improvements / Bug Fixes ###
+Various bug fixes related to AJAX-UI
+Improved Daemon Script
+Added lots more config options.
+Ability to disable OpenCNAM integration.
+Fix IE bug where multiple click to dial icons would appear in contact list view.
+Fix for Issue #75, Outbound Caller Id not set
+IE8 compatibility for Click to Dial
+Click-2-Dial now works when Letrium Quick Edit Detail View is installed.
+Fix for Issue #25, Calls are related to contacts created after call ends.
+Fix to work with ZenoSMS
+Better AMI Connection Diagnostics / Markdown Logging
+Retries soap login indefinitely.
+Updated time handling to fix #40.
+Fixed a minor localization bug.
+Adds support for LDAP auth (Issue #59)
+Fixed bug in Stripping Inbound / Outbound Prefixes.
+Deletes calls_cstm now also.
+Fixed open_cnam print error
+Adds Support For nested RingGroups, still has dev debugs on
+Merge pull request #20 from superles/patch-1
+Merge pull request #49 from trustmaster/master
+Fixed #44: using raw English call statuses as before localization.
+Merge branch 'master' of git://
+Merge pull request #42 from kerio-fstedronsky/patch-1
+Fix blak3r/yaai#41
+Cleaned up some PHP Notices
+Changed default search length to 10 digits.
+Fix for Issue #69 and Issue #66
+Fix for #40 timestamp handling
+LDAP Auth Supported
+Fixed Bug where Transfer didn't use context specified in the config.
+## Version 2.4 (2012-07-22)
+Fixes a bug where AJAX Calls prevented popups from closing.
+Adds support for sugar 6.5, fixes some bugs, adds Russian localization.
+## Version 2.3 (2012-05-09)
+### New Features
+* Added Transfer Call Support
+* Improved UI on call popups to allow for selecting which contact the call
+should be related to when multiple contacts match.
+* Added support for Caller ID
+* Ability to manually relate a call to particular contact with a popup
+* Relates to Account instead of a contact if number matches an account
+number or if there are multiple contacts with the same phone number from
+the same account.
+* Doesn't log account to any contact if multiple contacts have the same
+phone number and they belong to two different accounts.
+### Changes:
+* Lots of minor bug fixes.
+* Module Loader automatically updates database
+* Improved stability of asteriskLogger
+* Performance Improvements.
+## Version 2.0.3 (2012-04-03)
+* Brand New \\\"gchat\\\" inspired UI.
+* Added more configurable options to support custom dial plans.
+* Supports multiple calls, ability to leave notes for up to an hour after
+call has hungup.
+* Improved support for Ring Groups which call an external phone number
+(like cell phones).
+* Improved stability of asterisk logger, doesn\\\'t hang as much
+* Lots of misc bug fixes.
13 SugarModules/modules/Asterisk/asteriskLogger.php
@@ -392,9 +392,22 @@ function call($method, $params)
$tmpCallerID = trim($e['CallerIDNum']); //Asterisk Manager 1.0 $e['CallerID']
+ // Typically for outbound calls there are NewCallerID events which contain the phone number dialed.
+ // This isn't the case on POTS lines.
+ // The dialstring will be like g0/14101234567 for outbound calls and 14101234567 for inbound
+ // Regex only matches the outbound case since in the inbound case the CallerIDNum variable is set properly.
+ // Note: this cases also seems to happen on the INTERNAL inbound call events to Ring Groups which is harmless.
+ if( !empty($e['Dialstring']) ) {
+ if( preg_match("/(.*?\/)(\d+)/",$e['Dialstring'], $ds_matches) ) {
+ $tmpCallerID = $ds_matches[2];
+ logLine(" CallerID set from Dialstring to: " . $tmpCallerID );
+ }
+ }
// Fix for issue on some asterisk 1.8 boxes where CallerId on click to dial is not set. See
if ($tmpCallerID == '<unknown>' && !empty($e['ConnectedLineNum'])) {
$tmpCallerID = trim($e['ConnectedLineNum']);
+ logLine( " CallerID set from ConnectedLineNum to $tmpCallerID");
if (startsWith($tmpCallerID,$calloutPrefix)) {
BIN SugarModules/modules/Asterisk/include/documentation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 SugarModules/modules/Configurator/asterisk_configurator.tpl
@@ -503,42 +503,6 @@
<input type='textbox' name='asterisk_log_file' size="45" value='{$asterisk_log_file}'>
- <TD>&nbsp;</TD><TD>&nbsp;</TD> </tr>
- <TR><td colspan="4">&nbsp;&nbsp;<TR><TD colspan="4"><h3>Recordings</h3></TD></tr>
- <TR>
- <td nowrap width="10%" class="dataLabel">{$MOD.LBL_ASTERISK_RECORDINGS_ENABLED}
- [<a href="#" title="{$MOD.LBL_ASTERISK_RECORDINGS_ENABLED_DESC}">?</a>]:
- {/if}
- </td>
- <td width="25%" class="dataField">
- {if empty($config.asterisk_recordings_enabled )}
- {assign var='asterisk_recordings_enabled' value=$asterisk_config.asterisk_recordings_enabled}
- {else}
- {assign var='asterisk_recordings_enabled' value=$config.asterisk_recordings_enabled}
- {/if}
- <input type='textbox' name='asterisk_recordings_enabled' size="45" value='{$asterisk_recordings_enabled}'>
- </td>
- <td nowrap width="10%" class="dataLabel">{$MOD.LBL_ASTERISK_RECORDINGS_PATH}
- [<a href="#" title="{$MOD.LBL_ASTERISK_RECORDINGS_PATH_DESC}">?</a>]:
- {/if}
- </td>
- <td width="25%" class="dataField">
- {if empty($config.asterisk_recordings_path )}
- {assign var='asterisk_recordings_path' value=$asterisk_config.asterisk_recordings_path}
- {else}
- {assign var='asterisk_recordings_path' value=$config.asterisk_recordings_path}
- {/if}
- <input type='textbox' name='asterisk_recordings_path' size="45" value='{$asterisk_recordings_path}'>
- </td>
<!-- ------------------- [ PASTE OUTPUT OF CONFIGURATORGENERATORUTIL ABOVE THIS LINE ]----------------------------- -->
16 TODO.txt
@@ -14,18 +14,6 @@
I tend to use this file to temporarily put notes when i'm not already logged into github.
-"order":"last_name","limit":"30","no_match_text":"No Match"};
If you have a custom dial plan. You must do the following.
*There are a few regex's that must work.
@@ -42,8 +30,8 @@ If you have a custom dial plan. You must do the following.
So, if call windows aren't popping up this might be a good place to look.
Versions Developed with:
-* Asterisk built by root on a i686 running Linux on 2011-12-29 01:26:29 UTC (we compiled asterisk b/c DTMF wasn't working).
+ * Asterisk built by root on a i686 running Linux on 2011-12-29 01:26:29 UTC (we compiled asterisk b/c DTMF wasn't working).
+ *
==[ Important ]================
2 manifest.template.php
@@ -61,7 +61,7 @@
- 'readme'=>'README',
+ 'readme'=>'Please see the documentation at there are some important notes you need to read if you are installing an updated version of yaai.',
'author' => 'Blake Robertson / KINAMU Business Solutions AG / abcona active business consulting',
'description' => 'Integrates Asterisk telephony features into SugarCRM.',

0 comments on commit e12a1e7

Please sign in to comment.