<div dir="ltr">If you are trying to handle incoming calls you probably will have to use outbound socket, otherwise Freeswitch will  finish running the dialplan and hangup before your ESL client has a chance to send it any commands. As you can see from the log there are no dialplan matches found so FS responds with a 480. When using outbound mode you put the socket app in the dialplan so that FS knows to hand over the call handling to your ESL client.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 7:15 AM, Yisroel M. Olewski <span dir="ltr">&lt;<a href="mailto:yisroel@machshevet.com" target="_blank">yisroel@machshevet.com</a>&gt;</span> wrote:<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"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks fellows<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Sorry for the delay, we were a bit busy here lately<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I’m attaching the fs log. I don’t even see a the word “answer” there. <u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">It seems fs is totally ignoring the incoming commands<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">if there’s a way to use inbound (which should be according to the docs) I’d rather not switch around the whole architecture just right now<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">If there won’t be any other choice, I guess I’ll try that<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thank again<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#0f243e">Sincerely,<u></u><u></u></span></i></p><p class="MsoNormal"><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#0f243e">Yisroel M. Olewski          <u></u><u></u></span></i></p>
<p class="MsoNormal"><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#0f243e">CEO<u></u><u></u></span></i></p><p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><img width="280" height="69" src="cid:image002.png@01CF0244.F5313C30"><u></u><u></u></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="tel:%2B1%20%28718%29%20514-2721" value="+17185142721" target="_blank">+1 (718) 514-2721</a><u></u><u></u></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="tel:%2B972%20%2852%29%20764-9971" value="+972527649971" target="_blank">+972 (52) 764-9971</a></span><span lang="HE" dir="RTL" style="font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Websites </span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> CRM </span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> ERP </span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> Telephony </span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> Inventory </span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> Content Management</span></b><b><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Duvid Rottenberg [mailto:<a href="mailto:adrottenberg@gmail.com" target="_blank">adrottenberg@gmail.com</a>] <br>
<b>Sent:</b> Tuesday, December 24, 2013 8:51 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] answer via .net esl is getting ignored<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal">
<u></u> <u></u></p><div><p class="MsoNormal">Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information.<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Duvid Rottenberg<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div>
<div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein &lt;<a href="mailto:max@nysolutions.com" target="_blank">max@nysolutions.com</a>&gt; wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="color:#1f497d">What are you seeing in the logs?</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p><div><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#333399">Thanks,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#333399"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#333399">Moishe Grunstein</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#333399">Tornado Computer Systems, Inc.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#333399"><a href="tel:212.400.7650" target="_blank">212.400.7650</a> <a href="http://888.IPPBX.US" target="_blank">888.IPPBX.US</a><br>
</span><b><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#76923c">Service Request Email: <a href="mailto:support@nysolutions.com" target="_blank">support@nysolutions.com</a> </span></b><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#333399">Polycom Certified VAR<br>Microsoft Small Business Specialist, Cisco SMB Select Certified</span><u></u><u></u></p>
<p class="MsoNormal"><a href="http://www.nysolutions.com/" target="_blank"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d;text-decoration:none"><img border="0" width="147" height="68" src="cid:image003.jpg@01CF0244.F5313C30" alt="cid:image001.jpg@01C72F94.9EE45D60"></span></a><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8.0pt;color:#c0504d">Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS</span><u></u><u></u></p>
</div><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p><div><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:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Yisroel M. Olewski<br>
<b>Sent:</b> Tuesday, December 24, 2013 4:23 AM<br><b>To:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br><b>Subject:</b> [Freeswitch-users] answer via .net esl is getting ignored</span><u></u><u></u></p>
</div></div><div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Hello everyone<u></u><u></u></p><p class="MsoNormal">This is my first posting via the mailing list<u></u><u></u></p><p class="MsoNormal">I’m trying my hand at freeswitch esl with .net<u></u><u></u></p>
<p class="MsoNormal">I’ve managed to get a hold of all incoming events, but can’t seem to &quot;pick up the phone&quot;<u></u><u></u></p><p class="MsoNormal">my first goal is to pick up the phone and read out some text via tts<u></u><u></u></p>
<p class="MsoNormal">I’ve scoured the web, tried everything I can find or think of but no luck<u></u><u></u></p><p class="MsoNormal">here’s my code<u></u><u></u></p><p class="MsoNormal"><span dir="RTL"></span><span dir="RTL"></span><span lang="HE" dir="RTL"><span dir="RTL"></span><span dir="RTL"></span> </span><u></u><u></u></p>
<p class="MsoNormal">    Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded<u></u><u></u></p><p class="MsoNormal">        ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo)<u></u><u></u></p>
<p class="MsoNormal">                                                          FreeSwitch = New ESLconnection(&quot;10.0.0.1&quot;, 8021, &quot;mypass&quot;)<u></u><u></u></p><p class="MsoNormal">                                                          Dim eslEvent = FreeSwitch.SendRecv(&quot;event plain ALL&quot;)<u></u><u></u></p>
<p class="MsoNormal">                                                          FreeSwitch.SendRecv(&quot;event plain DTMF&quot;)<u></u><u></u></p><p class="MsoNormal">                                                          If eslEvent IsNot Nothing Then<u></u><u></u></p>
<p class="MsoNormal">                                                              AddEvent(eslEvent)<u></u><u></u></p><p class="MsoNormal">                                                              While FreeSwitch.Connected<u></u><u></u></p>
<p class="MsoNormal">                                                                  eslEvent = FreeSwitch.RecvEvent<u></u><u></u></p><p class="MsoNormal">                                                                  AddEvent(eslEvent)<u></u><u></u></p>
<p class="MsoNormal">                                                              End While<u></u><u></u></p><p class="MsoNormal">                                                          End If<u></u><u></u></p><p class="MsoNormal">
                                                      End Sub))<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">    End Sub<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">
    Private Sub AddEvent(e As ESLevent)<u></u><u></u></p><p class="MsoNormal">        Dim dd = TextCollection(e.Serialize(&quot;&quot;), &quot;: &quot;, vbLf)<u></u><u></u></p><p class="MsoNormal">        Dim eventname = dd(&quot;event-name&quot;)<u></u><u></u></p>
