Call monitoring stops when call is tranferred internally?

Hi Guys,

We are currently on ver2.7.0.2, however this has been happening for ages now.

Basically all calls into our office are call recorded/monitored no problems except for say a call comes in to one of our extensions - say the receptionist (ext101) and she transfers it to someone else (say ext105).

When we look in to call monitoring (from the user portal) we can see the initial call recording on ext101 for the exact amount of seconds, then when we look at ext105 we can see the call length, CID etc but the “monitor” part of the table is blank with no download or preview button, i.e. there is no recording?

Any ideas?

Thanks in advance…


Does the file exist in the monitor directory (normally /var/spool/asterisk/monitor)? What criteria do you have set up for matching (aggressive or normal) in ARI?


Hi guys,

I am experiencing the same problem. I have just upgraded from 2.6 as I thought this problem would be resolved. I am now running

I believe the problem has something to do with the context changing when the call is transferred. Rob to answer your question no the file does not exist in /var/spool/asterisk/monitor , only the file which contains the recording up to when the call is transferred exists.

Im actually not using ARI on my system, Im using something called Cristal Recording interface, works very well and handles large amounts of files better than ARI

Hi guys,

I found this ticket regarding the recording which I think is the issue that we are dealing with.

Hi Guys,

That ticket seems to be internal issues only except the question at the bottom by yourself, but the way you describe the flow of the conversation stopped being recording is spot on.


Hi guys,

I have made progress on this problem and I would appreciate some feedback if anyone can help.
The original fault was that if I dialed from outside directly to an extension the call was recorded fine, as soon as the call was transferred the recording stopped.
I only had this problem when dialing directly to an extension, if I dial into a queue and then transferred it worked fine, I suspect this is due to the queue doing the recording rather than the extension.

I have since done a complete update to FreePBX 2.7 and Elastix 1.6.2-2, asterisk 1.4.31 and the problem is now resolved. The issue now though is that the call recording is still only showing in ARI for the first part of the call, the second part after the transfer does get recorded as the file is in the monitor directory but its not showing in ARI. The problem I believe is with the file name.

The First call is saved as 20100614-093737-1276501054.5.gsm , the second part after the transfer is saved as 20100614-093746-1276501054.5.gsm
Both calls have the same unique ID 1276501054.5, but the time stamp is different 093737 and 093746. Presumably ARI has been written in such a way that it only looks at the unique ID of the file and cant distinguish between 2 files that have the same unique ID. I use another recording interface called Crystal Recording from , Crystal Recording only shows the second part of the transfer and not the original file, presumably it also suffers from the same unique ID problem.

Can anyone else verify this and offer a solution. Presumably the problem lies with the setting of the unique ID, there are 2 recordings so these files should be saved with 2 different unique IDs?


We have setup an Asterisk installation using PBX in a Flash 1.4 (Asterisk with FreePBX 2.7 (all 2.7 latest updates), along with a Digium B410P Quad BRI card…

We have the following issue…

Someone from outside the office calls, the IVR answers and directs the call to our Sales Ring group (extension 620)… The phone is picked up our salesperson (extension 202) and a recording was made with the filename g202-20100608-171251-1276006365.2717.WAV. The caller wanted to speak with the other salesperson of our office (extension 203) so the call was transferred and a new recording was made with filename 20100608-171302-1276006365.2717.WAV.

In ARI interface we can see in CDR entries both legs of the conversation but we can hear only the first one because there is no associated link to the recording even if the recording exists in the monitor directory. This happens because the recordings have the same Unique Identifier (as we can see from the examples above) and ARI cannot process both of them, but only the first one…

One solution would be the following…

When ARI encounters two recordings with the same Unique Identifier, it should also check the timestamp, since timestamp exists both in the filename and the CDR database and if it finds a match, then ARI should show the appropriate link to the web interface.

With the above method we will have the ability to see our already made recordings and not only the new ones…

I am not a programmer to suggest a programming solution nor i know how easy it is to make, but that’s the only idea i can think of… If there is a better one please tell us…

Also please, give some effort to this issue because Asterisk is a top grade product used by many companies and it is a shame to lose reliability…

Thanks in advance for everything…

Do we have anything new on this issue?

Thanks in advance…

The extensions_addition.conf file would normally get overwritten when upgrading but the extensions_override.conf file should not get overwritten. This is the correct place for adding custom configs.
Has anyone also tried this fix and confirm that it works 100% for everyone?
Does anyone know how to register this as a bug and fix so that someone official from FreePBX can look at it and verify our findings?

files like the above are not “core files”, they are intended to be changeable to modify your behavior.

Welldone Grantwilson and your brother,

However I havent tried this and nor do I want to start messing around with the core files of my PBXinaFlash distro.

When I used to use AsteriskNow I was constantly edited files which always had a knock on effect down the road, hence my choosing the wonderful PBXinaFlash solution.

Can the developers release this as an update, from the GUI once it has been tested.

Welldone again!

The correct file to put this into is actually.


Do they get overidden on updates though?

Sorry to implement this fix you need to copy the entire macro, modify it, and paste it into the extensions_override.conf file.

Here is the whole macro modified on that one line.

exten => s,1,NoOp(${UNIQUEID}
exten => s,n,GotoIf($["${BLINDTRANSFER}" = “”]?:check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),ExecIf($["${ARG1}"=""],MacroExit,)
exten => s,n,GotoIf($["${ARG2}"=“Group”]?Group:OUT)
exten => s,n(Group),Set(LOOPCNT=${FIELDQTY(ARG1,-)})
exten => s,n,StopMixMonitor()
exten => s,n,Set(ITER=1)
exten => s,n(begin),GotoIf($["${CUT(DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording),=,3)}" != “Always”]?continue)
exten => s,n,Set(TEXTEN=${CUT(ARG1,-,${ITER})})
exten => s,n,Noop(Recording enable for ${TEXTEN})
exten => s,n,Set(CALLFILENAME=g${TEXTEN}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(continue),Set(ITER=$[${ITER}+1])
exten => s,n,GotoIf($[${ITER}<=${LOOPCNT}]?begin)
exten => s,n(OUT),GotoIf($["${ARG2}"=“IN”]?IN)
exten => s,n,ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\|,1):4}" != “Always”],MacroExit,)
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=OUT${ARG1}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(IN),ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\|,2):3}" != “Always”],MacroExit,)
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},${MIXMON_POST})
exten => s,n(norecord),MacroExit()

