[Freeswitch-users] IVR -> Phrase with a parameter
Michael Collins
msc at freeswitch.org
Sun Jun 12 02:14:33 MSD 2011
If you had read chapter 6 of the bridge book you'd know the answer. ;)
If you want to pass arguments then do something like this:
greet-long="phrase:cc_ivr_main_menu:${cash}:${arg2}:${arg3}"
and
<macro name="cc_ivr_main_menu">
<input pattern="(.*?):(.*?):(.*?)">
<!-- ${cash} is in $1 now -->
<!-- ${arg2} is in $2 now -->
<!-- ${arg3} is in $3 now -->
Now you can use $1, $2, $3, etc. in your phrase macro. If you want to see
macros in action then I suggest you look at the voicemail macros - they do
all sorts of stuff. Of course, if you'd read chapter 6 of the FS book you'd
know that, too. ;)
-MC
P.S. - Did I mention chapter 6 of the book? :D The reason I'm so familiar
with it is because I wrote the stuff on phrase macros in chapter 6 and
chapter 7...
On Sat, Jun 11, 2011 at 2:20 PM, Avi Marcus <avi at avimarcus.net> wrote:
> I'm kinda new to IVRs and Phrases, but I see this:
>
> <action application="phrase" data="msgcount,130"/>
> <macro name="msgcount">
> <input pattern="(.*)">
>
> Meaning I can pass a parameter to the phrase, and then set different
> matching input configurations.
>
> Now, I see phrases are being used in the IVR:
> I'd like to have an announcement of a balance at the beginning, but
> start listening for the digits already.
> But, I'd like to have two different types of announcement in the beginning.
> I can either duplicate and create two different IVRs and two different
> sets of phrases, or I can take advantage of that parameter passing.
>
> But when I try: greet-long="phrase:cc_ivr_main_menu,${cash}" I get:
> 2011-06-12 00:05:24.788910 [ERR] switch_ivr_play_say.c:142 Can't find
> macro cc_ivr_main_menu,33.09.
>
> Am I missing something?
> Do I need to make a lua IVR to start capturing digits while I play
> other audio (how??) or create split the IVR into two nearly duplicate
> ones?
>
> Thanks,
> Avi
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110611/8ff503d4/attachment.html
More information about the FreeSWITCH-users
mailing list