Tuesday, May 17, 2011

Lync and Dialogic Troubleshooting Tips

If you've setup Enterprise Voice with Lync, you will often have to use some sort of media gateway to connect your Lync infrastructure to the PSTN (unless you're using a direct SIP provider, of course).  One of my favourite media gateways is the Dialogic DMG 2000.  It's extremely flexible and easy to setup.  I've been on more than a few deployments that used Dialogic gateways, and I'm constantly amazed at how quickly you can be up and running.  I usually tell the customer it may take an entire day to get it working right, but its always taken less than an hour from plugging it in to full inbound/outbound Lync PSTN calling.

This post isn't about how to setup a Dialogic to work with Lync.  Dialogic already has all the documentation (even a sample configuration file) to get you going in that respect.  I'm assuming you've already gotten Lync working with a Dialogic and you've got the latest firmware revision.

UPDATE (21-Sept-2011) - It appears that the www.dialogic.com/microsoftuc site is not working.  The documentation and sample config.ini used to be located at http://www.dialogic.com/microsoftuc/DMG2000_Lync_Config.zip.  The documentation can be viewed at Scribd via http://www.scribd.com/doc/58959088/Lync-DMG2000-Setup-1.
Once things are running, you may encounter some rather odd issues that could leave you scratching your head.  Here are a few of my experiences and how I resolved them.  Keep in mind that while the solutions worked for my client, it may not work for yours.  Also, make sure you backup your current configuration, so you can revert back to it should any of the changes you made break things.

Transferred calls get dropped or never go to voicemail
Several people have noted that calls from the PSTN that are transferred internally twice fail after 30 seconds.  I've personally seen this where someone calls the central response group, which then transfers to an Exchange Auto Attendant after a set period.  If that person then transfers to a user, the phone just rings and rings and never goes to voicemail.

I've seen several posts on the Dialogic forums that had this happen when both Media Bypass and Refer support were enabled (which should be supported in a Dialogic).  Turning off either (or both) allows calls to work as expected.  A interim firmware fix has been released by Dialogic to fix this problem and should be fixed permanently in the SU8 firmware which should be out by the end of July.  This thread on the Dialogic forum explains the issue and provides a link (in a post near the bottom).


Random call drops
Once in a while, a user would be on a PSTN call via Lync and their call would suddenly disconnect for no apparent reason.  Using the very helpful call log in the Dialogic, I could see the End Reason was "TDM: Dialtone detected." 
The Dialogic DMG 2000 will listen for the presence of any number of tones (busy, ringing, dialtone etc) and act accordingly. You can see the current list of tones by clicking on Configuration - Tone Detection.  You should see an entry for Dial Tone.  Presumably, the Dialogic will disconnect an in-progress call when a dialtone is heard.  A quick chat with the user showed that they never heard any kind of dial tone during their call that would cause the call disconnect.  Initially, I changed the number of Cadence Cycles and the Cadence Time to higher values to decrease the chances invalid dialtone detection.  However, the problem still cropped up from time to time, so I ended up deleting the entire Dialtone entry.

Missing audio when reaching external voicemail
This particularly odd issue only happened when you called a phone number that went to voicemail.  Users would notice that they would hear the voicemail pick up, but they would either hear no audio, or only a second of audio before going silent.  The call wouldn't disconnect until the user hung up.  If the user called back and someone picked up, the call would work properly.  Also, if they used their cell phone and got voicemail, the call would work properly.  It didn't happen with every number, but if you did get the issue with a particular phone number, you would always have the issue (which made troubleshooting easier). 

The solution was to change ISDN Answer Supervision Enable (under Configuration - TDM - T1/E1) to No.  When this option is set to Yes, the Dialogic will use ISDN codes to determine if a call is answered.  For whatever reason, this didn't work for some phone numbers when the call went to voicemail.  Turning it off forces the Dialogic to listen for a network connection.



Clive Graven at Microsoft gave me a list of issues/fixes he's encountered during his travels.  I haven't seen these issues myself, but if they sound familiar to you, it might help you out.

Dropped calls when converting from PSTN 1-to-1 call to conference
Clive saw this when a client was talking to someone over the PSTN for at least 30 seconds who then invited someone else into the conversation (which triggers a switch to a conference).  The call would be disconnected.  He fixed it by changing the TCP Inactivity Timer (under Configuration - VoIP - General) to 120 seconds (default 90).

Echo during calls
If users complain about their telephone calls sounding "echo-y" or "sounds like I'm calling from a bathroom" (either from their perspective or the person on the other end), you can edit some of the DSP Advanced Settings under Configuration - DSP Settings.  Before making any changes here, make sure everyone is having the issue.  If it's only affecting a few people, focus on their device.

Echoing might actually be audio clipping resulting from the incoming or outgoing signal being too high.  You can verify this by capturing the call audio using the Dialogic diagnostics logging (under Diagnostics - Trace/Logging - TDM Capture) and analyzing it in a sound editor.  You can try reducing the audio gain by modifying either TDM to IP Gain Adjustment or IP to TDM Gain Adjustment as appropriate.  Use negative values to reduce the overall volume, and positive to increase it.

You may also consider adjusting the following settings.  It's best to change a single value and evaluate the effects, rather than doing them all at once:
  • Jitter Buffer Minimum Delay, from 0 to 20 (Dialogic Best Practices)
  • Line Echo Cancellation NLP Aggressiveness from Normal to Reduced

All the issues noted above are really just the result of slight differences between PSTN providers, rather than a problem with either Lync or the Dialogic device.  Dialogic does an admirable job of providing defaults that work 99.9% of the time. 

If you have anything else to add to the list, please drop me a note in the Comments section.