Author Topic: SwitchName in Composer Voice Routing  (Read 184 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline raza990

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
SwitchName in Composer Voice Routing
« on: December 10, 2018, 06:50:42 PM »
Hello,

Anybody know what is the function in Composer to get switch name for voice routing application ?

I am using varSwitch = _genesys.ixn.interactions[system.InteractionID].location.media_server in my ECMA script but having error 😕


17:21:17.850 [T:4880] {ScxmlMetricEvalExpr:3} METRIC <eval_expr sid='KMB65GG3351ETETDAL4PC35TKS000009' expression='try {
                     
               //Retrieve Switch Name
                        varSwitch = _genesys.ixn.interactions[system.InteractionID].location.media_server;
                        
                        if(!isEmpty(varSwitch))
                        {
                           customLog('Switch is set to: ' + varSwitch);
                        }
                  ...' type='string' result='ERROR' />
                  

Is there any other function for this or I am doing something wrong  ???

Offline Brocious

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: SwitchName in Composer Voice Routing
« Reply #1 on: December 11, 2018, 07:41:57 PM »
Can this be done at all? I thought it couldn't. Hopefully someone's able to help because this would be perfect for what I'm trying to do as well.
Hi!

Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: 14
    • Genesys Brasil
Re: SwitchName in Composer Voice Routing
« Reply #2 on: December 11, 2018, 09:21:37 PM »
Have you tried
Code: [Select]
_genesys.ixn.interactions[0].location.media_server

instead of
Code: [Select]
_genesys.ixn.interactions[system.InteractionID].location.media_server

Marked as best answer by raza990 on December 13, 2018, 10:23:49 PM

Offline raza990

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
Re: SwitchName in Composer Voice Routing
« Reply #3 on: December 13, 2018, 01:23:34 PM »
The script I mentioned in my case is the working one. The ORS logs wasn't showing the output value so I was confused. When use LOG block to print the value then can see that switch name is coming  :)