Passing Parameters in VoicePHP February 28, 2009
Passing parameters to an application is an important feature of any OS or programming language. It allows creating dynamic applications which can respond to the custom inputs. For example, in voice programming context, creating a common IVR which can serve to two different customers while maintaining the same code base. Again, this is where VoicePHP has an edge compared to VoiceXML (VoiceXML lacks such a basic feature).
Passing parameters to VoicePHP is a breeze. The best practice of accessing parameters in VoicePHP is using a tag. You can associate a tag to the application instance which will be accessible from VoicePHP script.
<?php
$parameter = $_VOICEPHP['calltag'];
// do something with the parameters
?>
Once you have the tag, you can use it to control the application flow OR reference it to fetch the other parameters from backend. More details here
Tag is not required to be unique & completely application dependet. Tag can be passed to VoicePHP from flash, click-2-call etc. using appropriate APIs.
Does'nt it look easy? Try VoicePHP for yourself and feel free to modify the above script. VoicePHP is easy and accessible from your free TringMe account. More details at http://voicephp.com/howitworks.html
Leave a Comment
If you would like to make a comment, please fill out the form below.






This can be pretty handy feature.
Is there any example of how to pass a tag from flash or otherwise to VoicePHP?
The link above takes to TringMe documentation page. I could not find any reference of tag in that documentation.