<p class="MsoNormal">        &#39;Dim uid = dd(&quot;Unique-ID&quot;)<u></u><u></u></p><p class="MsoNormal">        Dim uid = dd(&quot;Channel-Call-UUID&quot;)<u></u><u></u></p><p class="MsoNormal">        If dd(&quot;Caller-Network-Addr&quot;) &lt;&gt; &quot;&quot; Then<u></u><u></u></p>
<p class="MsoNormal">            Dim dcx = DBEntities()<u></u><u></u></p><p class="MsoNormal">            Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid)<u></u><u></u></p><p class="MsoNormal">            Dim ChannelState = dd(&quot;Channel-State&quot;)<u></u><u></u></p>
<p class="MsoNormal">            Dim ChannelCallState = dd(&quot;Channel-Call-State&quot;).ToLower<u></u><u></u></p><p class="MsoNormal">            Select Case eventname<u></u><u></u></p><p class="MsoNormal">                Case &quot;CHANNEL_STATE&quot;<u></u><u></u></p>
<p class="MsoNormal">                    If ses Is Nothing Then<u></u><u></u></p><p class="MsoNormal">                        ses = New Session<u></u><u></u></p><p class="MsoNormal">                        dcx.Sessions.AddObject(ses)<u></u><u></u></p>
<p class="MsoNormal">                    End If<u></u><u></u></p><p class="MsoNormal">                    ses.CallerHost = dd(&quot;Caller-Network-Addr&quot;)<u></u><u></u></p><p class="MsoNormal">                    ses.CallerName = UrlDecoded(dd(&quot;Caller-Caller-ID-Name&quot;))<u></u><u></u></p>
<p class="MsoNormal">                    ses.CallerPhone = dd(&quot;Caller-Caller-ID-Number&quot;)<u></u><u></u></p><p class="MsoNormal">                    ses.CallerUser = dd(&quot;Caller-Username&quot;)<u></u><u></u></p>
<p class="MsoNormal">                    ses.CalleeUser = dd(&quot;Caller-Destination-Number&quot;)<u></u><u></u></p><p class="MsoNormal">                    ses.ServerCode = uid<u></u><u></u></p><p class="MsoNormal">                    If {&quot;cs_destroy&quot;, &quot;cs_hangup&quot;}.Contains(ChannelState) Then ses.HungUpOn = Now<u></u><u></u></p>
<p class="MsoNormal">                Case &quot;CHANNEL_CALLSTATE&quot;<u></u><u></u></p><p class="MsoNormal">                    If ChannelCallState = &quot;ringing&quot; Then<u></u><u></u></p><p class="MsoNormal">                        Dim evn = FreeSwitch.Execute(&quot;answer&quot;, String.Empty, uid)<u></u><u></u></p>
<p class="MsoNormal">                        Dim res = evn.Serialize(&quot;&quot;)<u></u><u></u></p><p class="MsoNormal">                    End If<u></u><u></u></p><p class="MsoNormal">                Case &quot;CHANNEL_DESTROY&quot;<u></u><u></u></p>
<p class="MsoNormal">                    If ses IsNot Nothing Then ses.HungUpOn = Now<u></u><u></u></p><p class="MsoNormal">            End Select<u></u><u></u></p><p class="MsoNormal">            dcx.SaveChanges()<u></u><u></u></p>
<p class="MsoNormal">        End If<u></u><u></u></p><p class="MsoNormal">    End Sub<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">the answer line is getting reached, and the result is &quot;+OK&quot; but the phone still keeps ringing<u></u><u></u></p>
<p class="MsoNormal">please note that I’m unsure which is the correct uuid, but trying both of them gave me identical results<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">As per advise from Nuwan Wijerathne, I put the “answer” action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands.<u></u><u></u></p>
<p class="MsoNormal">It picks up, and immediately hangs up because it has finished the whole dialplan<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I’d appreciate your help. I’m pretty new to freeswitch and esl<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Please advise<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><i><span style="color:#0f243e">Sincerely,</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:#0f243e">ymo</span></i><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><span dir="RTL"></span><span dir="RTL"></span><span lang="HE" dir="RTL"><span dir="RTL"></span><span dir="RTL"></span> </span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div><br>_________________________________________________________________________<br>

Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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>
<br></blockquote></div><br></div>