question

Shelby Tolliver avatar image
Shelby Tolliver asked Shelby Tolliver commented

"errorCode" : "CMN-101" on CallOut from C# SDK

Running this code from my C# program...


callOutRequest.from = new MakeCallOutCallerInfoRequestFrom {deviceId = fromDeviceId};
callOutRequest.to = new MakeCallOutCallerInfoRequestTo {phoneNumber = toNum};
CallSession session = await rc.Restapi().Account().Telephony().CallOut().Post(callOutRequest);


Resulting in this...

Content: {
   "errors" : [
      {
         "errorCode" : "CMN-101",
         "message" : "Parameter [phoneNumber] value is invalid"
      }
   ]
}


The "Phone number is a valid, 10 digit phone number". The "device Id" is a 12 digit number taken from my RC account.


What's wrong with what I'm doing here?


Thanks,

Shelby

rest api
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 answered

Phone number is in E.164 format. Make sure to add + sign in front of the country code.

1 |3000

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

Shelby Tolliver avatar image
Shelby Tolliver answered Shelby Tolliver commented

Thanks, but I did try adding a "+1" to the number and got the same results.

2 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 ·

I tried without the plus sign, I got the same error. With the plus sign, works like a charm

var parameters = new MakeCallOutRequest();
parameters.from = new MakeCallOutCallerInfoRequestFrom { deviceId = "803446112xxx" };
parameters.to = new MakeCallOutCallerInfoRequestTo { phoneNumber = RECIPIENT };

var resp = await rc.Restapi().Account().Telephony().CallOut().Post(parameters);
Console.WriteLine("Call session: " + resp.session);


0 Likes 0 ·
Shelby Tolliver avatar image Shelby Tolliver Phong Vu ♦♦ commented ·

Ok. My "bad". I was passing in my number via a url to our app and forgot to "%2B" the plus sign.

It is a bit confusing having to "+1" the number for the callOut call, where it's not necessary for a "ringout" call.

Thanks

0 Likes 0 ·

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