" /> Change grammar during call - Genesys CTI User Forum

Author Topic: Change grammar during call  (Read 4956 times)

anoredis

  • Guest
Change grammar during call
« on: November 05, 2013, 08:34:13 AM »
Advertisement
Hello there!

Is there any way to change the grammar file when inside the callflow in a similar (or any) way like when you are changing the language?
My scenario is this. I have an application that uses a specific grammar file. I am connecting this to a bigger one and I insert it as a subcallflow. The problem is that it uses the grammar file of the first application. How am I supposed to overcome this issue? I need to keep this architecture, I mean the one with the subcallflows under the main application.

Thanks in advance!
« Last Edit: November 05, 2013, 08:51:19 AM by anoredis »

Marked as best answer by on April 07, 2025, 05:56:01 PM

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Change grammar during call
« Reply #1 on: November 05, 2013, 01:54:31 PM »
  • Undo Best Answer
  • Quite not sure if understand you question...you can establish a grammar per input...wouldn't make much sense to have a single one for all call flow.
    http://cafe.bevocal.com/docs/grammar/using.html


    anoredis

    • Guest
    Re: Change grammar during call
    « Reply #2 on: November 06, 2013, 07:52:34 AM »
    Thanks for the response cavagnaro! My problem is that I have developed two grammar files. I need the second one to be used when a currency variable has to be announced because it interprates the variable in a different way than the "normal". It announces the fraction of the variable segrageted in a manner that the users understand. The problem is that I have to announce balances too in the application so I cannot use this kind of interpratation. I need to change the grammar file not for the input but for a single prompt!

    Offline cavagnaro

    • Administrator
    • Hero Member
    • *****
    • Posts: 7641
    • Karma: 56330
    Re: Change grammar during call
    « Reply #3 on: November 06, 2013, 09:26:17 AM »
    We are talking about GVP 8, right? If so then would I'd do is create some custom function (on the jsp custom files) to treat the way that you wanna speak and on the Prompt use that function to build the desired output. Just like you do on the language jsp file but with a little different touch

    anoredis

    • Guest
    Re: Change grammar during call
    « Reply #4 on: November 06, 2013, 11:21:20 AM »
    Yes, GVP 8. I am developing a .Net application and I 'm not familiar with C#. I am using only what composer provides under options in its GUI. That is why I needed something like a block to change the grammar file.
    I thought of a workaround with a Go To block but it did not work.
    The GoTo targeted the second application which had the modified grammar file so it should work right. The problem is that the parameters I send with the GoTo block never arrive at the application. I have defined the variables as input variables in the second application but 'undefined' is what I get when I try to access them. Any ideas why this is happening? If I solve this I think I have solved my problem.
    « Last Edit: November 06, 2013, 11:22:51 AM by anoredis »

    Offline cavagnaro

    • Administrator
    • Hero Member
    • *****
    • Posts: 7641
    • Karma: 56330
    Re: Change grammar during call
    « Reply #5 on: November 06, 2013, 05:08:30 PM »
    I think you are making a storm in a very tiny glass of water...
    Lets see, forget about your implementation for now, ok?
    So, when you use a Prompt as part of its properties you select how it will be spelled, correct? Date, Number, String, Text, etc. So this are default ones, correct? How they work? They use the js file inside the Resources folder for your language, which inside has some functions on how to treat a specific string and based on it builds and returns a String which is basically a set of which audio files it will use. Sometimes you need to adjust the money one or date to fit your country.
    So as part of Prompt properties the is also a CUSTOM. What does this means? That given an input you can convert that input in a set of audio files as you need them to be played...with the fractions need you have you would be able to manipulate them very easily instead of building the monster you are doing, even more, as a global function you will be able to use it on this or any other project you need.

    anoredis

    • Guest
    Re: Change grammar during call
    « Reply #6 on: November 07, 2013, 08:49:47 AM »
    You are so right my friend! I have tried custom but it kept prompting me for a method that was not found in Intrepret-as box. I have created my function in the customprompts.js as elGRmyMethod but it kept asking for a method when selecting Custom option in the prompt. No harm done though because I used DTMF and modified the dtmfPromt function to suit my needs. It works as intended now! Thank you so much cavagnaro, once again..!  :)

    Offline cavagnaro

    • Administrator
    • Hero Member
    • *****
    • Posts: 7641
    • Karma: 56330
    Re: Change grammar during call
    « Reply #7 on: November 07, 2013, 01:51:37 PM »
    Nice. But try to fix it lol, you never know when you will need the real DTMF one ;)

    anoredis

    • Guest
    Re: Change grammar during call
    « Reply #8 on: November 11, 2013, 07:58:27 AM »
    lol, you are completely right. I had this in the back of my head and wrote it down in my notes because I will surelly forget it when this customer calls me again and then I will create a new thread asking you what's the matter with the DTMFs!  :P