<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have experience setting up something like that, but in Java.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You should use ESL in outbound mode. For every new incoming call, FS will open a socket connection to an ip:port where your application should be listening to, and you will have complete control over the incoming call. So, in theory, you should only need to have a SocketServer listening to an specific port, and send commands/receive events from FS to your application (you can play a little bit with this in linux using the netcat (nc) utility, or maybe in windows by installing Cygwin &nbsp;and using nc.exe)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I&#8217;m happy using the Java ESL library, a pure socket-based java application (jboss/netty based) with no dependencies on system libs.&nbsp; Maybe (and this is a BIG MAYBE) you can reuse this library from .NET, relying on Mono&#8217;s IKVM tool, that allows Java-to-NET interoperability by converting Java&#8217;s JVM bytecode to .NET CLR. I&#8217;ve taken this approach before, when I found a terrific tool in Java (jPOS, for example) with no counterparts in .NET.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is only one option. There&#8217;s always the option of building your own application listening on a socket, or using the .NET libraries listed on the wiki:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><a href="http://wiki.freeswitch.org/wiki/Mod_event_socket#.NET_Client_library">http://wiki.freeswitch.org/wiki/Mod_event_socket#.NET_Client_library</a><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Good luck! <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Michael Lutz<br><b>Sent:</b> Thursday, January 12, 2012 10:02 AM<br><b>To:</b> FreeSWITCH-users@lists.freeswitch.org<br><b>Subject:</b> [Freeswitch-users] ESL Managed IVR and CallControl<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Hi,<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>I have been playing with mod_managed for a while now but nobody realy seems to be able to help me out. So now I am trying to go to ESL. (which most of the people suggest anyway).<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>What I need is&nbsp;control from .net over the complete call! (so even when bridged and returns). <o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>I need to build &nbsp;a main library where all my generic functions will be put in so I can use them in my different scripts.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>What I''ve figured out is problably the best way is to write a server which connects to my FS an listens to all events.<o:p></o:p></p></div><div><p class=MsoNormal>When a call comes in I need to fire a stored procedure to my sqlserver and based on the reply I will decide if the call needsto be answerred, early media needs to be played, or the call needs to be rejected.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>In any case, at the end of every call (answered or not) I need to finalize my call with another stored procedure.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>When teh call is answered based on stored procedure result I need to run a script (also managed code) <o:p></o:p></p></div><div><p class=MsoNormal>run a script from another dll so I have all my scripts separate but they share the corelib I create.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>I have been searching the web for a long time now to see if I can find something simular, but I only see generic examples wich don't actually show how to control multiple calls in a scenario like this.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Who can help me out point me to the right direction or has experience in setting something up like this?<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Thanks in advance,<o:p></o:p></p></div><div><p class=MsoNormal>Michael Lutz.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></body></html>