<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>billing in lua is asking for issues... why not do something like triggiering the billing from the xml cdr or such this avoids loss od cdrs as it uses the filesystem as a backup to incase your websvices or billing processor is down<br><br><div>Ken</div>Sent from my iPad</div><div><br>On Aug 18, 2013, at 10:19, Karsten Horsmann &lt;<a href="mailto:khorsmann@gmail.com">khorsmann@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi Sam,<div><br></div><div>you should be more verbose what you currently doing. There a many ways to call an lua script in FS (in the dialplan, as startup-script, as dialplan-binding etc).<br><br>Sounds like you want to fetch some kind of billing informations.<br>
<div class="gmail_extra"><br><div class="gmail_quote">2013/8/17 Sami Montour <span dir="ltr">&lt;<a href="mailto:smontour@verizon.net" target="_blank">smontour@verizon.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">I am using Mod lua for call processing on the FreeSwitch. I would like to wait for some events such as CHANNEL_ANSWER and CHANNEL_HANGUP &nbsp;in order to get the answer time and hangup time. Basically, something like<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">Wait for event CHANNEL_ANSWER or CHANNEL_HANGUP<u></u><u></u></p><p class="MsoNormal">If (event_name = “CHANNEL_ANSWER”) then answer_timestamp = getHeader(“Caller-Channel-Answered-Time”) <u></u><u></u></p>
<p class="MsoNormal">If (event_name = “CHANNEL_HANGUP”) then hangup_timestamp = getHeader(“Event-Date-Timestamp”)<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">The session:getState() described in module lua gets the call state but not the channel state. For instance, ‘CS_EXECUTE’ is the channel state when it is executing a dialplan not when the call is answered. <u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">Is there a way to wait for channel events such as CHANNEL_ANSWER and CHANNEL_HANGUP in order to retrieve answer and hangup timestamps for a call?<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">Any input is very much appreciated.<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">Thanks.<u></u><u></u></p><p class="MsoNormal">
<u></u>&nbsp;<u></u></p><p class="MsoNormal">Sam<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p></div></div><br></blockquote></div><br clear="all"><div><br></div>-- <br>Mit freundlichen Grüßen<br>*Karsten Horsmann*<br>

</div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services:</span><br><span><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span><br><span><a href="http://www.cudatel.com">http://www.cudatel.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br><span><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></body></html>