CU Home
Columbia University Information Technology
SIP.edu at Columbia

Networking > SIP.edu at Columbia

Introduction


Columbia is a parcitipant in the Internet2 Voice over IP Working Group's SIP.edu initiative which has the goal of SIP-enabling plain old telephone users via SIP to POTS gateways.

The Gateway


We have a bidirectional Cisco 2600 SIP gateway which is connected to the campus Siemens telephone switch via a PRI (T1) line. Incoming calls can be placed to this gateway via a small number of direct inward dialing numbers. For example, a call to +1 212-851-7548 will be routed from the Siemens to the gateway which in turn has a voice-peer with our SIP proxy. Finally, sip:17548@columbia.edu is an alias to my sip uri of sip:alan@columbia.edu so my IP phone(s) ring.

Outgoing calls are routed to the gateway via the SIP Proxy.

Using our LDAP directory from the SIP Proxy


We use the SIP Express Router from iptel.org. This is a GPL'd proxy that works great. Adding the LDAP lookup was easy. Right after SER looks in the user location database for a registered user agent and fails to find it, we added a call to an external script via the exec_dset() module:
 # native SIP destinations are handled using our USRLOC DB
 if (!lookup("location")) {
     if (!exec_dset("/etc/ser/sipldap")) {
          sl_send_reply("404", "Not Found");
          break;
     } else {
          log(1," sipldap call");
     };
 }; #!lookup
This script simply does an LDAP query for mail=user@columbia.edu or uni=uni and returns the telephonenumber attribute, rewritten as a sip uri that incorporates our various local tieline hacks:
#!/bin/sh
echo "$*" >/tmp/sipldap.log
m=`echo $1 | sed -e 's/^sip://'`
u=`echo $m | sed -e 's/@columbia.edu$//'`
f="(|(mail=$m)(uni=$u))"
num=`ldapsearch -LLL -b "" -P 2 -x -h ldap.cc.columbia.edu $f telephonenumber \
| grep '^telephonenumber' | sed -e 's/^telephonenumber: //'`

if [ -z "$num" ]
then
  echo "$*"
  exit 1
fi
num=`echo $num | sed -e 's/^+1 212-85\([1347]\)-\(....\)/\1\2@columbia.edu/' \
		     -e 's/^+1 212-30\(5\)-\(....\)/51\1\2@columbia.edu/' \
		     -e 's/^+1 845-365-\(....\)/95\1@columbia.edu/' \
		     -e 's/^+1 212-678-\(....\)/94\1@columbia.edu/' \
		     -e 's/^+1 212-870-\(....\)/80\1@columbia.edu/' \
		     -e 's/^+1 212-939-\(....\)/\1@cs.columbia.edu/' \
		     -e 's/^+\(1\) \(...\)-\(...\)-\(....\)/93\1\2\3\4@columbia.edu/'`
echo $num >>/tmp/sipldap.log
echo sip:$num
exit 0

« Return to Advanced Networking Home