well, actually it is possible because in the upcoming FS cookbook I have this exact recipe! You'll have to buy the book to get the full monty, but here's the example script from that recipe, which will also be freely downloadable from Packt's web site once the CB is done:<div>
<br></div><div><div><font face="'courier new', monospace" size="1">#!/usr/bin/perl </font></div>
<div><font face="'courier new', monospace" size="1"># <a href="http://handle_cdr.pl">handle_cdr.pl</a> </font></div>
<div><font face="'courier new', monospace" size="1"># Connect to event socket, listen for CHANNEL_HANGUP_COMPLETE events </font></div>
<div><font face="'courier new', monospace" size="1"># Uses event data to create custom CDRs </font></div>
<div><font face="'courier new', monospace" size="1">use strict;</font></div><div><font face="'courier new', monospace" size="1">use warnings;</font></div><div><font face="'courier new', monospace" size="1">use lib '/usr/src/freeswitch.git/libs/esl/perl';</font></div>
<div><font face="'courier new', monospace" size="1">use ESL;</font></div><div><font face="'courier new', monospace" size="1">my $host = "localhost";</font></div><div><font face="'courier new', monospace" size="1">my $port = "8021";</font></div>
<div><font face="'courier new', monospace" size="1">my $pass = "ClueCon";</font></div><div><font face="'courier new', monospace" size="1">my $con = new ESL::ESLconnection($host, $port, $pass);</font></div>
<div><font face="'courier new', monospace" size="1">if ( ! $con ) {</font></div><div><font face="'courier new', monospace" size="1"> die "Unable to establish connection to FreeSWITCH.\n";</font></div>
<div><font face="'courier new', monospace" size="1">}</font></div><div><font face="'courier new', monospace" size="1">## Listen for events, filter in only CHANNEL_HANGUP_COMPLETE </font></div>
<div><font face="'courier new', monospace" size="1">$con->events('plain','all');</font></div><div><font face="'courier new', monospace" size="1">$con->filter('Event-Name','CHANNEL_HANGUP_COMPLETE');</font></div>
<div><font face="'courier new', monospace" size="1">print "Connected to FreeSWITCH $host:$port and waiting for events...\n\n";</font></div><div><font face="'courier new', monospace" size="1">while (1) {</font></div>
<div><font face="'courier new', monospace" size="1">my @raw_data = split "\n",$e->serialize();</font></div><div><font face="'courier new', monospace" size="1"> my %cdr;</font></div><div><font face="'courier new', monospace" size="1"> foreach my $item ( @raw_data ) {</font></div>
<div><font face="'courier new', monospace" size="1"> #print "$item\n"; </font></div>
<div><font face="'courier new', monospace" size="1"> my ($header, $value) = split ': ', $item;</font></div><div><font face="'courier new', monospace" size="1"> $header =~ s/^variable_//;</font></div>
<div><font face="'courier new', monospace" size="1"> $cdr{$header} = $value</font></div><div><font face="'courier new', monospace" size="1"> }</font></div><div><font face="'courier new', monospace" size="1"> # %cdr contains a complete list of channel variables</font></div>
<div><font face="'courier new', monospace" size="1"> print "New CDR: ";</font></div><div><font face="'courier new', monospace" size="1"> print $cdr{uuid} . ', ' . $cdr{direction} . ', ';</font></div>
<div><font face="'courier new', monospace" size="1"> print $cdr{answer_epoch} . ', ' . $cdr{end_epoch} . ', ';</font></div><div><font face="'courier new', monospace" size="1"> print $cdr{hangup_cause} . "\n";</font></div>
<div><font face="'courier new', monospace" size="1">}</font></div><div><br></div><div><br></div><div>-MC</div><br><div class="gmail_quote">On Wed, Dec 7, 2011 at 6:15 AM, Tux Tux <span dir="ltr"><<a href="mailto:tha_tux@hotmail.com">tha_tux@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">
Hi,<br><br>Is it possible to request the CDR via a ESL event?<br><br>I found the possibilities to save it to disk and/or database but not to get it via the ESL.<br>Maybe this is because the CDR can grow large in size, but I want to be certain.<br>
<br>Thanks,<br>Nico<br><br>                                            </div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>