Jump to: navigation, search

Access Voice Interaction Properties

The following SCXML strategy shows how to access the properties of a voice interaction object.

<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" 
	xmlns:ixn="http://www.genesyslab.com/modules/interaction"
	initial="initial">
  <script>
	var ixnid;
  </script>
  
  <state id="initial">
	<transition event="interaction.added" target="get_ixn_voice_properties">
 		<script>
			ixnid = _event.data.interactionid;
		</script>
	</transition>
  </state>
  <state id="get_ixn_voice_properties">
	<onentry>
		<script>
			var type = _genesys.ixn.interactions[ixnid].voice.type;
			var media = _genesys.ixn.interactions[ixnid].voice.media;
			var ani = _genesys.ixn.interactions[ixnid].voice.ani;
			var dnis = _genesys.ixn.interactions[ixnid].voice.dnis;
			var acdq = _genesys.ixn.interactions[ixnid].voice.acdq;
			var callid = _genesys.ixn.interactions[ixnid].voice.callid;
			var connid = _genesys.ixn.interactions[ixnid].voice.connid;
		</script>
	</onentry>
	
	<transition cond="type=='internal' &amp;&amp; media=='TMediaVoice'" target="exit">
		<log expr="'type: ' + type" />
		<log expr="'media: ' + media" />
		<log expr="'ani: ' + ani" />
		<log expr="'dnis: ' + dnis" />
		<log expr="'acdq: ' + acdq" />
		<log expr="'callid: ' + callid" />
		<log expr="'connid: ' + connid" />
	</transition>
	
	<transition target="error" />
  </state>
  
  <final id="exit"/>
  <final id="error"/>
</scxml>
This page was last edited on September 22, 2017, at 13:06.
Comments or questions about this documentation? Contact us for support!