Archive for the ‘Lotus Notes/Domino’ Category

Recover documents from a corrupt Lotus Notes database

Thursday, April 12th, 2007

Today when I was reading an IBM RSS feed about Lotus Domino, I stumbled upon an interesting technote on how to recover documents from a corrupted Lotus Notes database. The technote first recommends you attempt the standard fixup, updall and compact. However if those don’t work, this is something else to try.

The process recommended is to write an agent that will attempt to copy each document in the database to a new database. The technote has sample code that you could easily copy and paste with only a couple of tweaks to the filenames. I have never had a database that needed this but being prepared could come in handy in an emergency.

Asterisk caller id lookup via LDAP to a Domino Directory

Thursday, April 12th, 2007

I got an idea last night to have Asterisk do a LDAP lookup to a Lotus Domino Directory for caller id names. This provides caller id names for any company phone number listed in the directory including people’s cell phone numbers. Today I spent a few of hours writing a shell script to be called via the Asterisk Gateway Interface(AGI). The AGI is very powerful with interfaces to many programming languages like PHP, Perl, Python, Ruby and shell. There are many examples on the voip-info.org wiki.

The shell script is called via the Asterisk dialplan on incoming calls. The shell script get passed all the standard AGI variables which includes the caller id number of the caller. The script requires OpenLDAP to be installed on the Asterisk server because it uses the ldapsearch function. The script builds a LDAP search filter and queries the LDAP server for any users with a matching phone number. It then sends a “set callerid” command via the AGI to add the name to the call.

Domino’s LDAP server seems to respond very fast and the script takes around 1/4 of a second to process. I don’t consider script to be done and still needs more error checking added. I figured I would post what I have so others can build off of what I have started. Here are some instructions if you want to use what I created. The Asterisk server I was using is running 1.4.2 . I think it will work fine with prior versions of 1.2.x, however I have not tested it on that.

  • Download Asterisk AGI script.
  • Rename the file ldaplookupphone.agi.
    mv ldaplookupphone.txt ldaplookupphone.agi
  • Put it in the /var/lib/asterisk/agi-bin directory.
    mv ldaplookupphone.agi /var/lib/asterisk/agi-bin/”
  • Make sure the asterisk user has execute permissions on the script.
    chmod 755 /var/lib/asterisk/agi-bin/ldaplookupphone.agi
  • Update 3 variables at the top of the script for the hostname, username and password for the LDAP server.
  • Follow the example below to alter your extensions.conf to run the script before calling the Dial application. After you make changes in extensions.com remember to run dialplan reload at the Asterisk console.

Here is an example dialplan.
exten => 1234,1,Dial(SIP/1000)

It should be changed to look like this.
exten => 1234,1,AGI(ldaplookupphone.agi)
exten => 1234,n,Dial(SIP/1000)

In the future I hope to post other ways to do lookups to Lotus Notes databases from Asterisk AGI scripts.

Notes 8

Saturday, March 31st, 2007

I have been running the Notes 8 beta since the day after its release.  The released beta is running Lotus Notes on top of eclipse.  This has given the UI a great and much needed face lift.  Most people I know that dislike Notes don’t like the UI.  I think they will be very satisfied with Notes 8 when it is released.  I like that they integrated the Sametime client 7.5.1 and an RSS reader as well.

The upgrade is easily done by running the installer.  Once it is upgraded I recommend you upgrade the design of your mail file to DWA 8.  Make sure you ask your Notes admin to make sure he doesn’t mind you changing your mail file design.

The performance is poor however IBM has noted that nothing has been done for performance tuning in the beta.  I would not recommend anyone run the beta without at least 1 Gigabyte of RAM.  I hope they are able to make it work on computers with 512 Megabytes.  I have noticed some of the UI widgets don’t always operate consistently and my designer client doesn’t load at all.  It has also been randomly crashing about once a week.  I was a little surprised with the number of bugs in an IBM beta however, I believe they were under great pressure to release this ASAP so customers could start playing with it.

Overall I think the next version will be a great upgrade and I look forward to it.