Creating Dialing Rules

compared with
Current by Jean-François (JF) Davignon
on Mar 20, 2009 16:42.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (8)

View page history
In the examples below copy the *Phone pattern regular expression* and *Translation regular expression* to the corresponding fields of the *Edit Phone Number Dialing Rule* dialog and replace the phone numbers in the patterns with your own.
{color:red}*_IMPORTANT NOTE_*:{color}{color:maroon} If you copy and paste the rules in the dialing rules edit box in Integrated Office Companion make sure that extra space characters are not accidentally added at the beginning or end of the regular expressions.{color}

|| Name || Description || Example phone number(s) || Phone pattern regular expression || Translation regular expression || Translation result ||
h1. About Dialing Rules
Integrated Office Companion The application makes use of two different kinds of dialing rules: Windows Telephony dialing rules, and user defined dialing rules. These rules can be used together or separately.

As a rule of thumb use Windows Telephony Dialing rules first as they follow dialing plans set forth by the International Telecommunications Union (ITU) and by the individual countries themselves.
h2. Windows Telephony Rules
Microsoft Windows Telephony offers dialing rules which correspond to international dialing rules and location rules the user can configure through *Phone and Modem Options* in the Control Panel. To use these rules in IOC enable them through the settings dialog on the General tab.

h2. User Defined Rules
In Integrated Office Companion dialing Dialing rules can be defined by the user to ensure certain phone numbers are dialed in a specific manner. For example, the phone numbers of your office colleagues are stored in the corporate directory or Outlook Contacts using the full company phone number followed by a phone extension ({nl:e.g.} (444) 555-6666 x7777). When IOC the application encounters such a number it starts by dialing the main phone number and, once the call is established, offers the user to dial the extension. Obviously this will not work for calling colleagues on the same phone system. You can change this behavior by creating a dialing rule that forces IOC to just dial the phone extension.

h3. Translating Phone Numbers

When rules are applied:
* IOC searches Search for the first user defined rule that matches the number.
** If match is not found:
*** If Windows Telephony Rules are not selected:
*** Rule is applied and translated number is dialed.
** Otherwise number is converted to canonical format, asking user for input if necessary.
*** IOC searches Search for user rule that matches canonical form
**** If match is found:
***** Rule is applied and translated number is dialed.
h2. What are regular expressions
[Regular expressions|http://en.wikipedia.org/wiki/Regular_expression] are a rather complex concept. For the purpose of dialing rules in Integrated Office Companion they are used to match phone numbers and modify them. IOC The application uses the [Microsoft .NET regular expression engine|http://msdn2.microsoft.com/en-us/library/az24scfc(VS.71).aspx].

h2. Bare Essentials
h3. Find vs Match
Regular expressions can be used to find certain patterns within a string or they can be used to validate that a whole string conforms to a specific pattern. Integrated Office Companion The dialing rules engine performs a match instead of a find. In this context, it is much easier to write and test dialing rules if the phone pattern starts with the '^' character, which indicates that the following characters must match the beginning of the string, and ends with '$', which indicates that the preceding characters must match the end of the string. As you will see in the examples, all phone pattern regular expressions will follow this design.