I’ve been through many integration projects and I think now I’ve found a product more complicated than BizTalk.
For the last 6 weeks internally we’ve been ‘rolling out’ (more like dragging through the mud) an OCS/UM setup – it now finally works!!!! (Inbound/outbound and UM Voicemail).
OCS – goes from 1 sever to 3!
In this post I’ll aim to take you through linking a working OCS system to a Trixbox connected to MyNetFone (SIP Trunk provider). After countless weeks, forum posts and beyond weird error messages – I’ll simplify it for you.
Me – no OCS, SIP, Trunk, Asterisk expert – great developer, can look at network packets if I *really* have to.
I’m assuming you have OCS setup for IM and A/V between Communicator clients. The OCS Mediation Server is where we are going to focus a little bit also.
Ok – what I wanted to do…this sounds simple.
The Aim:
The Problem(s):
disallow=all allow=alaw&ulaw authname=61555555555 canreinvite=yes dtmfmode=rfc2833 host=sip20.mynetfone.com.au insecure=very nat=yes pedantic=no qualify=yes type=peer username=61555555555 fromdomain=sip20.mynetfone.com.au context=from-MyNetFone
canreinvite=yes fromuser=61555555555 insecure=very qualify=no type=peer username=61555555555 host=sip20.mynetfone.com.au context=from-MyNetFone
[from-Super-OCS] exten => _X.,1,Answer exten => _X.,2,Dial(SIP/${EXTEN}@MyNetFone,,tr)
[from-MyNetFone] exten => _0X.,1,Set(numDialled=+61${EXTEN:1}) ;get all but the first digit from the Extension dialled. exten => _0X.,2,Set(__FROM_DID=${EXTEN}) ;sets a global variable. exten => _0X.,3,Answer exten => _0X.,4,Dial(SIP/${numDialled}@Connect-with-OCS,,tr)
exten => _X.,1,Set(numDialled=+61${EXTEN}) exten => _X.,2,Set(__FROM_DID=${EXTEN}) exten => _X.,3,Answer exten => _X.,4,Dial(SIP/${numDialled}@Connect-with-OCS,,tr)
Note: firstly from-MyNetFone in the above code, once again this is the context from our corresponding Trunk.
exten=> _0X.,1,Set(…) = the _0X. here will match all the numbers passed to us from MyNetFone with a ‘0’ at the front. e.g. 02… – so I need to strip the ‘0’ off and add +61(0)2… Here I created a local variable called ‘numDialled’ to hold the translated number. You can see the ‘+61’ added to ${EXTEN:1}. ${EXTEN:1} = give me all numbers except the first.
exten => _X.,1,Set(numDialled=+61${EXTEN}) exten => _X.,2,Set(__FROM_DID=${EXTEN}) exten => _X.,3,Answer exten => _X.,4,Dial(SIP/${numDialled}@Connect-with-OCS)
#include extensions-away-status.conf
In conclusion: Hopefully this will help unravel the huge mystery on how to connect these systems together. There’s many other ways this can be achieved, and I’d love to say it’s the silver bullet for this, but there’s just so many factors in your solutions.
This should certainly get you a large step down that path.
Good luck.
Mick.