Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Assuming you have a working Asterisk setup, only few things have to be taken care of.

Create a SIP trunk, see http://blog.lithiumblue.com/2007/12/interim-information-on-integration-ocs.html forImage Removed an example if you use Trixbox as your Asterisk server. Use the following settings in your SIP.conf:

...

The dialog opens in the 'Localization Profiles' tab.
Edit the default location profile or add a new one and edit the profile, so you can add a localization rule. !OCS Normalization rule!

Within the localization rule, add a normalization rule. The rule translates numbers dialed by users to a standard format. Here we always translate to E.164 format, namely

No Format
+<countrycode><area code><subscriber number>

Add a normalization rule

Fortunately, the Microsoft Communicator translates numbers automatically to this format, leaving out the +, (), spaces and dashes, even when starting a call from Microsoft Outlook. However, we have to add at least one rule.

Add a normalization rule

The normalization rule is written in .net regular expression format. See http://www.regular-expressions.info/tutorial.html for more explanation of regular expressions. In our case, we translate any number starting with a zero to a Dutch number:

No Format
\^0(\d*)$       ->       \+31$1

Image Added

It basically means that for any new translation (^) of a number that starts with a 0 and then containing any number of digits \d* it should take the part of the number between brackets () and use it as variable in the translation. The translation adds +31 to it.
THE '+' SIGN IS ABSOLUTELY CRUCIAL!!!!! Don't forget to put it there! Please double check whether it's in the config! Don't say we didn't warn!
When you're done with the 'Localization Profiles' tab you can add 'phone usages' in the 'voice properties' dialog, which are useful for assigning to users and logging these types of use. Be sure to also create at least one Policy in the Policy tab.

...

Most important, however, is to add a 'route' under the 'routes' tab.
Here is defined that for numbers matching a certain regular expression, the call should be routed to our mediation server. The regular expression states in this case that any number should be forwarded:

No Format
\^(\d*)$

Part of the route definition are the phone usages that are allowed for this route. A collection of phone usages form a 'policy', and a user will later on be assigned a policy. This way, you can discern which users are allowed what type of calls (for instance disallow service numbers). Image Added

See the Microsoft 'OCS_VoIp_Guide' document for further reference.

...