There is an api_hangup_hook var you can use to set to cause an FSAPI call to execute when the call hangs up.<br>You can use this to call a lua script.<br>In the script you can access the data from the env event which is automatically created for you and it<br>
contains all the channel variables from that departed channel.<br><br><br><br><br><div class="gmail_quote">On Thu, Jul 16, 2009 at 2:22 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>></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><br><div class="gmail_quote"><div class="im">On Thu, Jul 16, 2009 at 11:58 AM, rentmycoder rentmycoder <span dir="ltr"><<a href="mailto:rentmycoder@gmail.com" target="_blank">rentmycoder@gmail.com</a>></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;">
Ok, let's explain some situations when cdr is not usable.<br>
Let's take a simple IVR, callers dial in, navigate in the menu system,<br>
at some point they hangup.<br>
<br>
My customer needs a realtime monitor which shows the active calls in<br>
the system each with realtime data (calldate,callerid,actual menuitem,<br>
actual action (playing a wav file or waiting for dtmf), total call<br>
time, calltime since actual menu entered, etc...).<br>
With asterisk i just use AGI to communicate with an external mysql<br>
database to store this information and an external website, which<br>
connects to this database and show;s it's realtime content in the<br>
administrator's browser.<br>
How can I do this with freeswitch most effectively?<br>
I could use event socket, but for this simple task I think lua would<br>
be more cost effective... But I cannot execute any script telling the<br>
database that the actual call is hanged up...<br>
any idea?<br>
</blockquote></div><div><br>Whenever I hear the words "real time" I immediately think "event socket." I can't think of any valid reason not to use the event socket - its design is tailor made for this kind of application. OTOH, I suppose you *could* use Lua and have it attempt to connect to some external entity and deliver some information on a hangup or other point. However that seems kludgy/Asterisky to me.<br>
<br>I think an elegant solution would be to build the IVR in whatever language you prefer and use the event socket to control the calls. Then you can have your IVR program also handle the updating of the database. Every time the IVR told a call to do something, or rec'd a DTMF, or got a hangup, etc. it could update the database and then you could build the pretty GUI/dashboard that customers just love.<br>
<br>-MC <br></div>
</div>
<br>_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></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>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</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>