You might try this suggestion:
Create a new file for your custom macros: /conf/lang/en/demo/custom-phrases.xml
<include>
<macro name="confwelcome">
<input pattern="(.*)">
<action function="play-file" data="vm/vm-youhave.wav"/>
</input>
</macro>
</include>
Now you have a single place to put all of your custom macros. Be sure to reloadxml!
-MC
Hello,
I am playing around with Phrases to use them with conference application.
But i've encountered rudimentary problem of how to use newly added macro.
What I already did is (according to wiki Speech Phrase Management)
http://wiki.freeswitch.org/wiki/Speech_Phrase_Management
- confirmed that there is "mod_say_en" loaded (<load module="mod_say_en"/>)
- confirmed that there are proper .wav files
- modified onf/lang/en/en.xml file:
<section name="phrases" description="Speech Phrase Management">
<macros>
<language name="en" sound_path="$${sounds_dir}/en/us/callie"
tts_engine="cepstral" tts_voice="callie">
<macro name="confwelcome">
<input pattern="(.*)">
<match>
<action function="play-file" data="vm-youhave.wav"/>
<!-- just to test the phrase-->
</match>
</language>
</macros>
</section>
- modified a part of dialplan:
<extension name="conference_48112223344">
<condition field="destination_number" expression="^(\d{11})$">
<action application="phrase" data="confwelcome"/>
</condition>
</extension>
I have following outcome:
2010-02-26 19:57:09.487245 [DEBUG] switch_core_session.c:638 Send
signal sofia/internal/1000@217.153.192.36 [BREAK]
EXECUTE sofia/internal/1000@217.153.192.36 phrase(confwelcome)
2010-02-26 19:57:09.487245 [DEBUG] mod_dptools.c:1850 Execute confwelcome() lang
2010-02-26 19:57:09.487245 [DEBUG] switch_ivr_play_say.c:118 No
language specified - Using [en]
2010-02-26 19:57:09.496322 [ERR] switch_ivr_play_say.c:202 Can't find
macro confwelcome.
2010-02-26 19:57:09.496322 [WARNING] switch_ivr_play_say.c:368 Macro
[confwelcome] did not match any patterns
Strange is that if i use a wiki example, it works. To be more precise:
- conf/lang/en/en.xml file was overwritten with an example macros
(directly from aforementioned wiki).
- dialplan was modified:
<extension name="conference_48112223344">
<condition field="destination_number" expression="^(\d{11})$">
<action application="phrase" data="msgcount"/>
</condition>
</extension>
Am i doing something wrong?
Thx,
Maciej.
_______________________________________________
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