Its probably based on your network.  Are you behind NAT?  Sometimes it takes a few seconds for the automatic translation to kick in.
You can add a sleep 1000 after answer to ensure you have established media before you play the tone.



On Mon, Apr 7, 2014 at 5:10 PM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Hi guys,

I have the following in my dialplan:

      <condition field="${<some field>}" expression="<some expression>">
        <action application="answer"/>
        <action application="set" data="api_hangup_hook=curl <some URL>"/>
        <action application="playback" data="tone_stream://v=0;%(1000,0,600)" />
        <action application="conference" data="$1@default"/>
      </condition>

Notice the line in bold.  In most cases the tone plays fine but in some cases it is shorter than 1 second and in a few cases it does not play at all.  Has anyone run into this?  Is there a way to make the occasional media delay after answer go away?

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

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




--
Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬

☞ http://freeswitch.org/  ☞ http://cluecon.com/  ☞ http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ http://freeswitch.org/g+

ClueCon Weekly Development Call 
☎ sip:888@conference.freeswitch.org  ☎ +19193869900