Alright, i can't work out how to make this more readable with the use of variables so i'l just post it as it is. As recommended i've now used a custom app with a MYSQL command to make it work. The code is below, please adjust to suit your needs!
In the query i've set the contact_owner to <= 0, this will narrow down the selection to group-addressbooks and system-accounts. If you want it to search all your addresses leave this statement out. If you want to only search a specific addressbook, the you should find out the correct contact_owner Id, for instance with a tool like 'phpMyAdmin' or 'Mysql Query Browser'. With several replace-statements i've filtered out (inter)national access code and characters to get a clean telephone number so we can match it to the incoming one. If you want to search other fields that the ones i picked (tell_work, tell_cell, tell_other) then change the query. With LIMIT 1 the select will only return the first result, so if you have multiple entries with the same telephone number only the first one will be displayed !!!
If your eGroupware db is on a different server you'll still need to change the LocalNetworkingOnly setting as in the first post. Also you still will need to add a user to MySQL also as in the first post.
Don't forget to replace the <host>, <dbUserName>, <dbUserPass> and <dbName> with the correct info. Finally with the last GoTo statement the call is being redirected to the Operator extension (5000).
exten => s,1,MYSQL(Connect connid <host> <dbUserName> <dbUserPass> <dbName>)
exten => s,2,MYSQL(Query resultid ${connid} SELECT\ n_fileas\ FROM\ egroupware.egw_addressbook\ WHERE\ contact_owner\ <=\ 0\ AND\ (replace(replace(replace(replace(replace(tel_work\,\'\ \'\,\'\')\,\'-\'\,\'\')\,\'+31\'\,\'0\')\,\'(0)\'\,\'\')\,\'+\'\,\'00\')=${CALLERID(num)}\ OR\ replace(replace(replace(replace(replace(tel_cell\,\'\ \'\,\'\')\,\'-\'\,\'\')\,\'+31\'\,\'0\')\,\'(0)\'\,\'\')\,\'+\'\,\'00\')=${CALLERID(num)}\ OR\ replace(replace(replace(replace(replace(tel_other\,\'\ \'\,\'\')\,\'-\'\,\'\')\,\'+31\'\,\'0\')\,\'(0)\'\,\'\')\,\'+\'\,\'00\')=${CALLERID(num)})\ ORDER\ BY\ n_fileas\ LIMIT\ 1)
exten => s,3,MYSQL(Fetch fetchid ${resultid} TEMP)
exten => s,4,MYSQL(Clear ${resultid})
exten => s,5,MYSQL(Disconnect ${connid})
exten => s,6,Set(CALLERID(name)=${TEMP})
exten => s,7,GoTo(extensions,5000,1)
Remark: In the mysql-query spaces, quotes (\’ and \”), comma’s (\,), tilde (\`), and backslash (\\) need to be escaped with a backslash (\).
Hope this is useful to someone else.
jester.