OCS/Asterisk integration work in progress

UPDATE 17/12/2007: This information has been superseded by a more detailed post.

So I have finally gotten my act together and started my OCS/Asterisk integration. For those of you that don't want to wait for the full guide, you can start by configuring your dial plans in Asterisk and sipX to point to your mediation server. Add the following code into extensions_custom.conf

exten => s,1,NoOp(Entering custom-exchangevm for a call to ${DNID})
exten => s,n,Set(EXTTOCALL=${BLKVM_BASE})
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,SIPAddHeader(Diversion: <tel:${EXTTOCALL}>\;reason=no-answer\;screen=no\;privacy=off)
exten => s,n,Dial(SIP/222@sipx.lithnet.local|30)

You will need to install the "Follow me" module in FreePBX. Then configure the follow me settings for each extension as shown so that both the Asterisk extension and the OCS phone ring at the same time. Note for each number that is external to the Asterisk system, you must append a hash (#) to the end of the number as shown below for 800 - my OCS extension.

More to come.