question

Shelby Tolliver avatar image
Shelby Tolliver asked ·

"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

c#callout.net sdk
1 |1000 characters needed characters left characters exceeded

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 |1000 characters needed characters left characters exceeded

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 ·

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

2 comments
1 |1000 characters needed characters left characters exceeded

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

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 ·

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 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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