Why not bgapi and listen for the CHANNEL_ANSWER event?<br><br><div class="gmail_quote">On 25 July 2011 19:36, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><br><div class="gmail_quote"><div class="im">On Mon, Jul 25, 2011 at 10:56 AM, Sam <span dir="ltr"><<a href="mailto:lakersman2006@yahoo.com" target="_blank">lakersman2006@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">What I want to do is play different sound files back to the caller when the call is NO_ANSWER, BUSY, etc. So I don't think your suggestion would work.<br>
</td></tr></tbody></table></blockquote></div><div>I think maybe you have a case of "Asteriskitis" in all this. :)</div><div><br></div><div>FreeSWITCH makes it easy to do this without actually checking the dial status. The only thing you need to do is come up with a dialplan extension that handles the various failure notifications to the caller. Consider an extremely simple case:</div>
<div><br></div><div><font face="'courier new', monospace"><extension name="bridge_with_failover"></font></div><div><font face="'courier new', monospace"> <condition field="destination_number" expression="1?(\d{10})"></font></div>
<div><font face="'courier new', monospace"> <action application="set" data="hangup_after_bridge=false"/></font></div><div><font face="'courier new', monospace"> <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,NO_ROUTE_DESTINATION"/></font></div>
<div><font face="'courier new', monospace"> <action application="bridge" data="sofia/gateway/mygw/+1$1"></font></div><div><font face="'courier new', monospace"> <!-- the stuff after the bridge only gets executed on the failure conditions listed above --></font></div>
<div><font face="'courier new', monospace"> <action application="playback" data="call_failed.wav"/></font></div><div><font face="'courier new', monospace"> <action application="hangup"/></font></div>
<div><font face="'courier new', monospace"> </condition></font></div><div><font face="'courier new', monospace"></extension></font></div><div>
<br></div><div>In the above case, if the call works then there's no problem. If the call fails, dialplan processing continues on and plays to the caller an error. If you want to get fancy and have something specific happen then you can either create some dialplan extensions that play various sound files, or you can launch a dialplan script (like your perl script) and check ${bridge_hangup_cause} to see what "really" happened on the bridge attempt.</div>
<div><br></div><div>Enjoy!</div><div>-MC</div></div>
<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 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><br clear="all"><br>-- <br><a href="http://www.suretecsystems.com/services/openldap/" target="_blank">http://www.suretecsystems.com/services/openldap/</a><br><a href="http://www.surevoip.co.uk" target="_blank">http://www.surevoip.co.uk</a><br>