[Freeswitch-users] Early media playback

Chris Martineau chris at ghosttelecom.com
Wed Sep 21 18:30:13 MSD 2011


Hi,

Managed to fix this by trying every possible combination starting from a
very basic scenario.

Works as follows...

Execute on media <playback etc> inline
Pre-answer inline (must be inline)
<whatever else you want to do>
Bridge

My big mistake was having proxy media enabled. Must be full fs
processing for early media playback to work.
You can use proxy media but only works when set as part of the bridge
action.

I don't ignore far end 183 as I want this to kick in after my playback
and works as I want.

Only a couple of things I am still stuck on.

1. I would like to terminate the playback on answer but cannot find any
obvious process to do this. Obviously you could do an execute_on_answer
but can't see what I would execute to achieve the desired effect?
Currently if the far end answers quickly they get silence until the
playback has finished and then they get through.

2. How do you execute multiple applications on answer? I need to execute
a sched_hangup and a sched_broadcast on answer so that the timers start
from answer. However cannot find any combination which allows me to put
multiple apps in the same execute on answer action. If I just create
multiple action entries it only seems to action the last one entered?
So have...
application='set' data='execute_on_answer=sched_hangup +XX
allotted_timeout'
if I add...
application='set' data='execute_on_answer=sched_broadcast +XX
/path/file'
only the broadcast triggers?

Many thanks again

Chris

-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Kristian Kielhofner
Sent: 21 September 2011 15:04
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Early media playback

While I haven't done this before you probably need to ignore the 183
from the remote end and set execute_on_preanswer or possibly
execute_on_media:

<action application="export"
data="nolocal:execute_on_preanswer=playback somefile"/>
<action application="export" data="nolocal:ignore_early_media=true"/>
<action application="bridge" data="bridge/string"/>

  However if you're getting a codec error now you probably have some
other issues to deal with.  It looks like you're trying to use
mod_native_file.  Can you try a normal wav (using mod_sndfile) and try
it again with the above code snippet?  Send the FS console logs to
http://pastebin.freeswitch.org.

On Wed, Sep 21, 2011 at 5:24 AM, Chris Martineau
<chris at ghosttelecom.com> wrote:
> Hi
>
>
>
> Trying to play a custom announcement/welcome to the a leg on receiving
a 183
> from the far end.
>
> Have tried a straight playback just before the bridge which confirms
that it
> finds the playback file as the recording is heard but as this is a bit
nasty
> FS complains with a codec error and closes the call.
>
> Tried execute on media with the same playback details as follows...
>
> <action application="set" data="execute_on_media=playback
/path/mediafile"
>
> Which according to the logs seems to work but I get just silence until
I
> presume the file stops playing which is strange as the file plays fine
when
> using a forced playback?
>
> Logs in both cases show the same file being found and used
mediafile.PCMA.
>
>
>
> Also I would like to terminate the playback on answer but cannot find
any
> obvious process to do this. Obviously you could do an
execute_on_answer but
> can't see what I would execute to achieve the desired effect?
>
>
>
> Many thanks for any help you can offer.
>
>
>
> Regards
>
>
>
>
>
> Chris
>
>
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>



-- 
Kristian Kielhofner


FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list