Skip to content
blak3r edited this page Apr 4, 2012 · 27 revisions

There are a lot of things that could be done to improve this project. Any help would be greatly appreciated. This page is currently a stub. Refer to the TODO.txt in the Code root directory for now.

Table of Contents

Features

  • Multiple Matching Contact Handling, provide user with option to pick who it is? At the very least need to fix outbound calling
  - Todo this, we need to add a new action to controller.php and add a new column to asteriskLog.  The action=setContactId will pass a contact id which will then get written to the asteriskLog db table.  Then, in asteriskLogger we check if the contactId is already set before trying to make the relation.
  • Need to do custom code for Contacts Subpanels.. (doesn't show magic call icon there).
  • Update language files for german and whatever the other language is.

Minor Bugs

  • $sugar_config['asterisk_dialin_ext_match'] = 'Local\/(?:.*?)(\d\d\d?\d?\d?)@'; -- Make this take 3-11 digits. If longer then say 5 characters we need to implement a method to look at users's mobile phones.
  • See issues for bug on RingGroups

Potential Enhancements

  • Better handling for answering on mobile phone. (currently a chat box still appears).
  • Would be cool if we displayed voicemail inside sugar. From what i've read this sounds doable given the options in AMI.
  • Ability to record the call... It's unclear whether or not this can be done without complicated AGI scripts or not?
  • Have Button to create a new contact when number isn't recognized... (Add to contact--> create new or add to existing)

Configuration Changes Needed

  • Need configurable Channel detection in order to assign calls to users when they answer on cell phones.
  • Add a configurable option
  • (DONE) Need to add dialin prefix (its in sugarListener)
  • (DONE) Need to make config option for the dialout. Currently hardcoded to /SIP (in my case i need to do the Local/##@sugarsip/n... see CreateCall... for some reason I don't need it in callListener (presumably b/c it's already SIP at that point).
  • (DONE) Parametize the channel --> assigned user id detection, search for Local/LC-52@from-internal-4bbbb in asteriskLogger.
  • (DONE) Add max subject length to controller.php (also variables for IBC, OBC);

MISC

  • Verify Asterisk Logger fix to relogin to AMI works if asterisk goes down.
  • (DONE) Currently language is hardcoded in sugarListener.php
  • (DONE) AsteriskLogger -> findUser method --> add to query something to detect that user is "Active" so you don't get past employees matchin.
  • (Performance) -- Reduce querying in callListener... Perhaps set Contact only in asteriskLogger? -- You'd loose it getting updated if person adds afterwards.
  • (Performance) -- Index the timestampCall column?
  • (Performance) -- Perhaps create a asterisk_log_archive table and copy entries to it after 1 week to cut down on records that have to be scanned.
  • (Performance) -- Ajax calls to callLister continue even after user's session ends (like when you login from a diff browser). Need to somehow stop that.
  • Process the AMI response in CallCreate / controller and display errors when they fail in javascript.
  • If the database cannot be accessed, this is the error message you get
! FATAL: Cannot find login credentials for user admin which is a bit misleading... as it makes you think soap is the problem

INSTALLER

  • (DONE) The previous versions added some custom code around every phone number.











JQUERY Loading on Page Problem Notes

In my production system, I have 6.4.1. I have an extension which uses JQUERY already (1.4 something)... Here's my results:

If I force include: echo '<script type="text/javascript" src="custom/include/javascript/jquery/jquery.pack.js"></script>'; Asterisk Plugin works fine... But, Dispage Fails.

If I conditionally include JS, works in Firefox... and it chrome...


On my demo 6.4 instance (I don't have any other extensions so jquery isn't loaded).
  • Include local copy of jquery works.
  • Conditional Include results in: Uncaught ReferenceError: $ is not defined
... I guess my conditional include isn't being loaded before the code reaches dialin.js and dialout.js.

My conditional code is inserting it after the head... but the code isn't at the head. So, I think I might have to surround my code with some YUI.

YAHOO.util.Event.onDomReady YAHOO.util.Event.onContentReady Uncaught ReferenceError: jQuery is not defined

Ugh... So, I need some YUI or standard javascript way to invoke some code which requires JQuery to be loaded...