-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tr064] add rule action for phonebook #9505
Conversation
Signed-off-by: Jan N. Klug <[email protected]>
|
||
`String name = phonebookLookup(String number, String phonebook, int matchCount)` | ||
|
||
`phonebook` and `matchCount` are optional parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested those changes and based on the description here would have expected that something like
val tr064Actions = getActions("tr064","tr064:fritzbox:2a28aee1ee")
val result = tr064Actions.phonebookLookup("01234567")
would actually work as the other parameters are described as optional.
But the above rule code results in an error like
Script execution of rule with UID 'fritzbox' failed: An error occurred during the script execution: index=3, size=3 in fritzbox
Using val result = tr064Actions.phonebookLookup("01234567", null, null)
works fine. Maybe might be good to update the readme here, so it's clear the parameters can't be ommited, but need to be set to null
instead - or update the code if the parameters should be ommitable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably adding those methods would be the better option. Will do that tomorrow. Is it working otherwise as expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only did some simple lookups of incoming call numbers in the phonebook. That worked as expected. But didn't test (yet) if the phonebook
and matchCount
parameters are working correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested looking up with specific phonebooks. Seems to work as expected. But might be useful to mention it's selected by the phonebooks name (and not its id)
Signed-off-by: Jan N. Klug <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* add rule action for phonebook * address review comments Signed-off-by: Jan N. Klug <[email protected]>
* add rule action for phonebook * address review comments Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Joseph Hagberg <[email protected]>
* add rule action for phonebook * address review comments Signed-off-by: Jan N. Klug <[email protected]>
* add rule action for phonebook * address review comments Signed-off-by: Jan N. Klug <[email protected]>
Closes #9492
Signed-off-by: Jan N. Klug [email protected]