" /> SwitchName in Composer Voice Routing - Genesys CTI User Forum

Author Topic: SwitchName in Composer Voice Routing  (Read 2480 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: 214
  • Karma: 5
SwitchName in Composer Voice Routing
« on: December 10, 2018, 09:50:42 AM »
Advertisement
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, 10:41:57 AM »
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.

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: SwitchName in Composer Voice Routing
« Reply #2 on: December 11, 2018, 12:21:37 PM »
Have you tried
[code]
_genesys.ixn.interactions[0].location.media_server
[/code]

instead of
[code]
_genesys.ixn.interactions[system.InteractionID].location.media_server
[/code]

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

Offline raza990

  • Full Member
  • ***
  • Posts: 214
  • Karma: 5
Re: SwitchName in Composer Voice Routing
« Reply #3 on: December 13, 2018, 04:23:34 AM »
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  :)