yaai
yaai copied to clipboard
How do I only log calls on particular inbound/outbound routes?
I have custom context working in Trixbox to bind individual extensions to a single outbound route. SugarCRM logging all calls made through Asterisk instead of the single context I specified in the SugarCRM Asterisk Configuration panel. Am I doing something wrong?
I do not know what you are referring to can you elaborate.
The option I think your talking about only relates to click to dial. I'm probably going to need log information.
Sorry I was so vague with my issue.
Overview I'm running Sugar CE 6.4.4 with Trixbox 2.8 (FreePBX). I'm logging all inbound and outbound calls made with Trix successfully with YAAI. Now my goal is to restrict the logging of calls to a specific inbound and outbound routes. I have 3 different companies running on the same Trixbox. I only need one company's calls to be logged into Sugar. I'm able to restrict extensions to a specific outbound route using an unsupported 3rd party plugin called 'custom contexts'.
*SugarCRM: What's currently going on *If an inbound call for a different company is made, the CRM reports, 'Failed call (Normal Clearing)'. If an inbound call is made to a SugarCRM user's extension, it reports, 'IBC:(saved message)'.
Trixbox: What's currently going on An inbound call comes in through the trunkline and is handled by the inbound route assigned to the trunk line. An outbound call is made and and is restricted to an outbound route using the 3rd party 'Custom Contexts' module for FreePBX. Custom Context lets me set allow/deny rules with priority. I only use it for routing to the extension to the right outbound route.
Wrapping It Up... Sorry for writing a book... I read your HowTo Guide and see that contexts are handled by extensions.conf. I found an article http://www.freepbx.org/support/documentation/howtos/how-to-give-a-particular-extension-different-or-restricted-trunk-access (see section 'Restricting Outgoing Calls') on how to edit the /etc/asterisk/extensions_custom.conf file. It seems Custom Contexts is just a GUI for editing the extensions_custom.conf though it really don't make any changes. I'm guessing changes made by the FreePBX 3rd party addon 'Custom Contexts' are handled in the database.
I've attached log files in my email (cc'd your @gmail) from both the asterisklogger.php and by running asterisk -r. Extensions 1041 is my extension for Project Assistant and Extension 3001 is used for another company. I also attached my extensions.conf and extensions_custom.conf file just in case.
How can I restrict calls to a specific company both inbound and outbound routes so that calls are only logged in the CRM for that specific company? Does YAAI look to the extensions_custom.conf for context rules? Trixbox/freePBX uses DID based routing for inbound calls right? How should I otherwise context the inbound calls so that YAAI only picks up on an individual inbound route?
YAAI wasn't designed to do this. There is no way to select which routes get logged and which ones do not.
In order to do something like this what you'll need to do is in the Dial event you're going to need to write some code that will detect when a call is coming in or going out on a context you want to log. You'll notice in that code there is detection to see if the call is an internal call (a call from someone inside the company to someone else inside the company)... when that case is detected the Call is basically deleted from the Call table immediately. And from then on ignored completely.
If you can write a regular expression to detect if the call is on the appropriate context and only pass through those calls you'll have a solution.
@projectassistant Did you ever figure out a solution for this? I'd like to close some issues out.
I did not. I don't have the development team to figure this out right now. My solution was to launch a separate Asterisk installation for my client. I wish I had the right talent and budget to develop this further.
On Wed, Dec 19, 2012 at 1:41 AM, Blake Robertson [email protected]:
@projectassistant https://github.com/projectassistant Did you ever figure out a solution for this? I'd like to close some issues out.
— Reply to this email directly or view it on GitHubhttps://github.com/blak3r/yaai/issues/9#issuecomment-11497019.