Why not bgapi and listen for the CHANNEL_ANSWER event?
On Mon, Jul 25, 2011 at 10:56 AM, Sam <lakersman2006@yahoo.com> wrote:
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.
I think maybe you have a case of "Asteriskitis" in all this. :)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:<extension name="bridge_with_failover"><condition field="destination_number" expression="1?(\d{10})"><action application="set" data="hangup_after_bridge=false"/><action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,NO_ROUTE_DESTINATION"/><action application="bridge" data="sofia/gateway/mygw/+1$1"><!-- the stuff after the bridge only gets executed on the failure conditions listed above --><action application="playback" data="call_failed.wav"/><action application="hangup"/></condition></extension>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.Enjoy!-MC
_______________________________________________
Join us at ClueCon 2011, Aug 9-11, Chicago
http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org