SwitchName in Composer Voice Routing

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 :confused:

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 ???

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.

Have you tried


_genesys.ixn.interactions[0].location.media_server

instead of


_genesys.ixn.interactions[system.InteractionID].location.media_server

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 :slight_smile: