plivo/plivo-browser-sdk2-examples

Call direction returned to answer URL is "inbound" when making an outbound call from browser

Closed this issue · 4 comments

sryze commented

Why is CallDirection set to inbound when Plivo makes a request to the application's answer URL when making an outbound call? Shouldn't it be outbound?

I can successfully call other phone numbers and receive calls, but the wrong direction makes it hard to differentiate between inbound and outbound calls.

@sryze When you make calls using SIP Endpoint

  1. The call will be redirected to Plivo (CallDirection set to inbound).
  2. From Plivo, call will redirect to either GSM or SIP Endpoint(Outbound)

If you make calls using Plivo API

  1. From Plivo call will redirect to either GSM or SIP Endpoint(Outbound)

screen shot 2018-01-09 at 6 36 25 pm

sryze commented

I guess i'm using the first method as the diagram mentions the Web SDK.

I found a workaround (checking if To is a Plivo number) but nevertheless it's kind of counter-intuitive in my opinion, though I'm not very familiar with SIP / VoIP. Since you're saying that this makes sense I'm closing the issue.

@sryze what workaround did you find to make outbound call work? I'm still having issue with outbound call to random numbers with this plivo-websdk-2.0-example app

sryze commented

@topwebtek7 I used Plivo's API (forgot how it's called, sorry) to get the list of my Plivo phone numbers and checked if the "to" number is one of them