Searching Exchange folders for phone numbers
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
Searching Exchange folders for phone numbers

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Matthias Moetje
Guest





Posted: Wed Sep 21, 2005 7:52 am    Post subject: Searching Exchange folders for phone numbers Reply with quote

Hi,

I cam currently creating a phone number lookup plugin
for Exchange for our voicemail server. I am trying to
evaluate appropriate methods and would be interested
in your help and comments.

The plugin will be a COM dll called by a service. Currently
I am considering the following options:

1. Using a WebDAV query
pros: Client does not need any prerequisites installed
cons: don't like WebDAV
need to search with LIKE operator which only
seems to support: '%searchterm%'

2. using CDO
pros: I know CDO well
cons: MAPI needs to be installed
security popups with Outlook (could be eliminated
with "Exchange Security Settings" folder with template)

3. using Extended MAPI
pros: no security popups
cons: no experience, might take a long time to develop
MAPI needs to be installed

Am I missing any methods, any comments?

One of the main problems I'll probably facing is number formatting.
So if the number in the Exchange contact is +49(89)143370-0
and the number from the CallerID is just 0891433700, how should
I best search for it? Sometimes numbers are just like 089143370-0
in Exchange and I am unable to know how long the area code is,
so I'm unable to format the incoming number to the format under
which it might be stored in Exchange.

