<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://3835/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If your happy with C, go for it. You can take a look at mod_xml_cdr and mod_nibblebill for some hints on hooks for billing. I might use the state hooks for reporting instead and the data you get from that one as you are less time constrained to handle the data in that state.<div><br></div><div>Mike</div><div><br><div><div>On Aug 9, 2013, at 2:29 PM, Sami Montour <<a href="mailto:smontour@verizon.net">smontour@verizon.net</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hello Everyone,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I am a long time user of OpenSIPS and have recently been tasked with developing a call control/real-time billing application for the FreeSWITCH. I would like to develop the application in either C/C++, Perl or lua (totally new to lua) in this order.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I have used ESL to develop some basic functionality of the application using Perl. For instance, when the call comes in, I pass over control from FreeSWITCH to the call control application using outbound TCP socket. Then the call control application listens for CHANNEL_ANSWER event to start billing process and CHANNEL_HANGUP event to stop billing. The application does some database work as well to retrieve and check user status and balance and all that stuff. My main concern is with load testing because of the TCP connection between the FreeSWITCH and call control application and also TCP connection to database to retrieve subscriber info. The basic functionality seems to work fine but haven’t tested it with high call volume, which I am about to do.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">The last couple of days I have been experimenting with mod_lua but can’t find a method under “Session” to get information related to CHANNEL_ANSWER and CHANNEL_HANGUP events. The “session:geVariable” does not have variables related to session answer time or hangup time, something similar to “$e->getHeader("Caller-Channel-Answered-Time")” in ESL. I must be missing something very simple here. Again, my experience with mod_lua is only a couple of days old.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I am new Freeswitch and thought I would seek the advice of all the experts and people with more experience with Freeswitch. For this type of application, am I better off with mod_lua, or mod_perl, or shall I stick with ESL using Perl? How about ESL with C/C++? Will I gain some performance gain there?<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Any feedback would be appreciated. Thanks.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Sam<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><br></div></div></div></blockquote></div></div></body></html>