" /> Global Commands in composer callflow - Genesys CTI User Forum

Author Topic: Global Commands in composer callflow  (Read 7764 times)

Offline alaint

  • Jr. Member
  • **
  • Posts: 50
  • Karma: 0
Global Commands in composer callflow
« on: May 03, 2013, 06:51:20 PM »
Advertisement
Hi,

We have the need to offer an exit option when customer is on a waiting loop.  The waiting loop is compose of differents prompts bloc, some play music, other play messages.  If the customer press zero, the call will be target to more general department and if he press 9 he will be target to voice mail.  But if he press any other digit, it must have no effect and let the music or message play.  For that, I have try to se the [i]Global Commands[/i] property of the Entry Bloc of a Callflow.  But it has no effect.  I have'nt found much info about that functionnality. 

I only found that page : http://genesyslab.info/wiki/index.php?title=Entry_Block#Global_Commands_Property

Is that property a good solution for my need?  Is someone know how to make it work? 

Thank you for your help.

Alain
« Last Edit: May 22, 2013, 12:07:40 PM by alaint »

Offline rpenney

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 2
Re: Global Commands in composer callflow
« Reply #1 on: May 04, 2013, 12:45:11 AM »
Hi Alaint,
  That should do what you want. The Global Commands property sets up the global grammars (which includes DTMF).
As to why it doesn't work, I am not sure without logs and/or code.
[list]
[li]Try looking at the VXML produced and check that there isn't an issue there.[/li]
[li]It might be that some of your prompts blocks are over-riding the global commands or replacing them for the scope of the prompt. Try a really simple application to make sure the feature works as you expect[/li]
[li]Post some code[/li]
[/list]

Offline alaint

  • Jr. Member
  • **
  • Posts: 50
  • Karma: 0
Re: Global Commands in composer callflow
« Reply #2 on: May 06, 2013, 02:07:01 PM »
Hi rpenney,

I have take a look at vxml and see nothing special.  But, I'm not a expect vxml.  I dont see nothing special in the mcp log to.

I just isolate my code in a simple project and it dose'nt work.  Maybe you'll see something that I have'nt see...  I can't attach file to the post, is there a solution to send you the project?  For now, I post you de vxml code.  You'll see that I have two globalCommands : 0 and 8.

[code]<?xml version="1.0" encoding="utf-8"?>
<vxml version="2.1" xml:lang="en-US"
xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gvp="http://www.genesyslab.com/2006/vxml21-extension">




<!-- Auto Generated by Composer 8.1.201.52-->
<!-- Application Author:  Version: 1.0 CreatedOn:  -->

<!-- Global Scripts includes -->
<script src="../include/common.js" />
<script src="../include/ctic.js" />
<script src="../include/json.js" />
<script src="../include/DataAccess.js" />



<!-- Global Vars declarations -->
<script>
var AppState=new Object();
AppState.System=new Object();
AppState.System.RetainInputTypeVariableDefaultValue = false;


AppState.CallUUID = session.connection.uuid;
AppState.ANI = getANI();
AppState.DNIS = getDNIS();
AppState.USE_LCASE_USERDATAKEY = initSystemTypeVariable('USE_LCASE_USERDATAKEY',0);
if (session.com.genesyslab.userdata != undefined)  {
AppState.GVPSessionID = getUserDataVariable('GVP-Session-ID');
} else {
AppState.GVPSessionID = 'undefined';
}
AppState.APP_ASR_LANGUAGE = initSystemTypeVariable('APP_ASR_LANGUAGE','en-US');
AppState.APP_LANGUAGE = initSystemTypeVariable('APP_LANGUAGE','en-US');
AppState.COMPOSER_WSSTUBBING = initSystemTypeVariable('COMPOSER_WSSTUBBING','0');
AppState.EnableFCR = initSystemTypeVariable('EnableFCR',true);
AppState.EnableReports = initSystemTypeVariable('EnableReports',false);
AppState.EnableSNMP = initSystemTypeVariable('EnableSNMP',false);
AppState.GRAMMARFILEDIR = initSystemTypeVariable('GRAMMARFILEDIR','../Resources/Grammars');
AppState.LAST_EVENT_ELEMENT = initSystemTypeVariable('LAST_EVENT_ELEMENT','undefined');
AppState.LAST_EVENT_LINE = initSystemTypeVariable('LAST_EVENT_LINE','undefined');
AppState.LAST_EVENT_MSG = initSystemTypeVariable('LAST_EVENT_MSG','undefined');
AppState.LAST_EVENT_NAME = initSystemTypeVariable('LAST_EVENT_NAME','undefined');
AppState.LAST_EVENT_URL = initSystemTypeVariable('LAST_EVENT_URL','undefined');
AppState.PREV_APP_ASR_LANGUAGE = initSystemTypeVariable('PREV_APP_ASR_LANGUAGE','undefined');
AppState.PREV_APP_LANGUAGE = initSystemTypeVariable('PREV_APP_LANGUAGE','undefined');
AppState.SCRIPTSDIR = initSystemTypeVariable('SCRIPTSDIR','../Scripts');
AppState.VOXFILEDIR = initSystemTypeVariable('VOXFILEDIR','../Resources/Prompts');
AppState.APP_OPM = initSystemTypeVariable('APP_OPM',eval('('+session.connection.protocol.sip.requesturi['parameters']+')'));
AppState.OCS_RecordURI = initSystemTypeVariable('OCS_RecordURI',getCallflowRecordURI());
AppState.OCS_URI = initSystemTypeVariable('OCS_URI',getCallflowOCSURI());
AppState.OCS_Record = initSystemTypeVariable('OCS_Record',getCallflowOCSRecord());

