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.
$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