[asterisk-users] Howto change CDR record on calling channel from called thread?
Russell Brown
russell at lls.lls.com
Wed Jul 15 07:02:17 CDT 2009
I'm tearing (what's left of) my hair out on this one :-(
<shortform>
How can I set the CDR(userfield) in the calling thread from the dialplan
(actually a macro called from a feature) in the called thread?
<long version>
I use mixmonitor to record calls driven by entries in the asterisk
database for selected phones. As part of this dialplan, I set the
CDR(userfield) to the mixmonitor filename. I later (in a small web app)
use this userfield to detect recorded calls, get the filename and play
them back.
This all works very very well when the recording is started and the
CDR(userfield) is set by the originating channel.
However, I would like to enable recording from a feature code (*1) on an
ad-hoc basis for those phone that are not set to autorecord and set the
corresponding CDR(userfield) so my web app can spot recorded calls.
This again works well *if* the feature code is used on the calling
channel. However, if it's on the *called* channel then the
CDR(userfield) doesn't get updated because AFAIUI the CDR record is all
in the calling thread.
Can anyone tell me how I can set the userfield for the CDR record in the
*called* thread?
I've tried setting variables (__RECORDINGFILENAME) and setting
CDR(userfield)=${RECORDINGFILENAME} in the hangup code but this again
only works if the feature is initiated by the calling thread.
Putting aside my userfield for filenames requirement, I'd have thought
that the ability to set the CDR(accountcode) via a feature on the called
channel would have been done before... but I've googled to no avail on
that either.
Can anyone help?
--
Regards,
Russell
--------------------------------------------------------------------
| Russell Brown | MAIL: russell at lls.com PHONE: 01780 471800 |
| Lady Lodge Systems | WWW Work: http://www.lls.com |
| Peterborough, England | WWW Play: http://www.ruffle.me.uk |
--------------------------------------------------------------------
More information about the asterisk-users
mailing list