question

bill-love8841 avatar image
bill-love8841 asked brian-kleinfall8967 commented

RingOut problem - why did the "to" phone become the first leg and "from" phone the second leg?

We developed all features with RingOut API in sandbox for our web application. Yesterday it worked perfectly.Today strange things happened. When made call, somehow the "to" phone became first leg and "from" phone the second leg. The response after RingOut request was as something like

{
                 
    "id": "Y3MxNjk2MTIzOTgyNDMyMTUyMDlAMTAuMjguMjAuMTEw",
    "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/ringout/Y3MxNjk2MTIzOTgyNDMyMTUyMDlAMTAuMjguMjAuMTEw",
    "status": {
                 
        "callStatus": "Invalid",
        "callerStatus": "Invalid",
        "calleeStatus": "Invalid"
    }
}Can someone let me know what went wrong?
ringout
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

tyler-tullock8866 avatar image
tyler-tullock8866 answered
Put our old original code back in place and it is working again for us now.  Thx
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

brian-kleinfall8967 avatar image
brian-kleinfall8967 answered brian-kleinfall8967 commented
Well since RingCentral turned off the simple easy to use RingOut API - has anyone built a new dial out tool with the new platform?  Results?  I tried messing around with the C# Client - it's horrible.  Way too complicated.  
11 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·
Hi Brian,

Would you mind to post this question in a new post? We can help you right here but it would be nice to be on its own thread because it is not related to the original question.

Thanks and I will have a look at me sample code to see if I have C# code for you.

+ Phong
0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ commented ·
So here are the code you can place a ring out call using the RingCentral C# SDK

RestClient rc = new RestClient("client-id", "client-secret", false); rc.Authorize("username", "extensionNumber", "password"); if (rc.token.access_token.Length > 0) {   var parameters = new MakeRingOutRequest();
parameters.from = new MakeRingOutCallerInfoRequestFrom { phoneNumber = "14081234567" };
parameters.to = new MakeRingOutCallerInfoRequestTo { phoneNumber = "16503456789" };
parameters.playPrompt = true;

var resp = await rc.Restapi().Account().Extension().RingOut().Post(parameters);
var r = resp.status; // check status as you wish }
0 Likes 0 ·
brian-kleinfall8967 avatar image brian-kleinfall8967 commented ·
Thanks I will try it out.  
0 Likes 0 ·
brian-kleinfall8967 avatar image brian-kleinfall8967 commented ·
And if you are building a command line executable - how do you get around await rc.restapi() call - because you can't use await inside of static void Main(string[] args)
0 Likes 0 ·
brian-kleinfall8967 avatar image brian-kleinfall8967 commented ·
also in testing - after the rc.authorize...

if (rc.token.access_token.Length > 0)

returned null and raised the following error
System.NullReferenceException: 'Object reference not set to an instance of an object.'

RingCentral.RestClient.token.get returned null.

0 Likes 0 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys