Add data to Cdr QueueCallerAbandon event

The cdr events have UserField available for writing data from dialplan and using exten => recordcheck,n,Set(CDR(UserField)=${MIXMONITOR_FILENAME}) I managed to get data out from the dialplan to the AMI cdr event.

I need something similar for QueueCallerAbandon


There is no such thing for that AMI event, or really many other AMI events. They aren’t extensible and you can’t just attach arbitrary data to them. It would require code modifications and adding support.

Yeah … right … about that … I keep hearing “no! that can not be done!” over and over again … what is up with that ?!

exten => s,n,Set(CDR(AccountCode)=${ROUTENAME}) ` 
;setting account code to ROUTENAME will be visible in Cdr events / for out going calls
exten => s,n,Set(CDR(AccountCode)=${FROM_DID})
;setting account code to FROM_DID will be visible in Cdr events / for incomming calls

CDR events do because they’re a representation of a CDR record which includes support for arbitrary CDR variables, and thus when the manager CDR support was done that was explicitly written in because it’s a feature of CDRs. It’s not a general feature or property of every AMI event.

As for “what is up with that”, some stuff just isn’t coded to do it.

and yet it works …

Ah, you’re saying it works because you’re using the accountcode field which is not userfield and thus can appear in other places. Yes, you can stuff data in that field and not treat it as an accountcode and it will work. It’ll just end up showing up in a ton of places, and if FreePBX uses it for any of its functionality then you may break that.

CDR(AccountCode) was empty before and using it to determine what external line was used for that call pretty much fits exactly what I need.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.