Monday, September 19, 2011

Using Office 365 in an Extranet Scenario

This is something that has been one of the most exciting aspects of Office 365 for me. The fast and effective way of creating an Extranet scenario without the need to worry about firewalls, external user accounts or certificates.
When you sign up with Office 365 on an Enterprise plan you get access to your SharePoint Admin control panel. (Sorry folks, the Small business version aka Professional Plan does not have this feature)
There you can create several site collections and even allow external user which have not been set up in your AD or on Office 365 to access your SharePoint sites.
This is great news for companies who work closely with clients and want to use the SharePoint Online part of Office 365 as a information sharing hub.
When you open your first SharePoint team site at :https://youcompanyname.sharepoint.com" as administrator you will notice a new Site Action menu item called "Share Site". This is where you can add users as Visitor or Member to your site or sub site. You will also notice that this does not seem to work for external users straight away. You first need to change two settings for externals to gain access.

  1. On the SharePoint Administration page accessible via https://portal.microsoftonline.com/admin/default.aspx you will find a button that says Settings. Use this button to enable external access for your whole account. 
  2. Then go to the Site Settings of your private site collection via the Site Actions menu and activate the External User Invitations feature under Site Collection Features.

That's it folks. From now on you can add any email address to the Share Site dialog and that person will receive an invitation email to connect to your SharePoint site.
Using what username and password you might ask? Windows Live ID solves this problem for us. This part of Office 365 integrates via federation with Windows Live ID and so the external user can either use their existing Windows Live ID or sign up for a new one.
Once the user has signed in with their Live ID, they will appear in the group that you have added them to. Not any sooner though. They will also appear with their Live ID email which might be different from the email address you sent the invitation to. So before you get a heart attack thinking you got hacked by some random person, double check the email if it does not belong to someone you know who favours cryptic email addresses.

Happy Sharing!

Thursday, September 1, 2011

Call Admission Control (CAC) not working in Lync?

The best tool to test if Call Admission Control (CAC) is actually being used once you have activated it is to use the Logging tool provided with Lync. The Protocol you are interested in is PDP. Another cool tool is the bandwidth monitoring tool provided in the Resource Toolkit. That will show you currently used BW and also existing limits imposed via bandwidth policies.
Should you be in a lab environment, there is a good chance you will not find any CAC entries in the PDP logfile (look for the keywords: requested,current,returned) and the monitoring tool shows Zeros throughout.

CAC is initiated from the client. Effectively the client must know to start asking for a bandwidth for it to turn up in the logs and CAC to do its magic. If the client does not know that CAC is enabled it will not ask. Thus make sure you exit out of the test clients completely and also run gpupdate /force on each test machine after you enabled CAC.

Another universal fix it when Lync clients are misbehaving is to delete the Cache file. For best results go to:
%userprofile%\AppData\Local\Microsoft\Communicator and delete every folder starting with sip_. That will clear out any cached values on your client (and the contact list too) and will force it to pull the latest updates. Careful! that will also delete any connection settings that you might have used for manual configuration instead of automatic configuration.

Finally, try establishing an IM conversation first and adding Audio to that running session. That has proven to be most effective when clients refused to request bw from CAC. After that also non IM initiated sessions request BW.
If you still can't see anything happening on the monitor or requests in the log files I suggest you have a closer look at your Edge and Front End Servers. Make sure all services are running and restart the Lync Bandwidth related services.

Adding answers to IVR Response Group workflow via Powershell


Introduction

