---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NotifyPhoneNumber - Scoped

# NotifyPhoneNumber - Scoped {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 minutes to read

The NotifyPhoneNumber API allows you to query information about a
Notify phone number.

Execute the scoped NotifyPhoneNumber API and its associated methods in the
`sn_notify` namespace.

## Scoped NotifyPhoneNumber - getDialCode() {#ariaid-title2}

Returns the international dialing code for a Notify phone number.
{#NPNScoped-getDialCode__table_uvw_tv5_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#NPNScoped-getDialCode__table_uvw_tv5_bgb} {#NPNScoped-getDialCode__table_vvw_tv5_bgb__entry__2}

| Type | Description |
|-|-|
| String | International phone code for a country. |
[Table 2. Returns]

{#NPNScoped-getDialCode__table_vvw_tv5_bgb}  
This example shows how to obtain the dial code for a phone number.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.getDialCode());
    }

## Scoped NotifyPhoneNumber - getID() {#ariaid-title3}

Returns the ID of this phone number as defined by the telephony provider.
{#NPNScoped-getID__table_hkv_ny5_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 3. Parameters]

{#NPNScoped-getID__table_hkv_ny5_bgb} {#NPNScoped-getID__table_ikv_ny5_bgb__entry__2}

| Type | Description |
|-|-|
| String | Identifier of the number within the telephony provider. |
[Table 4. Returns]

{#NPNScoped-getID__table_ikv_ny5_bgb}  
This example shows how to obtain the unique identifier for a phone number.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.getID());
    }

## Scoped NotifyPhoneNumber - getNumber() {#ariaid-title4}

Returns the numerical phone number for the current Notify caller.
{#NPNScoped-getNumber__table_dgp_m1v_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 5. Parameters]

{#NPNScoped-getNumber__table_dgp_m1v_bgb} {#NPNScoped-getNumber__table_egp_m1v_bgb__entry__2}

| Type | Description |
|-|-|
| String | E.164-compliant phone number. |
[Table 6. Returns]

{#NPNScoped-getNumber__table_egp_m1v_bgb}  
This example shows how to obtain a Notify caller's phone number.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.getNumber());
    }

## Scoped NotifyPhoneNumber - getOwner() {#ariaid-title5}

Returns the telephony provider associated with this phone number.
{#NPNScoped-getOwner__table_scw_2bv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 7. Parameters]

{#NPNScoped-getOwner__table_scw_2bv_bgb} {#NPNScoped-getOwner__table_tcw_2bv_bgb__entry__2}

| Type | Description |
|-|-|
| String | Telephony provider associated with the number: Twilio. |
[Table 8. Returns]

{#NPNScoped-getOwner__table_tcw_2bv_bgb}  
This example shows how to obtain the telephony provide that owns the specified phone
number.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.getOwner());
    }

## Scoped NotifyPhoneNumber - getTerritory() {#ariaid-title6}

Returns the country associated with the phone number.
{#NPNScoped-getTerritory__table_e1q_32v_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 9. Parameters]

{#NPNScoped-getTerritory__table_e1q_32v_bgb} {#NPNScoped-getTerritory__table_f1q_32v_bgb__entry__2}

| Type | Description |
|-|-|
| String | Name of the country to which the phone number belongs. |
[Table 10. Returns]

{#NPNScoped-getTerritory__table_f1q_32v_bgb}  
This example shows how to obtain the country of a Notify caller.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.getTerritory());
    }

## Scoped NotifyPhoneNumber - supportsConferenceCall() {#ariaid-title7}

Determines if the Notify phone number supports conference calls.
{#NPNScoped-supportsConferenceCall__table_rfg_jmv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 11. Parameters]

{#NPNScoped-supportsConferenceCall__table_rfg_jmv_bgb} {#NPNScoped-supportsConferenceCall__table_sfg_jmv_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports conference calling. * true: phone number does support conference calling * false: phone number does not support conference calling {#NPNScoped-supportsConferenceCall__ul_xkc_qmv_bgb} |
[Table 12. Returns]

{#NPNScoped-supportsConferenceCall__table_sfg_jmv_bgb}  
This example shows how to determine if a Notify caller supports conference calls.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsConferenceCall());
    }

## Scoped NotifyPhoneNumber - supportsIncomingPhoneCall() {#ariaid-title8}

Determines if the Notify phone number supports receiving phone calls.
{#NPNScoped-supportsIncomingPhoneCall__table_wlt_lnv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 13. Parameters]

{#NPNScoped-supportsIncomingPhoneCall__table_wlt_lnv_bgb} {#NPNScoped-supportsIncomingPhoneCall__table_xlt_lnv_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports incoming phone calls. * true: phone number does support incoming phone calls * false: phone number does not support incoming phone calls {#NPNScoped-supportsIncomingPhoneCall__ul_xkc_qmv_bgb} |
[Table 14. Returns]

{#NPNScoped-supportsIncomingPhoneCall__table_xlt_lnv_bgb}  
This example shows how to determine if a Notify caller can receive incoming phone
calls.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsIncomingPhoneCall());
    }

## Scoped NotifyPhoneNumber - supportsIncomingSMS() {#ariaid-title9}

Determines if the Notify phone number supports receiving SMS messages.
{#NPNScoped-supportsIncomingSMS__table_lxf_x4v_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 15. Parameters]

{#NPNScoped-supportsIncomingSMS__table_lxf_x4v_bgb} {#NPNScoped-supportsIncomingSMS__table_mxf_x4v_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports incoming SMS messages. * true: phone number does support incoming SMS messages * false: phone number does not support incoming SMS messages {#NPNScoped-supportsIncomingSMS__ul_xkc_qmv_bgb} |
[Table 16. Returns]

{#NPNScoped-supportsIncomingSMS__table_mxf_x4v_bgb}  
This example shows how to determine if a Notify caller can receive incoming SMS
messages.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsIncomingSMS());
    }

## Scoped NotifyPhoneNumber - supportsOutgoingPhoneCall() {#ariaid-title10}

Determines if the Notify phone number supports initiating phone calls.
{#NPNScoped-supportsOutgoingPhoneCall__table_vkq_bqv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 17. Parameters]

{#NPNScoped-supportsOutgoingPhoneCall__table_vkq_bqv_bgb} {#NPNScoped-supportsOutgoingPhoneCall__table_wkq_bqv_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports initiating outgoing phone calls. * true: phone number does support initiating outgoing phone calls * false: phone number does not support initiating outgoing phone calls {#NPNScoped-supportsOutgoingPhoneCall__ul_xkc_qmv_bgb} |
[Table 18. Returns]

{#NPNScoped-supportsOutgoingPhoneCall__table_wkq_bqv_bgb}  
This example shows how to determine if a Notify caller can make outgoing phone calls.

    var numbers = sn_notfy.Notify.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsOutgoingPhoneCall());
    }

## Scoped NotifyPhoneNumber - supportsOutgoingSMS() {#ariaid-title11}

Determines if the Notify phone number supports sending SMS messages.
{#NPNScoped-supportsOutgoingSMS__table_pct_srv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 19. Parameters]

{#NPNScoped-supportsOutgoingSMS__table_pct_srv_bgb} {#NPNScoped-supportsOutgoingSMS__table_qct_srv_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports sending SMS messages. * true: phone number does support sending SMS messages * false: phone number does not support sending SMS messages {#NPNScoped-supportsOutgoingSMS__ul_xkc_qmv_bgb} |
[Table 20. Returns]

{#NPNScoped-supportsOutgoingSMS__table_qct_srv_bgb}  
This example shows how to determine if a Notify caller can initiate outgoing SMS
messages.

    var numbers = sn_notify.NotifyScoped.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsOutgoingSMS());
    }

## Scoped NotifyPhoneNumber - supportsRecording() {#ariaid-title12}

Determines if the Notify phone number supports recording phone calls.
{#NPNScoped-supportsRecording__table_qxv_5sv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 21. Parameters]

{#NPNScoped-supportsRecording__table_qxv_5sv_bgb} {#NPNScoped-supportsRecording__table_rxv_5sv_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports recording phone calls. * true: phone number does support recording phone calls * false: phone number does not support recording phone calls {#NPNScoped-supportsRecording__ul_xkc_qmv_bgb} |
[Table 22. Returns]

{#NPNScoped-supportsRecording__table_rxv_5sv_bgb}  
This example shows how to determine if a Notify caller can record calls.

    var numbers = sn_notify.Notify.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsRecording());
    }

## Scoped NotifyPhoneNumber - supportsWebRTC() {#ariaid-title13}

Determines if the Notify phone number supports calls to a browser, such as in a WebRTC
implementation.
{#NPNScoped-supportsWebRTC__table_knk_vtv_bgb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 23. Parameters]

{#NPNScoped-supportsWebRTC__table_knk_vtv_bgb} {#NPNScoped-supportsWebRTC__table_lnk_vtv_bgb__entry__2}

| Type | Description |
|-|-|
| Boolean | Value that indicates whether the Notify phone number supports browser-to-browser (WebRTC) calls. * true: phone number does support browser-to-browser (WebRTC) calls * false: phone number does not support browser-to-browser (WebRTC) calls {#NPNScoped-supportsWebRTC__ul_xkc_qmv_bgb} |
[Table 24. Returns]

{#NPNScoped-supportsWebRTC__table_lnk_vtv_bgb}  
This example shows how to determine if a Notify caller can initiate/accept
browser-to-browser calls.

    var numbers = sn_notify.Notify.getPhoneNumbers();
     
    // Here numbers is of type List
    if (numbers.size() > 0) {
       var number = numbers.get(0);
     
       // Here number is of type NotifyPhoneNumber
      gs.info(number.supportsWebRTC());
    }


