Choose caller id (phone number) for SMS text

  • 1
  • Question
  • Updated 1 month ago
Is it possible to use any of the company numbers as the caller id for any of the extensions? Essentially having a many-to-many relationship between extensions and company numbers? I have a requirement to choose an extensions from number on an SMS text based on the recipient (basically making it look like the message is coming from a local area code).

When I choose a company number (not the main number) for an SMS I get the following error:
{
  "errorCode" : "FeatureNotAvailable",
  "message" : "Phone number doesn't belong to extension",
  "errors" : [ {
    "errorCode" : "MSG-304",
    "message" : "Phone number doesn't belong to extension"
  } ]

How can I set things up such that any company number can belong to any extension?
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb

Posted 1 month ago

  • 1
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Code snippet for example:

await userExtension.Sms().Post(new

                    {

                        to = new[] {new CallerInfo {phoneNumber = textMessage.ToPhoneNumber}},

                        from = new CallerInfo {phoneNumber = "any_company_number_here"},

                        text = textMessage.Body

                    });

(the userExtension is authenticated as the user extension number and their password)
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,904 Points 2k badge 2x thumb
Will,

the system allows user to send SMS only from a number where this user can receive a reply back. This is the reason why you can only send from a number which is assigned to your extension. The only exception is Company Operator extension whose mailbox can receive messages sent to company numbers. So, if a user is logged in as a company operator it is possible to send SMS from company numbers on his/her behalf.
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Thanks for the response. If the user sends from the company operator do any responses from the recipient get routed back to user's extension?
(Edited)
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,904 Points 2k badge 2x thumb
The user does not send from company operator. The user IS company operator. It is just an assignment. By default, extension 101 user is designated as an operator. And this user can send from company numbers and receive replies. But you can choose any other user extension and configure the system so that this user would act as an operator. But don't forget that all message types (voicemails, faxes, SMS, MMS) which are sent to company numbers will get to this extension's mailbox.
Photo of Phong Vu

Phong Vu, Devangelist

  • 3,082 Points 3k badge 2x thumb
Hi Will,

When using the caller Id, we refer to phone calls or ring out calls only. For SMS we don't call it caller ID. So in your case for sending SMS, the answer is no, you cannot send SMS from any number which does not belong to that extension.
(Edited)
Photo of Phong Vu

Phong Vu, Devangelist

  • 3,082 Points 3k badge 2x thumb
You can find useful information about the SMS API from this blog:
https://medium.com/ringcentral-developers/sms-apis-tips-tricks-and-quirks-982d2f705ae9