Jump to content

tomas_

Members
  • Posts

    786
  • Joined

  • Last visited

  • Days Won

    20

Community Answers

  1. tomas_'s post in Create a call flow manually, but route to the call flow programatically was marked as the answer   
    You can do this with Pivot and Preflow. We've done this in a lot of different ways, mostly using PHP scripts.
    First, create the callflows you want to route the calls to, then check in Futon / CouchDB for the Callflow ID's. (however this might be possible to integrate directly into the PHP script instead of making different pre-defined callflows).
    Then create a callflow with a Pivot request, pointing to the PHP script.
    The PHP script then can route the call to the correct Callflow ID, it just has to return '{"module":"callflow","data":{"id":"<callflow_id>"}}'
    To make the Pivot script run every time a call is being connected in you can select that as Preflow in the Callflow app -> Account Settings -> Misc -> Preflow.

    Example Pivot callflow below:

    Example PHP script:
    <?php header("content-type: application/json"); $nextcallflow="0219483204983"; die ('{"module":"callflow","data":{"id":"'.$nextcallflow.'"}}');  
×
×
  • Create New...