<br><br><div class="gmail_quote">On Mon, Jul 25, 2011 at 10:56 AM, Sam <span dir="ltr">&lt;<a href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt;</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&#39;t think your suggestion would work.<br>
</td></tr></tbody></table></blockquote><div>I think maybe you have a case of &quot;Asteriskitis&quot; 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 class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;extension name=&quot;bridge_with_failover&quot;&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;condition field=&quot;destination_number&quot; expression=&quot;1?(\d{10})&quot;&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,NO_ROUTE_DESTINATION&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/mygw/+1$1&quot;&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;!-- the stuff after the bridge only gets executed on the failure conditions listed above --&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;playback&quot; data=&quot;call_failed.wav&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;hangup&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;/condition&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;/extension&gt;</font></div><div>
<br></div><div>In the above case, if the call works then there&#39;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 &quot;really&quot; happened on the bridge attempt.</div>
<div><br></div><div>Enjoy!</div><div>-MC</div></div>