Hi all,

I believe we have found the problem, David Wilson my brother actually found it so all credit to him.
Let me know if anyone has anything to add to this and to my description.

The problem is with the Macro called [macro-record-enable], located in extensions_additional.conf

The original macro has the following.

include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = “”]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),ExecIf($["${ARG1}"=""],MacroExit,)
exten => s,n,GotoIf($["${ARG2}"=“Group”]?Group:OUT)

This checks if the call is a Blind Transfer, if it is then it performs a ResetCDR and Stop MixMonitor. I dont believe this is correct, a Blind transfer should be one continuous recording.

To fix this simply change the above line to the following. The difference is the :
exten => s,n,GotoIf($["${BLINDTRANSFER}" = “”]?:check)

This changes the macro so that it now checks to see if its a NOT Blind Transfer, if its NOT Blind Transfer then stop Mixmonitor and perform Reset CDR.

I have implemented this at 2 customers and so far I think it has fixed the issue.

1 Like

I have an Elastix 1.6x box with FreePBX 2.5.22. I get the same results: Although the second “leg” of the call is recorded and can be found amongst the files in the …/monitor dir, it is not “attached” to the original recording. I also use Tikal Networks’ “Crystal Recording Interface”.

ANY progress on this??

I havent had much time to spend on this issue, however we recently discovered the situation is worse.

We have upgraded our dedicated machine as the hard drive was on the way out on the old box, new centOS 64bit PBXinaFlash install.

FreePBX with all the latest updates and still the same problem.

This morning after a few moans by staff I looked into this further and found that all external calls in are recorded if they are directly routed, i.e. we have a few DDI’s which operate on a ring all strategy and these record perfectly and are seen in the FreePBX user portal with the correct recording time.

However we also have a generic number which is on a time condition, which during the defined time group fowards to an IVR, we noticed all calls in via this route are not shown in the FreePBX User Portal!

I played around a bit, first sent the generic number straight to an extension, all okay so no issue regarding trunk/inbound route, I then thought I would use a time condition that sent straight to extension, again no prob so time condition not a prob, so I sent direct to IVR and bang nout in FreePBX User Portal.

The reason is the same as my original explanation which started this post, transfer of calls, the IVR is considered a transfer, as is a call transfered manually by a member of staff which also suffers the missing information in the FreePBX User Portal.

In fact just like all you guys, the recording does exist in var/spool/asterisk/monitor, but the linking information is not in the FreePBX User Portal!

Come on developers this clearly is a problem, can a ticket be opened to this effect?



I can confirm that this fixed the problem! Thank you so much.

After putting this in place I now get 2 recorded files, one file contains the entire call, the other file just contains the transfered portion of the call.

Thanks again

I have been having this issue for 2 yrs. Is this going to be resolved in the distro? Seems like a rather large bug.

Hi guys,does anyone know how to log this as an official bug or know how to get the attention of the FreePBX developers?

Interestingly I have noticed that in Elastix 2 it seems one of the Elastix developers has attempted to fix this but I think the fix is incomplete.
They have added the following into the macro
;include => macro-record-enable-custom
But there is no macro-record-enable-custom

I am presuming its one of the Elastix Developers as Im running Elastix 1.6 but the same version of FreePBX which is the latest 2.7 available and I dont see this modification.