[Freeswitch-users] how to play a prompt after connection
Dave Horton
daveh at beachdognet.com
Wed Aug 29 15:24:00 MSD 2012
> Set api_on_answer to execute
> uuid_broadcast<
> http://wiki.freeswitch.org/wiki/Mod_commands#uuid_broadcast
> >
> which
> will let you pick which legs to play the recording to.
> You can pass in the UUID with ${uuid}
>
> -Avi
>
I tried this, and it worked.....sort of. If I play the prompt the A leg it is fine -- caller hears the prompt, then is connected to called party. If I play it to the B leg, however, the prompt does not seem to start playing at all until the B party actually starts talking, and then the prompt is played extremely choppy and slow.....it takes about 10 seconds to play a 4 second prompt. Meanwhile, the caller and called party can't hear each other. Any idea what is going on and how to fix it? I am doing it in lua as follows:
session:execute("export","nolocal:jitterbuffer_msec=100") ;
session:setVariable("RECORD_STEREO","true") ;
session:setVariable("aleg_uuid",uuid) ;
session:execute("record_session", outfile) ;
session:execute("set","progress_timeout=60") ;
session:execute("set","call_timeout=120") ;
session:setVariable("hangup_after_bridge","true") ;
session:execute("bridge","sofia/normal_customer/${outdial}@${egress_gateway}") ;
--session:execute("bridge","{api_on_answer='uuid_broadcast " .. uuid .. " " .. this_call_is_being_recorded .. " " .. "bleg'}sofia/normal_customer/${outdial}@${egress_gateway}") ;
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list