News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
SMS: "Phone number doesn't belong to extension"
Tags: api sms
Apr 19, 2021 at 11:29am   •   2 replies  •  0 likes
Ray Rivera

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"

}

}

}

2 Answers
answered on Apr 20, 2021 at 4:31pm  

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

 0
answered on Apr 19, 2021 at 11:41am  

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.


 0
on Jun 16, 2022 at 7:03am   •  0 likes

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.

on Apr 19, 2021 at 12:38pm   •  0 likes

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?



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us