use event socket from an external application and you will get all the CDR data in the channel_hangup event in your own separate process.<br><br><br><div class="gmail_quote">On Wed, Nov 26, 2008 at 9:11 AM, shehzad p <span dir="ltr">&lt;<a href="mailto:pmhshz@gmail.com">pmhshz@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi again,<br>
<br>
I would like to share an idea to solve the problem of this delay:<br>
First, Create an script (php etc),<br>
which insert all the CDR data to mysql database,<br>
<br>
then i call that script using system command passing all CDR values, with<br>
use of `screen` command,<br>
so that `screen` (runs in background) performs database entry,<br>
and without waiting, our javascript can continue and exit, thus ends the<br>
call.<br>
<br>
Is it advisable or not?<br>
or any other idea?<br>
<div><div></div><div class="Wj3C7c"><br>
Thanks,<br>
msp<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Michael Jerris wrote:<br>
&gt;<br>
&gt; You have just shown exactly why cdr direct to database is a bad idea.<br>
&gt; Most likely there was a blip in connectivity to the db and it didn&#39;t<br>
&gt; reconnect correctly. &nbsp;This behavior would be caused by some blocking<br>
&gt; in your script.<br>
&gt;<br>
&gt; Mike<br>
&gt;<br>
&gt; On Nov 25, 2008, at 4:55 AM, shehzad p wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I faced a strange behavior with my freeswitch...<br>
&gt;&gt; Freeswitch setup is as follows:<br>
&gt;&gt; Any call comes to freeswitch are sent to javascript, for routing<br>
&gt;&gt; based on<br>
&gt;&gt; some logic.<br>
&gt;&gt; After call completes, the same script insert the CDR values into mysql<br>
&gt;&gt; database.<br>
&gt;&gt;<br>
&gt;&gt; All is working fine for quite long time,<br>
&gt;&gt; But when I was looking in freeswitch.log file for particular call,<br>
&gt;&gt; I found one CDR entry with big difference in time between the call<br>
&gt;&gt; terminated and time of its CDR inserted into database.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The part of freeswitch.log is as follows:<br>
&gt;&gt; #############################################freeswitch<br>
&gt;&gt; .log#####################################################<br>
&gt;&gt; 2008-11-23 17:40:26 [DEBUG] switch_core_state_machine.c:140<br>
&gt;&gt; switch_core_standard_on_execute()<br>
&gt;&gt; sofia/internal/1234567890@xxx.xxx.xxx.xxx<br>
&gt;&gt; Execute javascript(softswitch/main.js)<br>
&gt;&gt;<br>
&gt;&gt; ...............<br>
&gt;&gt; 2008-11-23 17:40:26 [DEBUG] sofia.c:197 sofia_event_callback() event<br>
&gt;&gt; [nua_i_state] status [487][Request Terminated] session:<br>
&gt;&gt; sofia/internal/1234567890@xxx.xxx.xxx.xxx<br>
&gt;&gt; 2008-11-23 17:40:26 [DEBUG] sofia.c:2129 sofia_handle_sip_i_state()<br>
&gt;&gt; Channel<br>
&gt;&gt; sofia/internal/1234567890@xxx.xxx.xxx.xxx entering state [terminated]<br>
&gt;&gt; 2008-11-23 17:40:26 [NOTICE] sofia.c:2545 sofia_handle_sip_i_state()<br>
&gt;&gt; Hangup<br>
&gt;&gt; sofia/internal/1234567890@xxx.xxx.xxx.xxx [CS_EXECUTE]<br>
&gt;&gt; [ORIGINATOR_CANCEL]<br>
&gt;&gt;<br>
&gt;&gt; ...... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ....... &nbsp; &nbsp; &nbsp;.....<br>
&gt;&gt;<br>
&gt;&gt; 2008-11-23 23:14:20 [DEBUG] switch_ivr_bridge.c:353<br>
&gt;&gt; audio_bridge_thread()<br>
&gt;&gt; BRIDGE THREAD DONE [sofia/internal/1234567890@xxx.xxx.xxx.xxx]<br>
&gt;&gt; .......<br>
&gt;&gt; 2008-11-23 23:14:20 [INFO] main.js:150 console_log() CDR Inserted<br>
&gt;&gt; 2008-11-23 23:14:20 [INFO] main.js:151 console_log() ***** start<br>
&gt;&gt; date &nbsp; &nbsp;:<br>
&gt;&gt; 2008-11-23 17:40:26<br>
&gt;&gt; 2008-11-23 23:14:20 [INFO] main.js:152 console_log() ***** caller &nbsp;:<br>
&gt;&gt; 1234567890<br>
&gt;&gt; ################################################################################################################<br>
&gt;&gt;<br>
&gt;&gt; This means that time difference between the call terminated and its<br>
&gt;&gt; CDR<br>
&gt;&gt; inserted is about 5.30 hours, which is too late.<br>
&gt;&gt; During this time it was also listing out in &#39;show calls&#39; and &#39;show<br>
&gt;&gt; channels&#39;.<br>
&gt;&gt;<br>
&gt;&gt; Any clue for such delay.???<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://www.nabble.com/False-call-running-so-long..-tp20678102p20702663.html" target="_blank">http://www.nabble.com/False-call-running-so-long..-tp20678102p20702663.html</a><br>

<div><div></div><div class="Wj3C7c">Sent from the Freeswitch-users mailing list archive at Nabble.com.<br>
<br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>