Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: anandgenesys on June 04, 2015, 11:05:19 AM

Title: Get parameters in main callflow
Post by: anandgenesys on June 04, 2015, 11:05:19 AM
Dear All,

    My url  is  http://192.176.133.54:8080/MyProject/src-gen/Main.vxml?name=Kenady

    I am doing the java composer project . In JAVA web project I can get the url parameter in my JSP as [b]request.getParameter("name ");[/b]
 
    But In JAVA composer project we cannot do the same in backend.jsp .   

My Main.callflow will get called by 

  http://192.176.133.54:8080/MyProject/src-gen/Main.vxml?name=Kenady

  How can I get the name parameter value  in my Main.callflow. Which [b]block [/b]I want to use to get the name parameter value and how ?

  Sorry If I asked a silly question.
Title: Re: Get parameters in main callflow
Post by: jerry_jeremiah on July 27, 2015, 06:28:52 AM
You would imagine that you should be able to define an Input variable in the entry block and it should get the value but that's not how it works - at least not for me.  When I create a variable of Input type Composer uses the initUserInputTypeVariable function to get the value.  That function checks for the cooresponding SIP INVITE RequestURI KVP - but the only ones that exist for me are trunkport, gvp-tenant-id and voicexml.  Adding query string parameters to the URL doesn't add more SIP INVITE RequestURI KVPs - it just puts them on the end of the voicexml KVP so you can't use an Input variable to do it.

The only way I know that would work is to make a User variable that initializes to getRequestURIVariable('voicexml') or the equivalent session.connection.protocol.sip.requesturi['voicexml'] and parse the result yourself to get the query string parameters.  That should work because the voicexml KVP does contain the query string.

Title: Re: Get parameters in main callflow
Post by: cavagnaro on July 27, 2015, 01:21:54 PM
Ask yourself, why on VXML you would need GET variables? It is not a http Web page as a Web site is. Yes, it is JSP or Net, but those are used only for VXML creation. Imagine having to pass not one but 7 variables, doing via GET wouldn't be nice. Therefore you rely on SIP headers, which are used by SIP server to attach data to the SIP messages as jerry point out.
So answer is, attach the data via CTI (URS) or directly on SIP server via custom headers like on INVITE.
Then on Composer create a variable with that UData and get it.

Enviado de meu C6602 usando Tapatalk

Title: Re: Get parameters in main callflow
Post by: jerry_jeremiah on February 21, 2017, 10:34:02 AM
The other way to do this is to make a parameter group in GAX and use that to create the IVR profile and then use an OPM block to retrieve the values.  Then the parameters can be managed properly.

Let me know if you need instructions for doing it that way.