Number Pad Conversion

Convert a string of text to the digits on a telephone keypad, useful for things like IVR menus.

For example sammachin becomes 726622446

[{"id":"5ed8d240.f69db4","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"cc68ac.e41a8758","type":"inject","z":"5ed8d240.f69db4","name":"","topic":"","payload":"sammachin","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":310,"y":360,"wires":[["76fd15cc.6712c4"]]},{"id":"a1554b68.725408","type":"debug","z":"5ed8d240.f69db4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":910,"y":360,"wires":[]},{"id":"76fd15cc.6712c4","type":"change","z":"5ed8d240.f69db4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"a|b|c","fromt":"re","to":"2","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"d|e|f","fromt":"re","to":"3","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"g|h|i","fromt":"re","to":"4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"j|k|l","fromt":"re","to":"5","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"m|n|o","fromt":"re","to":"6","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"p|q|r|s","fromt":"re","to":"7","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"t|u|v","fromt":"re","to":"8","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"x|x|y|z","fromt":"re","to":"9","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":360,"wires":[["a1554b68.725408"]]}]

Flow Info

Created 6 years, 1 month ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x1)
  • debug (x1)
  • inject (x1)
Other
  • tab (x1)

Tags

  • ivr
  • phonenumber
  • keypad
  • digits
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option