in Lync 2010 you can use the web interface to create Interactive Response Groups with up to four possible answers and up to two levels of nested questions. Should you want to add a fifth question to the IVR workflow you will have to revert to using Powershell commands. Although you can create workflows from scratch using Powershell (great article to be found here:

http://blogs.technet.com/b/csps/archive/2010/09/15/rgscreateresponsegroup.aspx) you can also edit existing workflows instead of creating them completely new. In this post I will show you how to get hold of an existing workflow using Powershell, add another possible answer to a question and then save the workflow to commit the changes.

Editing an existing Lync IVR Workflow using Powershell

First you will need to get hold of the workflow objects so you can add new answers to them. First we will retrieve the workflow by its name. Then get hold of an existing queue by its name. This queue can have been created in the control panel. Finally we'll get hold of the first question of the workflow to which we plan to add a fifth option.

$Workflow = Get-CSRgsWorkflow -Name "MyWorkflowName"
$Queue = Get-CsRgsQueue -Name "MyQueue"
$Question = $workflow.DefaultAction.Question


The next step is to create another action and answer and add them to the question bank. First we create an action which will transfer the call to a queue and specify the previously referenced queue. Then we create a fifth option for the question with dtmf tone 5 and the spoken version of "Option5". Then we add the answer to the question list.
$Action5 = New-CsRgsCallAction
                   -Action TransferToQueue
                   -QueueID $Queue.Identity
$Answer5 = New-CsRgsAnswer
                   -Action $Action5
                   -DtmfResponse 5
                   -VoiceResponseList "Option5"

$Question.AnswerList.Add($Answer5)


Finally you need to save the workflow back again using the Set-CsRgsWorkflow Command

Set-CsRgsWorkflow -Instance $Workflow

That's it! You've created and added a fifth possible answer to an IVR Workflow which previously only had four possible answers. Please note, that from now on you will not be able to edit the workflow using the web interface and will get an unsupported error message instead.

Friday, August 26, 2011

Asterisk disk full

Just after my last class today I though I'd copy the asterisk box from the presenter machine to my backup drive. I was shocked to see a 44GB file! Obviously there was some logging problem bloating the hard disk, but it was not asterisk's log files under var/asterisk but instead core files found in tmp.
These core files are effectively memory dump files created by CentOS when Asterisk mibehaves and crashes. I had 43 GB worth of dump files already. The problem is, that simple errors in your sip.conf can cause Asterisk to crash and restart and subsequently crash, going on until your HDD is full of dump files.
I found a easy post on how to control the core dumps here:
http://aplawrence.com/Linux/limit_core_files.html

But that only combats half the problem. The main part was why was asterisk is crashing so often. the answer lied in my case in the qualify=yes entries in my sip.config. If the Lync Mediation server does not expect to respond to the gateway (topology not published yet, Mediation Service not restarted) or is not online at all then the qualify will fail. Worse even, it will crash my Asterisk 1.6 box causing those dumps to quickly fill up the HDD (50MB per dump). So setting qualify=no has helped me keep my asterisk box more stable between my demonstrations.

Thursday, June 23, 2011

Using 2talk SIP Provider with Lync

yesterday I posted about using Asterisk with Lync. Today I will share my configuration files for getting 2Talk up and running with the latest version of Asterisk 1.6:
Effectively there are two configuration files you need to worry about. The sip and the extensions files.
The sip.conf file specifies the different sip trunks and authentication mechanisms. The extensions.conf is your dialplan, which can be the trickiest to get working. Below are my versions (passwords removed)

sip.conf:

[general]
registerattempts=0
registertimeout=20
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
bindport=5060
bindaddr=0.0.0.0
tcpenable=yes ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
notifyhold = yes

;register 2Talk number to receive incoming calls (replace placeholders with values, remove brackets)
register => :@2talk.co.nz/

[1001] ; A locally attached SIP extension (in my case an X-Lite client)
type=friend
callerid=1001
canreinvite=no
dtmfmode=rfc2833
mailbox=1001
disallow=all
allow=ulaw
transport=udp
secret=password
host=dynamic
context=default



[2talk]
type=friend
username=
fromuser=
secret=
host=2talk.co.nz
context=from-2talk ; going to use this in extensions.conf
dtmfmode=rfc2833
disallow=all
allow=ilbc
allow=gsm
allow=alaw
allow=ulaw
;allow=g729 ; only if you have licenses to use it
nat=yes
canreinvite=no
insecure=invite,port ; use insecure=very in earlier versions of Asterisk such as v1.2


[Lync_Trunk] ; Our Lync trunk
type=friend
port=5068 ; This is the default Lync Server TCP listening port
host= ; This should be the IP address of your Lync Mediation Server
dtmfmode=rfc2833
context=from-lync
qualify=yes
transport=tcp,udp

extensions.conf

[general]

static=yes
writeprotect=no

[globals]

[default]
;calls to a 4 digit extension starting with one are routed directly via SIP to local phones
exten => _1XXX,1,Dial(SIP/${EXTEN},20)
exten => _1XXX,2,hangup()

; outbound calls (outside of your own PBX) (only used for internal phones, not calls originating from Lync)
exten => _0.,1,Dial(SIP/${EXTEN:1}@2talk)
exten => _0.,2,hangup()

;calls coming in locally going to a 4 digit number starting with 2 are redirected over the Lync trunk
exten => _2XXX,1,Dial(SIP/Lync_Trunk/${EXTEN},20)
exten => _2XXX,2,hangup()

[from-lync]
;dialling other extensions starting with 1 followed by three digits are sent locally
exten=>_1XXX,1,Dial(SIP/${EXTEN},20)
exten=>_1XXX,n,hangup()

;send other calls to 2talk for Asterisk (no prefix here as Lync will probably have its own dialplan)
exten => _.,1,Dial(SIP/${EXTEN}@2talk)
exten => _.,2,hangup()


[from-2talk]
;send incoming calls on your 2talk number to a Lync Extension
exten => _X.,1,Dial(SIP/Lync_Trunk/2001)


That's it folks! Try using the two configurations with your 2talk SIP provider, add your own number, secret and Lync IP address and start making and receiving calls over Lync.

Tuesday, June 21, 2011

Using Asteriks with Lync 2010

Next week I am teaching how to install and configure Lync using the material provided in the course10533 from Microsoft. Although the course has some great stuff, it misses out on the really juicy bits. Setting up a PSTN connection for example.
I simply could not resist setting it up for myself. After some digging I found this GREAT! Post by Adam:
http://imaucblog.com/archive/2010/10/09/step-by-step-microsoft-lync-2010-asterisk-and-skype-installationintegration-guide/

But then I need to get my Virtual machines connected to the internet! Now ICS has proven to be rather icky. And Bridging really mucks things up. So in the end only a good ol Routing Service would do the trick.
John Paul has a nice article on how to configure Hyper-V to route traffic to your wireless adapter:
http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx

WARNING! Skip the first quarter of the screenshots where he shows bridging. don't wanna do that. jump down to where he starts talking about RRAS

Once I had routing set up and could connect to the net using the private ip-ranges I wanted, I was ready to install Asterisk using Adam's instructions.

Some tips for getting it all running:
No need to buy Skype Plugin if you wanna use sip. I used 2talk and am happy with the results. For the detailled config for 2talk try this page:
http://blog.2talk.co.nz/asterisk.html

IK found a mix between the settings from Adam and the ones from 2talk worked best.

WARNING! A typo or bad rule can send your Asterisk server into an endless crash loop. To fix that, copy the 2talk configurations back into the files and start over again.

Some helping commands I used along the way on the Linux box:
ifconfig (set a new IP address)
route (add a default route to connect to Gateway)
ping (test ip connectivity)
nslookup (test dns server connectivity)
ifconfig and route take effect immediately on the linux box. The changes made via the network setup program only come to life on the next reboot (which took about 5-10 minutes each time)
 
asterisk -r (connect to asterisk console)
  reload (reload all configs)
  diaplan reload (reload only the dialplan)
  sip show peers (see what routes are setup and working)

And as I hate using the command line editor, downlad a browser/editor for Windows ASAP, such as WinSCP: http://winscp.net/eng/download.php
You will need that editor to edit the /etc/asterisk/sip.conf and /etc/asterisk/extensions.conf files

Whenever you make a change to sip.conf or extensions.conf make sure to run the reload command in asterisk again.
Also, staying logged in to Asterisk will show what is going on and is useful when debugging conversation attempts.
Finally, try getting it working step by step.
1) connect X-Lite to SIP provider via Asterisk
2) connect X-Lite to Lync
3) connect Lync to X-Lite
4) connect Lync to SIP provider
Step 1 should be your priority. Once that works the rest falls into place.


