From bcedab8e1fd39b54b108f03f1eb280ae48d53724 Mon Sep 17 00:00:00 2001 From: t2000 Date: Wed, 20 Jan 2021 23:09:36 +0100 Subject: [PATCH] [tr064] Improve PHONEBOOK profile documentation (#9854) * [tr064] Improve PHONEBOOK profile documentation Signed-off-by: Stefan Triller --- bundles/org.openhab.binding.tr064/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundles/org.openhab.binding.tr064/README.md b/bundles/org.openhab.binding.tr064/README.md index 1da6bded01d..daa270a635f 100644 --- a/bundles/org.openhab.binding.tr064/README.md +++ b/bundles/org.openhab.binding.tr064/README.md @@ -170,6 +170,7 @@ In case the format of the number in the phonebook and the format of the number f The configured `matchCount` is counted from the right end and denotes the number of matching characters needed to consider this number as matching. A `matchCount` of `0` is considered as "match everything". Matching is done on normalized versions of the numbers that have all characters except digits, '+' and '*' removed. +There is an optional configuration parameter called `phoneNumberIndex` that should be used when linking to a channel with item type `StringListType` (like `Call` in the example below), which determines which number to be picked, i.e. to or from. ## Rule Action @@ -218,3 +219,9 @@ Switch PresXX "[%s]" {channel="tr064:subdeviceLan:rootuid:LAN:macOnline_XX_3AXX_ Switch PresYY "[%s]" {channel="tr064:subdeviceLan:rootuid:LAN:macOnline_YY_3AYY_3AYY_3AYY_3AYY_3AYY"} ``` + +Example `*.items` file using the `PHONEBOOK` profile for storing the name of a caller in an item. it matches 8 digits from the right of the "from" number (note the escaping of `:` to `_3A`): + +``` +Call IncomingCallResolved "Caller name: [%s]" { channel="avmfritz:fritzbox:fritzbox:incoming_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3AfritzboxTR064", phoneNumberIndex="1", matchCount="8"] } +```