TR-064 Thing Action phonebookLookup not working

Here’s how I finally got it to work: when looking at the “comprehensive example”, don’t get distracted by the <PHONEBOOK_NAME> voodoo.

When your name for the Thing (Bridge) is

tr064:fritzbox:1

then your PHONEBOOK profile in your item must be exactly the same name, just with the colons URL-encoded (3A), so it should say

[profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3A1"]

So, full example would be:

tr064.things

Bridge tr064:fritzbox:1 "FRITZ!Box 7590" [
    host="fritz.box", 
    user="USER",
    password="PASSWORD",
    phonebookInterval="86400"
    ]

avm.items

// Call Monitor Equipment

Group gCALLMONITOR "Call Monitor" ["Equipment"]

Call fritzIncomingCall "Incoming Call [from %2$s to %1$s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:incoming_call" }

Call fritzActiveCall "Active Call [from %1$s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:active_call" }

Call fritzOutgoingCall "Outgoing Call [from %2$s to %1$s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:outgoing_call" }

String fritzCallRinging "Status [%s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:call_state" }

// resolved numbers (only if TR-064 binding is installed)

String fritzIncomingCallCallee "Incoming Call - Callee [%s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:incoming_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3A1"] }

String fritzIncomingCallCaller "Incoming Call - Caller [%s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:incoming_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3A1", phoneNumberIndex=1, matchcount="8"] }

String fritzActiveCallCaller "Active Call - Caller [%s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:active_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3A1"] }

String fritzOutgoingCallCallee "Outgoing Call - Callee [%s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:outgoing_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3A1"] }

String fritzOutgoingCallCaller "Outgoing Call - Caller [%s]" (gCALLMONITOR) ["Status"] { channel="avmfritz:fritzbox:1:outgoing_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3A1", phoneNumberIndex=1, matchcount="8"] }

I appreciate the work put in this, but the existing documentation for caller number lookup is a complete guessing game.

And the README.md description in the binding is misleading. In the Bridge definition the term

tr064:fritzbox:rootuid 

is used, and in the Item definition the example provided is

phonebook="tr064_3Afritzbox_3AfritzboxTR064"

With rootuid and fritzboxTR064, this will not work.

2 Likes