Happy configuring. Having it all working is an exhilerating feeling. you'll know what I mean once you have made your first Lync phone call to a real land line.

Monday, June 13, 2011

Hierarchies inspired by Tube Maps

One of the probably most famous and useful navigation resource is the London Underground map. It is truly a masterpiece of navigational aid and has hardly changed since its inception. When reviewing the different possible ways to map out a navigation I came across Patrick Walsh's post : http://www.boxesandarrows.com/view/a-map-based-approach

There he describes a process of using Visio to create a tube map like representation of an intranet. A sample could look as such:

Using interconnections, call-outs and differently coloured lines it now becomes easier to show the different paths a user could take through the system, how the navigation nodes relate to each other and where cross linking is used to help navigation.

Also it should become easier to add lots more links onto a page while keeping it printable and overviewable.

Donna Maurer (http://www.maadmob.net/donna/blog/archives/000639.html) has already found the benefits of adding actualt data to a visio diagram, which makes updating th diagrams with new titles or descriptions a breeze. As datasource you can use either a excel file, Access database or even a SharePoint list!

A few tips for when you are working your way through connecting data to your shapes:
1) call the field which contains the url to the page Url. That way visio will automatically link the whole shape. You can rename a field in Visio, no need to fix the source.
2) create custom representations for your data using the Data Graphics button on the Visio 2010 ribbon.
3) create four different options, one for title above, one for below and one for each side. Changing one option will change all instances of that option. Thus, you will need to create four separate ones.

I'll be handing out samples of the visio I used to create a map at my IA course in Wellington which you can use straight away to build your own metro sitemaps!