How to Record audio for Followme External number

Does anyone know how to record the audio of an extension when the extension is connected through an external number via Follow-Me.

I have the Recording options for the Extension set to Incoming / Outgoing = Always
"Can Reinvite" is set to No.

A trace of the call through Follow-Me reports this:

recordingcheck|20091014-164728|1255553240.157: No DB Entry AMPUSER/1234567890#/recording - Not Recording for 1234567890#, checking for others

where “1234567890” is the External number setup in Follow-Me for the extension.

It appears that Asterisk thinks that “1234567890#” is an extension number and is looking for the Recording Flag in the Database. Of course there is none. I would expect it to look at the actual extension’s settings (Extension 9999 or “AMPUSER/9999/recording”

Does anyone know how to perform the recording so the audio is saved under the extension? I really do not want to have to create a call Queue for each extension that may need call recording. The recording is only needed for inbound calls to the extension.

I had the same problem and made patch for freepbx-2.5.2.
#------------------------------------start
+++ admin/modules/core/agi-bin/recordingcheck 2009-11-28 11:54:07.000000000 +0300
@@ -45,11 +45,37 @@
exit(1);
}
$extenlist = $r[“data”];
+

  •           $e = $agi->get_variable("ARG3");
    
  •           if ($e["result"] == 0) {
    
  •                   $orig_extension = 0;
    
  •           }
    
  •           else
    
  •           {
    
  •                   $orig_extension = $e["data"];
    
  •           }
    
              $agi->set_variable("RecEnable", "DISABLED"); //disable by default
    
              $list = explode("-",$extenlist);
    
  •           if(!empty($list)) {
    
  •           if ($orig_extension != 0) {
    
  •                    $setting = $agi->database_get("AMPUSER",$orig_extension."/recording");
    
  •                    if ($setting["result"] == 0) {
    
  •                            $agi->verbose("No DB Entry AMPUSER/$orig_extension/recording - Not Recording for $orig_extension, checking for others");
    
  •                            continue;
    
  •                    }
    
  •                    //explode recording vars
    
  •                    $recording = explode("|",$setting["data"]);
    
  •                    $recout = substr($recording[0],4);
    
  •                    $recin = substr($recording[1],3);
    
  •                    if ($recin == "Always") {
    
  •                            $agi->verbose("Recording enable for ".$orig_extension);
    
  •                            $agi->verbose("CALLFILENAME=g{$orig_extension}-{$timestamp}-{$uniqueid}");
    
  •                            $agi->set_variable("CALLFILENAME","g{$orig_extension}-{$timestamp}-{$uniqueid}");
    
  •                            $agi->set_priority('record');
    
  •                            exit(0);
    
  •                    }
    
  •           } elseif(!empty($list)) {
                      foreach($list as $exten) {
                              $setting = $agi->database_get("AMPUSER",$exten."/recording");
                              if ($setting["result"] == 0) {
    

diff -uaNr admin.orig/modules/core/functions.inc.php admin/modules/core/functions.inc.php
— admin.orig/modules/core/functions.inc.php 2009-10-05 22:41:24.000000000 +0400
+++ admin/modules/core/functions.inc.php 2009-11-28 11:17:07.000000000 +0300
@@ -1319,7 +1319,7 @@
$ext->add($context, $exten, ‘’, new ext_stopmonitor());
}

  •                           $ext->add($context, $exten, 'check', new ext_agi('recordingcheck,${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)},${UNIQUEID}'));
    
  •                           $ext->add($context, $exten, 'check', new ext_agi('recordingcheck,${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)},${UNIQUEID},${ARG3}'));
                              $ext->add($context, $exten, '', new ext_macroexit());
                              // keep this 999 in case people have issues updating their recording script
                              $ext->add($context, $exten, 'record', new ext_mixmonitor('${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT}','','${MIXMON_POST}'),'1',998);
    

diff -uaNr admin.orig/modules/findmefollow/functions.inc.php admin/modules/findmefollow/functions.inc.php
— admin.orig/modules/findmefollow/functions.inc.php 2008-11-12 18:06:54.000000000 +0300
+++ admin/modules/findmefollow/functions.inc.php 2009-11-28 11:19:43.000000000 +0300
@@ -106,7 +106,7 @@
}
// recording stuff
$ext->add($contextname, $grpnum, ‘’, new ext_setvar(‘RecordMethod’,‘Group’));

  •                                   $ext->add($contextname, $grpnum, '', new ext_macro('record-enable','${DB(AMPUSER/'."$grpnum/followme/grplist)}".',${RecordMethod}'));
    
  •                                   $ext->add($contextname, $grpnum, '', new ext_macro('record-enable','${DB(AMPUSER/'."$grpnum/followme/grplist)}".',${RecordMethod},'.$grpnum));
    
                                      // MODIFIED (PL)
                                      // Add Alert Info if set but don't override and already set value (could be from ringgroup, directdid, etc.)
    

#---------------------------------end
To apply it
cd /var/www/html/admin
patch -p1 < patch-file
Then in admin interface press apply changes.

Hi,
Would you please explain more clearly for what you just posted above???
Thank in advance,

That is the patch which i’m using to make freepbx able to record external followme calls.
It is impossible to attach files here so it is posted as comment.
If you have the same issue you can save it in “patch-file” and apply with these commands:
cd /var/www/html/admin
patch -p1 < patch-file
After that in freepbx GUI you need do “apple configuration changes”.

I am unable to apply the patch, i get:

missing header for unified diff at line 3 of patch
patching file modules/core/agi-bin/recordingcheck
patch: **** malformed patch at line 4: exit(1);

Any help?

This should be fixed in release 2.8.

http://www.freepbx.org/trac/ticket/4324