well, actually it is possible because in the upcoming FS cookbook I have this exact recipe! You&#39;ll have to buy the book to get the full monty, but here&#39;s the example script from that recipe, which will also be freely downloadable from Packt&#39;s web site once the CB is done:<div>
<br></div><div><div><font face="&#39;courier new&#39;, monospace" size="1">#!/usr/bin/perl                                                                                                                                                 </font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1"># <a href="http://handle_cdr.pl">handle_cdr.pl</a>                                                                                                                                                 </font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1"># Connect to event socket, listen for CHANNEL_HANGUP_COMPLETE events                                                                                       </font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1"># Uses event data to create custom CDRs                                                                                                                         </font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">use strict;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">use warnings;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">use lib &#39;/usr/src/freeswitch.git/libs/esl/perl&#39;;</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">use ESL;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">my $host = &quot;localhost&quot;;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">my $port = &quot;8021&quot;;</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">my $pass = &quot;ClueCon&quot;;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">my $con  = new ESL::ESLconnection($host, $port, $pass);</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">if ( ! $con ) {</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    die &quot;Unable to establish connection to FreeSWITCH.\n&quot;;</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">}</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">## Listen for events, filter in only CHANNEL_HANGUP_COMPLETE                                                                                                    </font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">$con-&gt;events(&#39;plain&#39;,&#39;all&#39;);</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">$con-&gt;filter(&#39;Event-Name&#39;,&#39;CHANNEL_HANGUP_COMPLETE&#39;);</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">print &quot;Connected to FreeSWITCH $host:$port and waiting for events...\n\n&quot;;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">while (1) {</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">my @raw_data = split &quot;\n&quot;,$e-&gt;serialize();</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    my %cdr;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    foreach my $item ( @raw_data ) {</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">        #print &quot;$item\n&quot;;                                                                                                                                       </font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">        my ($header, $value) = split &#39;: &#39;, $item;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">        $header =~ s/^variable_//;</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">        $cdr{$header} = $value</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    }</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    # %cdr contains a complete list of channel variables</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">    print &quot;New CDR: &quot;;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    print $cdr{uuid} . &#39;, &#39; . $cdr{direction} . &#39;, &#39;;</font></div>
<div><font face="&#39;courier new&#39;, monospace" size="1">    print $cdr{answer_epoch} . &#39;, &#39; . $cdr{end_epoch} . &#39;, &#39;;</font></div><div><font face="&#39;courier new&#39;, monospace" size="1">    print $cdr{hangup_cause} . &quot;\n&quot;;</font></div>
<div><font face="&#39;courier new&#39;, 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">&lt;<a href="mailto:tha_tux@hotmail.com">tha_tux@hotmail.com</a>&gt;</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>