To see how, let’s create another PHLO and again specify Build My Own. Of course, outbound calls are only half of the equation. Save the file and run it with the command node TriggerPhlo.jsīoom - you’ve made an outbound call. Swap in the actual values for the variables.
#PLIVO PHLO CODE#
Create a file - let’s call it TriggerPhlo.js - and paste this code into it: var plivo = require('plivo') var PhloClient = plivo.PhloClient var authId = 'auth-id' var authToken = 'auth-token' var phloId = 'PHLO_ID' var phloClient = phlo = null phloClient = new PhloClient(authId, authToken) phloClient.phlo(phloId).run().then(function(result) ) You’re also going to need your Auth ID and Auth Token. Copy the PHLO ID from the end of the URL of the workflow you just created. Now you can trigger the PHLO and test it out. Give the PHLO a name by clicking on the pencil icon in the upper left, then click the Save button in the upper right. That’s all we’re going to do for now - we told you it was simple. In the Configuration panel, enter the text you want to play for the call recipient, then click Validate. Connect the Initiate Call node to Play Audio using the Answered trigger state. Now drag the Play Audio component onto the canvas. PHLO lets you use variables for From and To values, but we’re keeping it simple for this example. Add a caller ID number in the From field and a destination number in the To field, then click Validate to save the configuration.
#PLIVO PHLO PLUS#
Valid phone numbers begin with a plus sign and a country code.
Now you can add configuration information for the call in the right pane. From the list of components on the left side, drag and drop the Initiate Call component onto the canvas, then connect the Start node to the Initiate Call node using the API Request trigger state. In the window that pops up, click Build My Own. Click on the PHLO icon on the left-side navigation bar, then on the Create New PHLO button. PhloClient, err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions today.Now you can turn to PHLO, Plivo’s visual workflow design studio, to set up the workflow for an outbound call. Initialize the following params with corresponding values to trigger resources Create a Go source code file - let’s call it TriggerPhlo.go - and paste this code into it:
Click on the PHLO icon on the left-side navigation bar, then on Create New PHLO. Now you can turn to PHLO, Plivo’s visual workflow design studio, to set up the workflow for an outbound call. You can also rent numbers from this screen. Check the Numbers screen of the Plivo console to see what numbers you have available. You need an voice-enabled Plivo phone number if you want to receive incoming calls. We provide an Auth ID and Auth Token in the Account section at the top of the overview page of the Plivo console. You have to have proper credentials before you can use the Plivo API. Or you can clone our GitHub repository into your GOPATH.
#PLIVO PHLO INSTALL#
Change to the directory into which you want to install the Plivo Go SDK and run $ go get /plivo/plivo-go We’ll presume you already have your Go environment set up.
#PLIVO PHLO HOW TO#
Let’s see how to make outbound calls and handle incoming calls through Plivo in a Go application. Don’t worry - Plivo has an SDK to help you out. Your company has settled on Plivo to handle its voice and messaging communications, and now it’s your job to start integrating Plivo into your company’s applications.