<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I just want to be able to get the call statues like ANSWER, NO_ANSWER, BUSY etc. but Freeswitch does not return these statuses after the bridge app is finished.<br><br>--- On <b>Sun, 7/24/11, Peter Olsson <i><peter.olsson@visionutveckling.se></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Peter Olsson <peter.olsson@visionutveckling.se><br>Subject: Re: [Freeswitch-users] Asterisk dial status<br>To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org><br>Date: Sunday, July 24, 2011, 12:01 PM<br><br><div class="plainMail">I've never used Perl for this, but I'm pretty sure that the last line won't return until the bridge is done (because of call finishied or failed).<br><br>What exactly do you want to accomplish - I think there is probably an easier way for
what you're trying to solve.<br><br>/Peter<br>________________________________________<br>Från: <a ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [<a ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] för Sam [<a ymailto="mailto:lakersman2006@yahoo.com" href="/mc/compose?to=lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>]<br>Skickat: den 24 juli 2011 20:45<br>Till: FreeSWITCH Users Help<br>Ämne: Re: [Freeswitch-users] Asterisk dial status<br><br>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->answer();<br><br>if ($session->ready ())<br>{<br> #set bridge settings<br> $session->execute("set", "ringback=$ringback_tone");<br> $session->execute("set", "instant_ringback=true");<br> $session->execute("set", "ignore_early_media=false");<br> $session->execute("set", "call_timeout=60");<br> $session->execute("set", "progress_timeout=15");<br> $session->execute("set", "origination_caller_id_number=$caller_id");<br> $session->execute("set", "continue_on_fail=false");<br> $session->execute("bridge", "sofia/gateway/provider1/$destination_number");<br><br> $fs->sendRecv("event plain ALL");<br> $fs->send("linger");<br><br> while($fs->connected())<br> {<br> $data = $fs->recvEvent();<br><br>
if ( $data =~ m/Answered-State: (\w+)/m )<br> {<br> my $state = $1;<br><br> #print "Channel state is $state\n";<br><br> if ( $state eq 'answered' ) {<br><br> freeswitch::consoleLog("INFO", "CALL ANSWERED\n");<br><br> }<br> else<br> {<br> freeswitch::consoleLog("INFO", "NO CALLS ANSWERED\n");<br> }<br> }<br> }<br>}<br><br>$session->hangup();<br><br>return 1;<br><br>--- On Fri, 7/22/11, Hector Geraldino <<a
ymailto="mailto:Hector.Geraldino@ip-soft.net" href="/mc/compose?to=Hector.Geraldino@ip-soft.net">Hector.Geraldino@ip-soft.net</a>> wrote:<br><br>From: Hector Geraldino <<a ymailto="mailto:Hector.Geraldino@ip-soft.net" href="/mc/compose?to=Hector.Geraldino@ip-soft.net">Hector.Geraldino@ip-soft.net</a>><br>Subject: Re: [Freeswitch-users] Asterisk dial status<br>To: "FreeSWITCH Users Help" <<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>Date: Friday, July 22, 2011, 2:28 PM<br><br><br>It does.<br><br><br><br>You can check the events by connecting to FS on inbound mode, or using FS outbound socket connection to an application designed by you.<br><br><br><br>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.<br><br><br><br>You can get more info at:<br><br><a href="http://wiki.freeswitch.org/wiki/Mod_event_socket" target="_blank">http://wiki.freeswitch.org/wiki/Mod_event_socket</a><br><br><br><br>And a working demo at:<br><br><a href="http://wiki.freeswitch.org/wiki/Perl_freeswitch_client_example" target="_blank">http://wiki.freeswitch.org/wiki/Perl_freeswitch_client_example</a><br><br><br><br><br><br><br><br>From: <a ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Sam<br>Sent:
Friday, July 22, 2011 4:23 PM<br>To: FreeSWITCH Users Help<br>Subject: Re: [Freeswitch-users] Asterisk dial status<br><br><br><br>Sam,<br><br>Does this require event sockets? Or how would I check these events?<br><br>--- On Fri, 7/22/11, Hector Geraldino <<a ymailto="mailto:Hector.Geraldino@ip-soft.net" href="/mc/compose?to=Hector.Geraldino@ip-soft.net">Hector.Geraldino@ip-soft.net</a>> wrote:<br><br>From: Hector Geraldino <<a ymailto="mailto:Hector.Geraldino@ip-soft.net" href="/mc/compose?to=Hector.Geraldino@ip-soft.net">Hector.Geraldino@ip-soft.net</a>><br>Subject: Re: [Freeswitch-users] Asterisk dial status<br>To: "FreeSWITCH Users Help" <<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>Date: Friday, July 22, 2011, 11:57 AM<br><br>Hi Sam,<br><br><br><br>My guess is that you can subscribe to the events of the channel and
evaluate the channel events. Look at:<br><br><br><br><a href="http://wiki.freeswitch.org/wiki/Event_List" target="_blank">http://wiki.freeswitch.org/wiki/Event_List</a><br><br><br><br>specifically the channel events list.<br><br><br><br>From: <a ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Sam<br>Sent: Friday, July 22, 2011 2:32 PM<br>To: <a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="/mc/compose?to=freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>Subject: [Freeswitch-users] Asterisk dial status<br><br><br><br>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?<br><br><br><br><br>-----Inline Attachment Follows-----<br><br>_______________________________________________<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><br><br><br><br>-----Inline Attachment Follows-----<br><br>_______________________________________________<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></mc/compose?to=<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><br>!DSPAM:4e2c68e932761895611653!<br><br>_______________________________________________<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>