Skip to main content

I created an app to send SMS, it's already in Production. I'm using the Operator extension, in my case it's 101, to login to API. I want to use my main company number to send the messages, but when I try to do so I get the error "Phone number doesn't belong to extension".

I checked that the main company number is available to the operator extension by calling 'https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myExtensionId]/phone-number', and it shows up, I get the following (note the comments I added):

{

"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myExtensionId]/phone-number?page=1&perPage=100',

"records": [

{

"features": [

"CallerId",

"SmsSender",

"MmsSender"

],

"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/phone-number/xxxxxx",

"id": xxxxxxx,

"phoneNumber": "+1xxxxxx7485", # This is the direct number of extension 101.

"paymentType": "Local",

"type": "VoiceFax",

"usageType": "DirectNumber",

"status": "Normal",

"country": {

"uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",

"id": "1",

"name": "United States"

},

"primary": true

},

{

"features": [

"CallerId"

],

"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/phone-number/xxxxxxx",

"id": xxxxxxx,

"phoneNumber": "+1xxxxx3430", # This is the Main Fax Company number

"paymentType": "Local",

"location": "xxxxxxx, TX",

"type": "FaxOnly",

"usageType": "CompanyFaxNumber",

"status": "Normal",

"country": {

"uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",

"id": "1",

"name": "United States"

},

"primary": false

},

{

"features": [

"CallerId"

],

"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/phone-number/xxxxxx",

"id": xxxxx,

"phoneNumber": "+1xxxxx2500", # This is the Main Company number. THIS IS THE NUMBER I WANT TO USE

"paymentType": "Local",

"location": "xxxxxx, TX",

"type": "VoiceFax",

"usageType": "MainCompanyNumber",

"status": "PortedIn",

"country": {

"uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",

"id": "1",

"name": "United States"

},

"primary": false

}

],

"paging": {

"page": 1,

"totalPages": 1,

"perPage": 100,

"totalElements": 3,

"pageStart": 0,

"pageEnd": 2

},

"navigation": {

"firstPage": {

"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myAccountId]/phone-number?page=1&perPage=100"

},

"lastPage": {

"uri": "https://platform.ringcentral.com/restapi/v1.0/account/[myAccountId]/extension/[myAccountId]/phone-number?page=1&perPage=100"

}

}

}

You will have to reference an extension that you want to send SMS from, not just a phonenumber. Think of the RC api data model as account/extensions/phonenumber. You will notice this behaviour of changing phone numbers on an extension, that all the historical phone messages will stay with the extension, not the phonenumber.


Thank you for your response! I don't think our Main Company number is an extension on itself. We have 6 extensions, but each extension has their own direct number, and they are able to do outgoing calls using the Main Company number. So does that mean I cannot send messages with the main company number?


To anyone having this issue, I was able to resolve it by changing the extension assigned to Company Fax/SMS Recipient to extension 101. These are the steps to do make the change:

1.) Login to https://service.ringcetral.com
2.) Go to Phone System tab> Auto-receptionist and then click General Settings
3.) Go to IVR Settings> Scroll down and Select Extension under Company Fax/SMS Recipient
4.) Click Save

Hi . Greetings.

I am currently working on sandbox environment, and my phone number is associated to my account. But when I try to test sms api, it returns an error "Phone number doesn't belong to extension"

{ "to": [{"phoneNumber": "+171xxxxxxxx "}], "from": {"phoneNumber": "+147xxxxxxxx}"}, "text": "Test SMS message from Platform server"}


What's wrong?

Please let me know your thoughts.

Thanks.


Reply