Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testlocally #136

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions main/makeCall.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Example for Call create
package main

import (
"fmt"
"github.com/plivo/plivo-go/v7"
)

func main() {
client, err := plivo.NewClient("MAYJI2ZJDIMTVIODIWYJ", "OTI2NWFmNGI4MmZjZjZkOTQ0YjNkYTQwMzY2ZDJl", &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := client.Calls.Create(
plivo.CallCreateParams{
From: "+14151234567",
To: "sip:[email protected]",
AnswerURL: "https://s3.amazonaws.com/static.plivo.com/answer.xml",
AnswerMethod: "GET",
},
)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}
8 changes: 4 additions & 4 deletions plivoclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"time"
)

const baseUrlString = "https://api.plivo.com/"
const baseUrlString = "https://api-qa.voice.plivodev.com/"

var HttpsScheme = "https"
var voiceBaseUrlString = "api.plivo.com"
var voiceBaseUrlStringFallback1 = "api.plivo.com"
var voiceBaseUrlStringFallback2 = "api.plivo.com"
var voiceBaseUrlString = "api-qa.voice.plivodev.com"
var voiceBaseUrlStringFallback1 = "api-qa.voice.plivodev.com"
var voiceBaseUrlStringFallback2 = "api-qa.voice.plivodev.com"

const baseRequestString = "/v1/Account/%s/"

Expand Down