Versions Compared

Key

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

...

When a call is made, the message flow is as follows:

No Format
SIP: MS Office 
Communicator 2007 <-TLS--> TLS OCS&nbsp;<-TLS--> MSOCS OCSmed 2007serv <\- TCP \-> OpenSER <\- UDP \-> Asterisk <><-> PSTN
No Format
RTP: MS Office Media:
Communicator 2007 <- SRTP -> MS OCS 2007 <-/OCS <-SRTP->&nbsp;OCS med serv <------------ RTP ---------/-> Asterisk <><-> PSTN

Prerequisites

...

In the OCS MMC snap-in, right click on the OCS forest and select 'properties -> voice properties'.

Add a Localization Profile

The dialog opens in the 'Localisation Localization Profiles' tab.
Edit the default location profile or add a new one and edit the profile, so you can add a localization 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>

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*)$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \->&nbsp;&nbsp;&nbsp; \+31$1

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.

...

Add a Route

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*)$

See the Microsoft 'OCS_VoIp_Guide' document for further reference.

...

Even though they cannot really make external calls yet, you can enable users for Enterprise Voice. This can be done in various places. Let's go to the
'Active Directory Users' MMC snap-in, go to the entry of a test user and select its properties.

In the 'Communications Tab' choose
'additional options' -> Configure,
and in the new dialog select 'Enable Enterprise Voice'.

Fill in the line URI. which can be of the form

No Format

tel:+<nr> (yes, the '+' again!)

Install and configure OCS Mediation Server

...

Next Hop:
Gateway Listening IP address: the external IP address of the Mediation Server

Location Profile:
choose the location profile as chosen before (i.e. 'Utrecht')

Gateway IP addres:
<your OpenSER IP address>

Phone usages: 'PSTN out'

Add a Route

Create a route that points to the Mediation Server. For instance, to forward calls to any number:
^+(.*)$

...

Configuration of OpenSER

Edit your openser.cfg as follows or download openser.cfg for your convenience:

Code Block
debug=5
log_stderror = no
fork=yes
children=4alias=<your OpenSER proxy FQDN>listen=udp:<your OpenSER proxy IP address>:5060
listen=tcp:<your OpenSER proxy IP address>:5060check_via=no
dns=no
rev_dns=nompath="/usr/local/lib/openser/modules/"loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "maxfwd.so"
loadmodule "uri.so"
loadmodule "uac.so"
modparam("uac","from_restore_mode","auto")
loadmodule "textops.so"
loadmodule "rr.so"
modparam("rr", "enable_full_lr", 1)
modparam("rr", "enable_double_rr",0)
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
loadmodule "xlog.so"
modparam("xlog", "buf_size", 4096)
modparam("xlog", "force_color", 1)
route { 
if (\!mf_process_maxfwd_header("10")) { 
	sl_send_reply("483","Too Many Hops"); 
	exit; 
}
;
if (msg:len >= 2048 )  { 
	sl_send_reply("513", "Message too big"); 
	exit; 
};
 
if (loose_route()) { 
	append_hf("P-hint: rr-enforced\r\n"); 
	route(21); 
};
 
if (!uri==myself) { 
	append_hf("P-hint: outbound\r\n"); 
	route(21); 
};

route(1);

}route1	# {If coming from OCS
	if (src_ip==<your OCS Mediation Server IP address>) 
		{ if (method=="INVITE|BYE") { 
			xlog("L_INFO", "*** invite from OCS M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); }
		}
		t_relay("udp:212.0.234.219<your Asterisk Server IP Address>:5060");
	}
	# }else coming from Asterisk
	else { 
		t_relay("tcp:213.154.233.13<your Asterisk Server IP Address>:5060"); 
	};
	exit;
}

OS specific help

Validation, confirmation tests

...