How do I capture the caller's phone number into a php variable?
Is session.telephone.ani a vxml varaible or can it also be used like this: $session_telephone_ani as a php variable?
Thank you,
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
How do I capture the caller's phone number into a php ?
IVR- posts session.telephone.ani as session_telephone_ani
In order for php to get a variable the variable should be passed to it in a <submit>. Here is a basic IVR VoiceXML script that posts session.telephone.ani as session_telephone_ani:
The session_telephone_ani variable will now be available to any IVR server side scripting language (in this case dynamicscript.php) for processing.
Hope this helps!
The Plum Support team
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<var name="session_telephone_ani" expr="session.telephone.dnis"/>
<submit next="dynamicscript.php" method="post" namelist="session_telephone_ani"/>
</block>
</form>
</vxml>
Hope this helps!
The Plum Support team