CU Home
Columbia University Information Technology at Columbia

Networking > at Columbia


Columbia is a parcitipant in the Internet2 Voice over IP Working Group's 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, is an alias to my sip uri of 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 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");
     } else {
          log(1," sipldap call");
 }; #!lookup
This script simply does an LDAP query for or uni=uni and returns the telephonenumber attribute, rewritten as a sip uri that incorporates our various local tieline hacks:
echo "$*" >/tmp/sipldap.log
m=`echo $1 | sed -e 's/^sip://'`
u=`echo $m | sed -e 's/$//'`
num=`ldapsearch -LLL -b "" -P 2 -x -h $f telephonenumber \
| grep '^telephonenumber' | sed -e 's/^telephonenumber: //'`

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

« Return to Advanced Networking Home