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 to call a result URL after an INCOMING call

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
magicsoft
Posts: 44
Joined: Wed Aug 25, 2010 8:57 am

how to call a result URL after an INCOMING call

Post by magicsoft »

The PLUM service allows you to set a result URL that gets called with certain information after an outbound call is completed. Is there any way to set it up so that a result URL is triggered after an INCOMING call is completed?

Thanks,

Andrew

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: how to call a result URL after an INCOMING call

Post by support »

Hi Andrew,

It would be possible to do post-call processing similar to the result_url. Your inbound application will need to detect whenever the user disconnects by catching any connection.disconnect.hangup events.
Inbound Application:

Code: Select all

<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>\n";
?>

<vxml version="2.0" application="root.php">
  <form>
    <block>
      <prompt> Current application. </prompt>
      <goto next="next_script.php"/>
    </block>
  </form>
  <catch error="connection.disconnect.hangup">
    <goto next="post_call.php"/>
  </catch>
</vxml>
post_call.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>\n";
?>

<vxml version="2.0" application="root.php">
  <form>
    <!-- Collect the information you would like to submit to your back end-->

    <submit next="http://localhost/example/process_call.php" namelist="var1 var2 etc" method="post"/>
    <block>
      <exit/>
    </block>
  </form>
</vxml>
Once you've collected all of the data you would like, you would then be able to submit that data to your back-end. After that you would just end the call.

Please note that if, for any reason, your application attempts to queue any prompts, an error will be thrown.

Regards,
Plum Support

Post Reply