NotifyPhoneNumber - Scoped

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:13分
  • 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()

    Returns the international dialing code for a Notify phone number.

    表 : 1. Parameters
    Name Type Description
    None
    表 : 2. Returns
    Type Description
    String International phone code for a country.

    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()

    Returns the ID of this phone number as defined by the telephony provider.

    表 : 3. Parameters
    Name Type Description
    None
    表 : 4. Returns
    Type Description
    String Identifier of the number within the telephony provider.

    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()

    Returns the numerical phone number for the current Notify caller.

    表 : 5. Parameters
    Name Type Description
    None
    表 : 6. Returns
    Type Description
    String E.164-compliant phone number.

    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()

    Returns the telephony provider associated with this phone number.

    表 : 7. Parameters
    Name Type Description
    None
    表 : 8. Returns
    Type Description
    String Telephony provider associated with the number: Twilio.

    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()

    Returns the country associated with the phone number.

    表 : 9. Parameters
    Name Type Description
    None
    表 : 10. Returns
    Type Description
    String Name of the country to which the phone number belongs.

    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()

    Determines if the Notify phone number supports conference calls.

    表 : 11. Parameters
    Name Type Description
    None
    表 : 12. Returns
    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

    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()

    Determines if the Notify phone number supports receiving phone calls.

    表 : 13. Parameters
    Name Type Description
    None
    表 : 14. Returns
    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

    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()

    Determines if the Notify phone number supports receiving SMS messages.

    表 : 15. Parameters
    Name Type Description
    None
    表 : 16. Returns
    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

    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()

    Determines if the Notify phone number supports initiating phone calls.

    表 : 17. Parameters
    Name Type Description
    None
    表 : 18. Returns
    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

    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()

    Determines if the Notify phone number supports sending SMS messages.

    表 : 19. Parameters
    Name Type Description
    None
    表 : 20. Returns
    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

    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()

    Determines if the Notify phone number supports recording phone calls.

    表 : 21. Parameters
    Name Type Description
    None
    表 : 22. Returns
    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

    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()

    Determines if the Notify phone number supports calls to a browser, such as in a WebRTC implementation.

    表 : 23. Parameters
    Name Type Description
    None
    表 : 24. Returns
    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

    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());
    }