[Freeswitch-users] Phrase macros in conferences

Anthony Minessale anthony.minessale at gmail.com
Tue Jun 28 17:54:49 MSD 2011


with the new say_string function you can build some stuff, its only
one component of phrase macros but its the best we have.

${say_string en en number pronounced 60}

This evals to:

file_string://digits/60.wav

As I was writing this reply I added something to latest get that may
make it a little easier to mix with other files.

${say_string en en number pronounced ~60}

This evals to:

digits/60.wav

so you could chain it together with your own file_string url

file_string://youhave.wav!${say_string en en number pronounced ~60}!messages.wav

This evals to:

file_string://youhave.wav!digits/60.wav!messages.wav


So you can eval and build these in the conference.





On Tue, Jun 28, 2011 at 4:49 AM, Kris <kris at livecall.com> wrote:
> The conference controls/profiles cant be changed after the conference
> starts. Do You know C? We all have to do some C when Freeswitch can't do
> what we want.A feature would have to be added to mod_conference to play
> files unpon joining the conference. It would have to be something like this:
> <action application="conference"
> data="${forum_ext}-${domain_name}@${conference_controls},PlayOnEntry=${name_var}&conf-enter.wav,PlayOnExit=???"/>
>
> To really do the fancier stuff, you have to capture the CUSTOM event. Just
> do it with 2 API calls. Both are scheduled to play one after the other.
> Api.Execute("conference", ConferenceName + " play " + "name.wav");
> //+MemberID);
>
> Api.Execute("conference", ConferenceName + " play " + "conf-enter.wav");
> //+MemberID);
>
> ----- Original Message -----
> From: "Bryan Smart" <bryansmart at bryansmart.com>
> To: "FreeSWITCH Users Help" <freeswitch-users at lists.freeswitch.org>
> Sent: Monday, June 27, 2011 1:03 PM
> Subject: Re: [Freeswitch-users] Phrase macros in conferences
>
>
> Yes, but not sure how I'd do that. In the conference profile, I can play a
> single sound file for an enter/leave. I can't join two files with "!" to
> have them play in series, like "name.wav!conference/conf-enter.wav".
>
> Bryan
>
> On Jun 27, 2011, at 3:37 PM, Brad Mina wrote:
>
> You could have users prompted to record their name to get around the first
> issue and play it back before "... Has joined the conference" is played
> back.
>
> Sent from my iPhone
>
> On Jun 27, 2011, at 12:05 PM, Bryan Smart
> <bryansmart at bryansmart.com<mailto:bryansmart at bryansmart.com>> wrote:
>
> Thanks, Michael. At least I know that it is a limitation, and not me
> overlooking something. :) I have 3 or 4 years on Asterisk, but only months
> on Freeswitch, so I'm always concerned that I haven't dug enough before
> posting requests.
>
> For phrases inside conferences, I imagine 3 cases.
>
> First are dynamic announcements, such as those that announce when someone
> joins or leaves a conference. It is helpful if the joining or leaving party
> can be identified. I imagined combining TTS for the name, along with a
> pre-recorded fragment like conference/conf-has_joined.wav. The result would
> be like "John has entered the conference." Right now, I must use entirely
> TTS for such announcements. I can't use "!" to concatenate files, and I
> can't defer to a phrase macro to string TTS and recordings together.
>
> Second applies to localization. In a dynamic announcement, it might not be
> appropriate for the noun to be spoken first in languages other than English.
> Right now, the conference's prompt language must be customized by creating a
> different conference profile that specifies the correct sound base for the
> language. That could mean that the number of profiles in use has to be
> multiplied by the number of languages that should be supported. I know that
> the profile can omit the sound base, and the sound base of the first person
> to join will be used, but, particularly in a situation that concatenates TTS
> and audio, that can be worse. If the first person to join automatically
> selects sound files for a language, but the concatenation order is different
> for that language, then any rules in that profile that concatenate TTS and
> recordings to render announcements could result in strange outcomes. As far
> as I've been able to discover, the phrase system is the appropriate
> Freeswitch way to localize announcements, so it would probably be best for
> Conference to work that way also, rather than depending on per-case
> localization being handled with multiple profiles. If phrases were
> supported, then a single conference profile could play both static and
> dynamic prompts, and could automatically adjust to any language where phrase
> macros are present on the system.
>
> Last are cases when multiple types of notification are desired. For example,
> notifications might use a combination of cues and speech. An audio cue
> serves a similar function to a visual icon: attracts attention and conveys
> general meaning. In a situation like a conference, there might be soft audio
> cues for joining, leaving, when a new person has the floor, etc. When one of
> those events takes place, the cue plays first to attract attention and set
> the listener's expectations regarding the type of spoken information that
> will follow. Next, an announcement is heard with details about the event.
> "<cue> John has left  the conference."
>
>
>
>
>
>
> On Jun 27, 2011, at 11:25 AM, Michael Collins wrote:
>
> Phrase macros are not supported inside mod_conference. If you look inside
> mod_conference.c you will see that it has its own functions for injecting
> audio into the conference and it does not support phrase macros. You can
> open up a feature request on Jira. I honestly don't know how easy/difficult
> this would be, so you may consider offering a bounty to sweeten the deal.
>
> Curious: what types of phrases are you trying to play into the conference?
>
> -MC
>
> On Sun, Jun 26, 2011 at 4:57 PM, Bryan Smart
> <<mailto:bryansmart at bryansmart.com>bryansmart at bryansmart.com<mailto:bryansmart at bryansmart.com>>
> wrote:
> I'm attempting to use phrase macros in mod_conference, but I'm not having
> success. Perhaps they aren't supported?
>
> I have a working phrase macro. In the dialplan, both
>
> <action application="phrase" data="my_phrase"/>
>
> and
>
> <action application="playback" data="phrase:my_phrase"/>
>
> Work just fine.
>
> The wiki says that, in conference.conf.xml, entries like pin-sound accept,
> for their value, file paths, strings prefixed with "say" for TTS, and
> strings prefixed with "tone_stream". This looks almost the same as what can
> be passed to the playback application in the dialplan. When I try to prefix
> a string with "phrase", it doesn't work.
>
> <param name="pin-sound" value="phrase:my_phrase"/>
>
> The console tells me "unknown file format". The console still tells me this
> if I make up phrase names
>
> <param name="pin-sound" value="phrase:not_a_real_phrase"/>
>
> So it is complaining about the syntax or capability, rather than an
> unrecognized format of an actual file.
>
> If mod_conference doesn't support phrase macros, is this a near-future
> feature? Phrases would seem to be necessary to ocalize announcements and
> play announcements that are stitched together from multiple files.
>
> Bryan
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> <http://www.cluecon.com/>http://www.cluecon.com<http://www.cluecon.com/>
> 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> <mailto:FreeSWITCH-users at lists.freeswitch.org>FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
> <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:<http://lists.freeswitch.org/mailman/options/freeswitch-users>http://lists.freeswitch.org/mailman/options/freeswitch-users
> <http://www.freeswitch.org/>http://www.freeswitch.org<http://www.freeswitch.org/>
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> <http://www.cluecon.com/>http://www.cluecon.com<http://www.cluecon.com/>
> 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> <mailto:FreeSWITCH-users at lists.freeswitch.org>FreeSWITCH-users at lists.freeswitch.org<mailto: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, Chicago
> http://www.cluecon.com<http://www.cluecon.com/> 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto: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<http://www.freeswitch.org/>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto: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, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



More information about the FreeSWITCH-users mailing list