Page 1 of 1

How do I capture the caller's phone number into a php ?

Posted: Mon Jun 28, 2004 2:51 pm
by ejohnson
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,

IVR- posts session.telephone.ani as session_telephone_ani

Posted: Wed Jul 07, 2004 7:43 am
by support
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:

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