</script>

<!-- Global Scripts -->
<script srcexpr="AppState.VOXFILEDIR + '/PromptSwitch.js'" />
<script srcexpr="AppState.VOXFILEDIR + '/en-US/en-US.js'" />
<script>var f = new Format();</script>


<script srcexpr="AppState.VOXFILEDIR + '/en-US/customprompts.js'" />

<!-- Global Properties declarations -->
<property name="com.genesyslab.logtoasr" value="false" /> 
<property name="com.genesyslab.loglevel" value="5" />

<!-- Metadata information -->
<meta name="com.genesyslab.studio.resourcePath" content="/Callflows/CALLF_GlobalCommands.callflow"/>


<!-- Global links -->
<link dtmf="8" next="#logEight">

<grammar src="builtin:grammar/digits"/>
<grammar version="1.0" mode="voice" root="Eight">
<rule scope="public" id="Eight">
<one-of>
  <item>eight</item>
  </one-of>
  </rule>
  </grammar>
</link>
 
<link dtmf="0" next="#logZero">
</link>
 

<form>

<block>

<goto next="#Start" />
</block>
</form>


<!-- This is the Entry block -->
<form id="Start">
<block name="Entry">
<goto next="#pmptPlayInterruptible" />
</block>
</form>

<!-- This is the Exit block -->
<form id="End">
<block>
<exit/>
  </block>
</form>

<!-- This is the Prompt block -->
<form id="pmptPlayInterruptible">
       
        <script srcexpr="AppState.VOXFILEDIR + '/' + AppState.APP_LANGUAGE + '/' + AppState.APP_LANGUAGE + '.js'" />
        <script srcexpr="AppState.VOXFILEDIR + '/PromptSwitch.js'" />
        <block>
        <script>
            AppState.PREV_APP_LANGUAGE = AppState.APP_LANGUAGE;
            AppState.PREV_APP_ASR_LANGUAGE = AppState.APP_ASR_LANGUAGE;
            AppState.APP_LANGUAGE = AppState.APP_LANGUAGE;
            AppState.APP_ASR_LANGUAGE = AppState.APP_LANGUAGE;
        </script>
        </block>
       
       
    <block name="pmptPlayInterruptibleP0">
  <prompt bargein="true"  gvp:langexpr="AppState.APP_LANGUAGE">
<audio expr="AppState.VOXFILEDIR + '/' + AppState.APP_LANGUAGE + '/' + 'no-agent-logged-msg.wav'"></audio>
    </prompt>
</block>
    <block>
        <script>resetLanguage()</script>
    <goto next="#End" />
    </block>
</form>

<!-- This is the Log block -->
<form id="logEight">
<block>
<log gvp:level="1">
<value expr="'!!! logEight'"/>
</log>
    </block>
    <block>
    <goto next="#Disconnect" />
    </block>
</form>

<!-- This is the Disconnect block -->
<form id="Disconnect">
<block>

<disconnect />
    </block>
</form>

<!-- This is the Log block -->
<form id="logZero">
<block>
<log gvp:level="1">
<value expr="'!!! logZero'"/>
</log>
    </block>
    <block>
    <goto next="#Disconnect" />
    </block>
</form>
</vxml>
[/code]

Thank you.

Alain

Offline alaint

  • Jr. Member
  • **
  • Posts: 50
  • Karma: 0
Re: Global Commands in composer callflow
« Reply #3 on: May 08, 2013, 04:43:57 PM »
I have change the immediate Playback property of the prompt block to true and, the globalCommands start working.  But it dosent work as I expect.  I wondering that the prompt not interrupt except for the dtmf zero as I've specify in the global commands.  For now, prompt interrupt when I press any dtmf.  I have try to make a grammar who contain only dtmf zero, but it dose'nt change anything.  Is there a way to do want I want?

thank you

Alain

Offline rpenney

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 2
Re: Global Commands in composer callflow
« Reply #4 on: May 13, 2013, 08:07:01 PM »
Hi Alain,
  I think the issue is that the <link> tag needs a <field> or <menu> section to work correctly and your code only has prompts.
Try putting in an Input block with a short or 0 sec timeout after your prompts.

If you look at the Composer help for the Prompt block (http://www.genesyslab.info/wiki/index.php?title=Prompt_Block) there is a section 9.1 VXML Behavior and Queueing of Prompts. I believe that as your code is just prompts followed by exit, the prompt is played and then the application exits without getting an chance to handle the global grammars.
Your previous change might have sort of worked because Interruptable was probably set (a guess as I can't see your changes) so any DTMF stops the prompt and the app exits.

Thanks
Russell