At CUCS, vat can be found at ~hgs/sun5/bin/vat and nevot is invoked through isc at ~hgs/sun5/bin/isc.
INVITE
and ACK
SIP requests using TCP to an address
of the form "user@host". You do not have to implement BYE
. Only the Content-Length
,
To
, From
, Cseq
and
Call-ID
headers are necessary. You do not have to support
SDP; simply connect audio to wherever the SIP request originated from,
at a default port of 5004 (RTP) and 5005 (RTCP). Your program should
handle syntactically incorrect requests gracefully (i.e., without
crashing) and be able to handle variations in SIP syntax such as
upper/lower case requests, various amount of white space, etc. Your
program should interpret status codes, but anything but 2xx only needs
to be displayed, not acted upon. You may either use an audio ringing
signal or some form or visual indication.
The program should be able to answer and originate calls, for example, "phone -e me@cs.columbia.edu foo@bar.com" might make a phone call to the named host, while "phone" simply waits for an incoming call. Here, the parameter "e" specifies the local user's email address.
The default port for SIP is 5060.
A request from the caller may look like
INVITE sip://foo@bar.com SIP/2.0 To: foo@bar.com From: me@cs.columbia.edu CSeq: 1 Content-Length: 0 Call-ID: 256403891744996588@erlang.cs.columbia.eduThe
CSeq
is the request sequence number, unique for each
Call-ID
. The Call-ID
is a random number,
generated in the example here by a concatenation of two 32-bit random
numbers using the "random32.c" utility function cited below. You can
also use the output of "gettimeofday()", for example.
The callee accepts the call by responding with
SIP/2.0 200 OK To: foo@bar.com From: me@cs.columbia.edu CSeq: 1 Content-Length: 0 Call-ID: 256403891744996588@erlang.cs.columbia.eduIt simply echoes the headers in the request.
Finally, the caller confirms the call with
ACK sip://foo@bar.com SIP/2.0 To: foo@bar.com From: me@cs.columbia.edu CSeq: 1 Content-Length: 0 Call-ID: 256403891@erlang.cs.columbia.edu
If using C, you may (but don't have to) use the following routines for the first three problems: