Ticket #2708 (new Feature Requests)

Opened 5 years ago

Add accountcode on incoming routes

Reported by: s1rk3ls Assigned to: p_lindheimer
Priority: minor Milestone: Undetermined
Component: Core Version: 2.4-branch
Keywords: accountcode Cc:
Confirmation: Unreviewed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

For call detail reporting purposes, I needed a way to add an account code to incoming calls. Setting the account code to the DID number was the simplest and made the most sense to me. It would be nice for freepbx to do this automatically when adding an extension (see the attached patch file for /var/www/html/admin/modules/core/functions.inc.php) or to have the ability to specify an account code on the inbound routes page similar to extensions.

Thanks,

Kris

--- functions.inc.php.orig      2008-02-25 10:29:14.000000000 -0600
+++ functions.inc.php   2008-02-25 10:29:35.000000000 -0600
@@ -741,6 +741,7 @@
                                        $context = "ext-did";

                                        $ext->add($context, $exten, '', new ext_setvar('__FROM_DID','${EXTEN}'));
+                                       $ext->add($context, $exten, '', new ext_setvar('CDR(accountcode)','${EXTEN}'));
                                        // always set callerID name
                                        $ext->add($context, $exten, '', new ext_gotoif('$[ "${CALLERID(name)}" != "" ] ','cidok'));
                                        $ext->add($context, $exten, '', new ext_setvar('CALLERID(name)','${CALLERID(num)}')

Attachments

accountcode.diff.txt (0.8 kB) - added by s1rk3ls on 02/25/08 11:41:08.
Patch for /var/www/html/admin/modules/core/functions.inc.php to automatically set accountcode to DID on incoming routes

Change History

02/25/08 11:41:08 changed by s1rk3ls

  • attachment accountcode.diff.txt added.

Patch for /var/www/html/admin/modules/core/functions.inc.php to automatically set accountcode to DID on incoming routes