Hi,
Beside the lookupPhonebook actions the TR-064 binding provides a profile which does the math for you. See my example
lookupPhonebook