0.0.6 • Published 2 years ago

node-red-contrib-libphonenumber v0.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

node-red-contrib-libphonenumber

Installation

From node-red home directory, run below command:

$ npm -i node-red-contrib-libphonenumber

Test

Using docker:

$ docker-compose up -d

Then browse to http://localhost:2880 to see the example described in section below.

Example

Screenshot

Basic parse flow

Sample output

{
    "_msgid":"58c04e91.b1f0a",
    "topic":"","payload":"0123456789",
    "phone":{
        "CountryCode":33,
        "NationalNumber":123456789,
        "Extension":"",
        "CountryCodeSource":"FROM_DEFAULT_COUNTRY",
        "ItalianLeadingZero":false,
        "RawInput":"0123456789",
        "isPossibleNumber":true,
        "isValidNumber":true,
        "isValidNumberForRegionGB":false,
        "RegionCodeForNumber":"FR",
        "NumberType":"FIXED_LINE",
        "E164":"+33123456789",
        "INTERNATIONAL":"+33 1 23 45 67 89",
        "NATIONAL":"01 23 45 67 89",
        "RFC3966":"tel:+33-1-23-45-67-89",
        "OriginalFormat":"01 23 45 67 89"
    }
}

Flow

[
    {
        "id": "ff7d7036.5206",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "d93be7de.37c7c",
        "type": "phonenumber",
        "z": "ff7d7036.5206",
        "name": "Parse Phone Number",
        "defaultCountryLetters": "FR",
        "regionDialingFrom": "GB",
        "x": 660,
        "y": 120,
        "wires": [
            [
                "29b6bc91.33599c"
            ]
        ]
    },
    {
        "id": "6eb1095d.89e388",
        "type": "inject",
        "z": "ff7d7036.5206",
        "name": "",
        "topic": "",
        "payload": "0123456789",
        "payloadType": "str",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 370,
        "y": 120,
        "wires": [
            [
                "d93be7de.37c7c"
            ]
        ]
    },
    {
        "id": "29b6bc91.33599c",
        "type": "debug",
        "z": "ff7d7036.5206",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 890,
        "y": 120,
        "wires": []
    }
]