<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">For the life of me I am still unable to get the bridged call status, when I subscribe to an "event" I am not here is my perl code snippet below, what am I doing wrong?<br><br><br>my $fs = new ESL::ESLconnection($host, $port, $password);<br><br>$session-&gt;answer();<br><br>if ($session-&gt;ready ()) <br>{<br>&nbsp;&nbsp;&nbsp; #set bridge settings<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "ringback=$ringback_tone");&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "instant_ringback=true");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "ignore_early_media=false"); <br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "call_timeout=60");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;
 $session-&gt;execute("set", "progress_timeout=15");<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "origination_caller_id_number=$caller_id");<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "continue_on_fail=false");<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("bridge", "sofia/gateway/provider1/$destination_number");<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $fs-&gt;sendRecv("event plain ALL");<br>&nbsp;&nbsp;&nbsp; $fs-&gt;send("linger");<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; while($fs-&gt;connected())<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $data = $fs-&gt;recvEvent();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ( $data =~ m/Answered-State: (\w+)/m ) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; my $state = $1;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; #print
 "Channel state is $state\n";<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; if ( $state eq 'answered' ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;freeswitch::consoleLog("INFO", "CALL ANSWERED\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;freeswitch::consoleLog("INFO", "NO CALLS ANSWERED\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br>}<br>&nbsp;&nbsp; <br>$session-&gt;hangup();<br>&nbsp;<br>return 1;<br><br>--- On <b>Fri, 7/22/11, Hector Geraldino
 <i>&lt;Hector.Geraldino@ip-soft.net&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Hector Geraldino &lt;Hector.Geraldino@ip-soft.net&gt;<br>Subject: Re: [Freeswitch-users] Asterisk dial status<br>To: "FreeSWITCH Users Help" &lt;freeswitch-users@lists.freeswitch.org&gt;<br>Date: Friday, July 22, 2011, 2:28 PM<br><br><div id="yiv27363414"><style><!--
#yiv27363414  
 _filtered #yiv27363414 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered #yiv27363414 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv27363414  
#yiv27363414 p.yiv27363414MsoNormal, #yiv27363414 li.yiv27363414MsoNormal, #yiv27363414 div.yiv27363414MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv27363414 a:link, #yiv27363414 span.yiv27363414MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv27363414 a:visited, #yiv27363414 span.yiv27363414MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv27363414 p.yiv27363414msonormal, #yiv27363414 li.yiv27363414msonormal, #yiv27363414 div.yiv27363414msonormal
        {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:"serif";}
#yiv27363414 span.yiv27363414msohyperlink
        {}
#yiv27363414 span.yiv27363414msohyperlinkfollowed
        {}
#yiv27363414 span.yiv27363414emailstyle17
        {}
#yiv27363414 p.yiv27363414msonormal1, #yiv27363414 li.yiv27363414msonormal1, #yiv27363414 div.yiv27363414msonormal1
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv27363414 span.yiv27363414msohyperlink1
        {color:blue;text-decoration:underline;}
#yiv27363414 span.yiv27363414msohyperlinkfollowed1
        {color:purple;text-decoration:underline;}
#yiv27363414 span.yiv27363414emailstyle171
        {font-family:"sans-serif";color:#1F497D;}
#yiv27363414 span.yiv27363414EmailStyle25
        {font-family:"sans-serif";color:#1F497D;}
#yiv27363414 .yiv27363414MsoChpDefault
        {}
 _filtered #yiv27363414 {margin:1.0in 1.0in 1.0in 1.0in;}
#yiv27363414 div.yiv27363414WordSection1
        {}
--></style><div class="yiv27363414WordSection1"><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">It does.</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">You can check the events by connecting to FS on inbound mode, or using FS outbound socket connection to an application designed by you. </span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">As you already have a perl script to interact with FS, you can modify it to connect to FS (inbound mode) and listen for events. You can subscribe to the
 events of a particular call, or filter an specific set of events. I haven’t used Asterisk before so I’m not sure how the AGI fits on the FS architecture.</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">You can get more info at:</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"><a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/wiki/Mod_event_socket">http://wiki.freeswitch.org/wiki/Mod_event_socket</a></span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">And a
 working demo at:</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> <a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/wiki/Perl_freeswitch_client_example">http://wiki.freeswitch.org/wiki/Perl_freeswitch_client_example</a></span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><p class="yiv27363414MsoNormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"> &nbsp;</span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;"><p class="yiv27363414MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;sans-serif&quot;;">From:</span></b><span
 style="font-size:10.0pt;font-family:&quot;sans-serif&quot;;"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Sam<br><b>Sent:</b> Friday, July 22, 2011 4:23 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Asterisk dial status</span></p></div><p class="yiv27363414MsoNormal"> &nbsp;</p><table class="yiv27363414MsoNormalTable" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="padding:0in 0in 0in 0in;" valign="top"><p class="yiv27363414MsoNormal">Sam,<br><br>Does this require event sockets? Or how would I check these events?<br><br>--- On <b>Fri, 7/22/11, Hector Geraldino <i>&lt;Hector.Geraldino@ip-soft.net&gt;</i></b> wrote:</p><p class="yiv27363414MsoNormal" style="margin-bottom:12.0pt;"><br>From: Hector Geraldino &lt;Hector.Geraldino@ip-soft.net&gt;<br>Subject: Re: [Freeswitch-users] Asterisk dial status<br>To: "FreeSWITCH Users Help"
 &lt;freeswitch-users@lists.freeswitch.org&gt;<br>Date: Friday, July 22, 2011, 11:57 AM</p><div id="yiv27363414"><div><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">Hi Sam,</span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">&nbsp;</span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">My guess is that you can subscribe to the events of the channel and evaluate the channel events. Look at:</span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">&nbsp;</span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;"><a rel="nofollow" target="_blank"
 href="http://wiki.freeswitch.org/wiki/Event_List">http://wiki.freeswitch.org/wiki/Event_List</a></span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">&nbsp;</span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">specifically the channel events list.</span></p><p class="yiv27363414msonormal"><span style="font-size:11.0pt;font-family:&quot;sans-serif&quot;;color:#1F497D;">&nbsp;</span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;"><p class="yiv27363414msonormal"><b><span style="font-size:10.0pt;font-family:&quot;sans-serif&quot;;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;sans-serif&quot;;"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Sam<br><b>Sent:</b> Friday, July 22, 2011 2:32
 PM<br><b>To:</b> freeswitch-users@lists.freeswitch.org<br><b>Subject:</b> [Freeswitch-users] Asterisk dial status</span></p></div><p class="yiv27363414msonormal">&nbsp;</p><table class="yiv27363414MsoNormalTable" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="padding:0in 0in 0in 0in;" valign="top"><p class="yiv27363414msonormal">Hi,<br><br>I am trying to port over an Asterisk AGI script that does a call bridge to Freeswitch using perl, I wanted to know what is the equivalent of the asterisk dial status like: ANSWER, NO_ANSWER, CANCEL, BUSY, CONGESTION, CHANUNAVAIL ? I wanted to know if what methods can be used to gets these statues?</p></td></tr></tbody></table><p class="yiv27363414msonormal"><span style="font-size:10.0pt;font-family:&quot;sans-serif&quot;;">&nbsp;</span></p></div></div><p class="yiv27363414MsoNormal" style="margin-bottom:12.0pt;"><br>-----Inline Attachment Follows-----</p><div><p
 class="yiv27363414MsoNormal">_______________________________________________<br>Join us at ClueCon 2011, Aug 9-11, Chicago<br><a rel="nofollow" target="_blank" href="http://www.cluecon.com">http://www.cluecon.com</a> 877-7-4ACLUE<br><br>FreeSWITCH-users mailing list<br><a rel="nofollow">FreeSWITCH-users@lists.freeswitch.org</a><br><a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a></p></div></td></tr></tbody></table><p class="yiv27363414MsoNormal"><span style="font-size:10.0pt;font-family:&quot;sans-serif&quot;;"> &nbsp;</span></p></div></div><br>-----Inline
 Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Join us at ClueCon 2011, Aug 9-11, Chicago<br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="/mc/compose?to=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></div></blockquote></td></tr></table>