For our ldap query plugin I search for *8*9*1*4*3*3*7*0*0
and this works fine. Can this be done with CDO or ExMAPI?
(I didn't get it to work with WebDAV)
Any other idea for doing this?

Thanks for your comments and best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

Back to top
Thomas Quester
Guest





Posted: Wed Sep 21, 2005 3:23 pm    Post subject: Re: Searching Exchange folders for phone numbers Reply with quote

Hi,

MAPI is the fastest and you have also notifications.

The best (or maybe the only way) is to read all of the telephone numbers
into RAM and do the search by yoursef. Telephone numbers can be stored in
various ways with only numbers, + or 00 prefix, brackets, spaces with citiy
code or without etc. You can not really bring everything automtically into
one form (you should know all country and city codes from all cities
worldwide including all abbrevations for country/city for all cities in all
existing languages if you want to automatically add a country/city code).

Also quering exchange for such complicated things may do harm on
performance.

Best guess, is removing all junk characters and start comparing from the
end, for example if 00121456 is calling you might have (021)456 somewhere in
Outlook, if you compare revers, you may find out that 65412 is the number
with most digits equal.

If you read in the whole folder, you must also be aware of updates in the
exchange database, what in SQL are triggers, in MAPI are notifications, they
inform you if anybody has modified, added or deleted a record. Otherwise you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query will
take time, next queries will be fast.

Thomas Quester
www.olfolders.de


"Matthias Moetje" <moetje@terasens_nospam_.de> schrieb im Newsbeitrag
news:e2J5DelvFHA.2556@TK2MSFTNGP15.phx.gbl...
Quote:
Hi,

I cam currently creating a phone number lookup plugin
for Exchange for our voicemail server. I am trying to
evaluate appropriate methods and would be interested
in your help and comments.

The plugin will be a COM dll called by a service. Currently
I am considering the following options:

1. Using a WebDAV query
pros: Client does not need any prerequisites installed
cons: don't like WebDAV
need to search with LIKE operator which only
seems to support: '%searchterm%'

2. using CDO
pros: I know CDO well
cons: MAPI needs to be installed
security popups with Outlook (could be eliminated
with "Exchange Security Settings" folder with template)

3. using Extended MAPI
pros: no security popups
cons: no experience, might take a long time to develop
MAPI needs to be installed

Am I missing any methods, any comments?

One of the main problems I'll probably facing is number formatting.
So if the number in the Exchange contact is +49(89)143370-0
and the number from the CallerID is just 0891433700, how should
I best search for it? Sometimes numbers are just like 089143370-0
in Exchange and I am unable to know how long the area code is,
so I'm unable to format the incoming number to the format under
which it might be stored in Exchange.

For our ldap query plugin I search for *8*9*1*4*3*3*7*0*0
and this works fine. Can this be done with CDO or ExMAPI?
(I didn't get it to work with WebDAV)
Any other idea for doing this?

Thanks for your comments and best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

Back to top
Matthias Moetje
Guest





Posted: Wed Sep 21, 2005 4:59 pm    Post subject: Re: Searching Exchange folders for phone numbers Reply with quote

Thomas,

thanks very much for your comments.

I tested with your tool and MAPI queries don't seem to
be of any help here (because no wildcards). And I need
to search the public store..

When you say with ExMAPI it's possible to retrieve only
certain fields of all messages in a folder then it's probably
a good way to read all field, clean them and store them
somewhere.

Another question: With CDO (MAPI.Session.Logon) I can use
the ProfileInfo parameter to create and Exchange ad-hoc
profile which is very useful when running as a service. Is there
a similar thing with MAPILogonEx?


Best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

"Thomas Quester" <tquester@msn.com> wrote in message
news:OtxdZZsvFHA.2312@TK2MSFTNGP14.phx.gbl...
Quote:
MAPI does not have wildcards, but substring, ignorecase etc. You may play
a
bit with our QSearchFolders-Add-In (www.olfolders.com), it has a query
compiler which compiles into a MAPI restriction then you can see without
programming if MAPI queries help you.

Replicating data while offline is a bit difficult, in your case you may
also
get always all data but with few fields, for example entryid, telephone1,
telephone2, telephone 3. The less data you query, the faster you are,
maybe
rowid can replace entry later.

Best regards

Thomas Quester


"Matthias Moetje" <moetje@terasens_nospam_.de> schrieb im Newsbeitrag
news:ez0mPbqvFHA.612@TK2MSFTNGP10.phx.gbl...
Thomas,

thanks very much for your reply.

I already thought of this option but the problem is that the
plugin will be instantiated before and destroyed after each
query. So to follow this suggestion I would need to create
a service that monitors the Exchange folders and stores the
plain phone numbers in RAM. The COM component would
query the service then. Not really a "mean and lean" solution
but probably the best way to do it.

Otherwise you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query
will
take time, next queries will be fast.

Do you mean I should query for all contacts that have at least
one phone number, then loop through all contacts and phone
fields manually? Would probably be a much easier solution, but
would be worse with regards to performance than querying with a
restriction.

Do you know if I would be able to query through ExMAPI with
wildcard?


Best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

"Thomas Quester" <tquester@msn.com> wrote in message
news:esV$1ZpvFHA.2212@TK2MSFTNGP15.phx.gbl...
Hi,

MAPI is the fastest and you have also notifications.

The best (or maybe the only way) is to read all of the telephone
numbers
into RAM and do the search by yoursef. Telephone numbers can be stored
in
various ways with only numbers, + or 00 prefix, brackets, spaces with
citiy
code or without etc. You can not really bring everything automtically
into
one form (you should know all country and city codes from all cities
worldwide including all abbrevations for country/city for all cities in
all
existing languages if you want to automatically add a country/city
code).

Also quering exchange for such complicated things may do harm on
performance.

Best guess, is removing all junk characters and start comparing from
the
end, for example if 00121456 is calling you might have (021)456
somewhere
in
Outlook, if you compare revers, you may find out that 65412 is the
number
with most digits equal.

If you read in the whole folder, you must also be aware of updates in
the
exchange database, what in SQL are triggers, in MAPI are notifications,
they
inform you if anybody has modified, added or deleted a record.
Otherwise
you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query
will
take time, next queries will be fast.

Thomas Quester
www.olfolders.de


"Matthias Moetje" <moetje@terasens_nospam_.de> schrieb im Newsbeitrag
news:e2J5DelvFHA.2556@TK2MSFTNGP15.phx.gbl...
Hi,

I cam currently creating a phone number lookup plugin
for Exchange for our voicemail server. I am trying to
evaluate appropriate methods and would be interested
in your help and comments.

The plugin will be a COM dll called by a service. Currently
I am considering the following options:

1. Using a WebDAV query
pros: Client does not need any prerequisites installed
cons: don't like WebDAV
need to search with LIKE operator which only
seems to support: '%searchterm%'

2. using CDO
pros: I know CDO well
cons: MAPI needs to be installed
security popups with Outlook (could be eliminated
with "Exchange Security Settings" folder with template)

3. using Extended MAPI
pros: no security popups
cons: no experience, might take a long time to develop
MAPI needs to be installed

Am I missing any methods, any comments?

One of the main problems I'll probably facing is number formatting.
So if the number in the Exchange contact is +49(89)143370-0
and the number from the CallerID is just 0891433700, how should
I best search for it? Sometimes numbers are just like 089143370-0
in Exchange and I am unable to know how long the area code is,
so I'm unable to format the incoming number to the format under
which it might be stored in Exchange.

For our ldap query plugin I search for *8*9*1*4*3*3*7*0*0
and this works fine. Can this be done with CDO or ExMAPI?
(I didn't get it to work with WebDAV)
Any other idea for doing this?

Thanks for your comments and best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------







Back to top
Thomas Quester
Guest





Posted: Wed Sep 21, 2005 4:59 pm    Post subject: Re: Searching Exchange folders for phone numbers Reply with quote

MAPI does not have wildcards, but substring, ignorecase etc. You may play a
bit with our QSearchFolders-Add-In (www.olfolders.com), it has a query
compiler which compiles into a MAPI restriction then you can see without
programming if MAPI queries help you.

Replicating data while offline is a bit difficult, in your case you may also
get always all data but with few fields, for example entryid, telephone1,
telephone2, telephone 3. The less data you query, the faster you are, maybe
rowid can replace entry later.

Best regards

Thomas Quester


"Matthias Moetje" <moetje@terasens_nospam_.de> schrieb im Newsbeitrag
news:ez0mPbqvFHA.612@TK2MSFTNGP10.phx.gbl...
Quote:
Thomas,

thanks very much for your reply.

I already thought of this option but the problem is that the
plugin will be instantiated before and destroyed after each
query. So to follow this suggestion I would need to create
a service that monitors the Exchange folders and stores the
plain phone numbers in RAM. The COM component would
query the service then. Not really a "mean and lean" solution
but probably the best way to do it.

Otherwise you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query will
take time, next queries will be fast.

Do you mean I should query for all contacts that have at least
one phone number, then loop through all contacts and phone
fields manually? Would probably be a much easier solution, but
would be worse with regards to performance than querying with a
restriction.

Do you know if I would be able to query through ExMAPI with
wildcard?


Best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

"Thomas Quester" <tquester@msn.com> wrote in message
news:esV$1ZpvFHA.2212@TK2MSFTNGP15.phx.gbl...
Hi,

MAPI is the fastest and you have also notifications.

The best (or maybe the only way) is to read all of the telephone numbers
into RAM and do the search by yoursef. Telephone numbers can be stored in
various ways with only numbers, + or 00 prefix, brackets, spaces with
citiy
code or without etc. You can not really bring everything automtically
into
one form (you should know all country and city codes from all cities
worldwide including all abbrevations for country/city for all cities in
all
existing languages if you want to automatically add a country/city code).

Also quering exchange for such complicated things may do harm on
performance.

Best guess, is removing all junk characters and start comparing from the
end, for example if 00121456 is calling you might have (021)456 somewhere
in
Outlook, if you compare revers, you may find out that 65412 is the number
with most digits equal.

If you read in the whole folder, you must also be aware of updates in the
exchange database, what in SQL are triggers, in MAPI are notifications,
they
inform you if anybody has modified, added or deleted a record. Otherwise
you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query will
take time, next queries will be fast.

Thomas Quester
www.olfolders.de


"Matthias Moetje" <moetje@terasens_nospam_.de> schrieb im Newsbeitrag
news:e2J5DelvFHA.2556@TK2MSFTNGP15.phx.gbl...
Hi,

I cam currently creating a phone number lookup plugin
for Exchange for our voicemail server. I am trying to
evaluate appropriate methods and would be interested
in your help and comments.

The plugin will be a COM dll called by a service. Currently
I am considering the following options:

1. Using a WebDAV query
pros: Client does not need any prerequisites installed
cons: don't like WebDAV
need to search with LIKE operator which only
seems to support: '%searchterm%'

2. using CDO
pros: I know CDO well
cons: MAPI needs to be installed
security popups with Outlook (could be eliminated
with "Exchange Security Settings" folder with template)

3. using Extended MAPI
pros: no security popups
cons: no experience, might take a long time to develop
MAPI needs to be installed

Am I missing any methods, any comments?

One of the main problems I'll probably facing is number formatting.
So if the number in the Exchange contact is +49(89)143370-0
and the number from the CallerID is just 0891433700, how should
I best search for it? Sometimes numbers are just like 089143370-0
in Exchange and I am unable to know how long the area code is,
so I'm unable to format the incoming number to the format under
which it might be stored in Exchange.

For our ldap query plugin I search for *8*9*1*4*3*3*7*0*0
and this works fine. Can this be done with CDO or ExMAPI?
(I didn't get it to work with WebDAV)
Any other idea for doing this?

Thanks for your comments and best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------




Back to top
Matthias Moetje
Guest





Posted: Wed Sep 21, 2005 4:59 pm    Post subject: Re: Searching Exchange folders for phone numbers Reply with quote

Thomas,

thanks very much for your reply.

I already thought of this option but the problem is that the
plugin will be instantiated before and destroyed after each
query. So to follow this suggestion I would need to create
a service that monitors the Exchange folders and stores the
plain phone numbers in RAM. The COM component would
query the service then. Not really a "mean and lean" solution
but probably the best way to do it.

Quote:
Otherwise you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query will
take time, next queries will be fast.

Do you mean I should query for all contacts that have at least
one phone number, then loop through all contacts and phone
fields manually? Would probably be a much easier solution, but
would be worse with regards to performance than querying with a
restriction.

Do you know if I would be able to query through ExMAPI with
wildcard?


Best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

"Thomas Quester" <tquester@msn.com> wrote in message
news:esV$1ZpvFHA.2212@TK2MSFTNGP15.phx.gbl...
Quote:
Hi,

MAPI is the fastest and you have also notifications.

The best (or maybe the only way) is to read all of the telephone numbers
into RAM and do the search by yoursef. Telephone numbers can be stored in
various ways with only numbers, + or 00 prefix, brackets, spaces with
citiy
code or without etc. You can not really bring everything automtically into
one form (you should know all country and city codes from all cities
worldwide including all abbrevations for country/city for all cities in
all
existing languages if you want to automatically add a country/city code).

Also quering exchange for such complicated things may do harm on
performance.

Best guess, is removing all junk characters and start comparing from the
end, for example if 00121456 is calling you might have (021)456 somewhere
in
Outlook, if you compare revers, you may find out that 65412 is the number
with most digits equal.

If you read in the whole folder, you must also be aware of updates in the
exchange database, what in SQL are triggers, in MAPI are notifications,
they
inform you if anybody has modified, added or deleted a record. Otherwise
you
can make a query for all telephone numbers and entry id for each call.
Exchange will do its best to create a cache for you, the first query will
take time, next queries will be fast.

Thomas Quester
www.olfolders.de


"Matthias Moetje" <moetje@terasens_nospam_.de> schrieb im Newsbeitrag
news:e2J5DelvFHA.2556@TK2MSFTNGP15.phx.gbl...
Hi,

I cam currently creating a phone number lookup plugin
for Exchange for our voicemail server. I am trying to
evaluate appropriate methods and would be interested
in your help and comments.

The plugin will be a COM dll called by a service. Currently
I am considering the following options:

1. Using a WebDAV query
pros: Client does not need any prerequisites installed
cons: don't like WebDAV
need to search with LIKE operator which only
seems to support: '%searchterm%'

2. using CDO
pros: I know CDO well
cons: MAPI needs to be installed
security popups with Outlook (could be eliminated
with "Exchange Security Settings" folder with template)

3. using Extended MAPI
pros: no security popups
cons: no experience, might take a long time to develop
MAPI needs to be installed

Am I missing any methods, any comments?

One of the main problems I'll probably facing is number formatting.
So if the number in the Exchange contact is +49(89)143370-0
and the number from the CallerID is just 0891433700, how should
I best search for it? Sometimes numbers are just like 089143370-0
in Exchange and I am unable to know how long the area code is,
so I'm unable to format the incoming number to the format under
which it might be stored in Exchange.

For our ldap query plugin I search for *8*9*1*4*3*3*7*0*0
and this works fine. Can this be done with CDO or ExMAPI?
(I didn't get it to work with WebDAV)
Any other idea for doing this?

Thanks for your comments and best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------


Back to top
Dan Mitchell
Guest





Posted: Wed Sep 21, 2005 10:07 pm    Post subject: Re: Searching Exchange folders for phone numbers Reply with quote

"Matthias Moetje" <moetje@terasens_nospam_.de> wrote in
news:#FLy0usvFHA.3764@TK2MSFTNGP09.phx.gbl:
Quote:
Another question: With CDO (MAPI.Session.Logon) I can use
the ProfileInfo parameter to create and Exchange ad-hoc
profile which is very useful when running as a service. Is there
a similar thing with MAPILogonEx?

Yes: see http://support.microsoft.com/?id=170225

-- dan
Back to top
Matthias Moetje
Guest





Posted: Thu Sep 22, 2005 12:59 am    Post subject: Re: Searching Exchange folders for phone numbers Reply with quote

Dan,

thanks a lot this was exactly what I was looking for!

Best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Ackermannstraße 3
80797 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: www.terasens.de
-------------------------------------

"Dan Mitchell" <djmitchella@yahoo.com> wrote in message
news:Xns96D8711F9BD3Cdjmitchellayahoocom@207.46.248.16...
Quote:
"Matthias Moetje" <moetje@terasens_nospam_.de> wrote in
news:#FLy0usvFHA.3764@TK2MSFTNGP09.phx.gbl:
Another question: With CDO (MAPI.Session.Logon) I can use
the ProfileInfo parameter to create and Exchange ad-hoc
profile which is very useful when running as a service. Is there
a similar thing with MAPILogonEx?

Yes: see http://support.microsoft.com/?id=170225

-- dan
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB