Java SIP Server
Build a Java-based SIP server that forwards
Internet phone calls to (e.g.), the conference
controller.
- Build generic HTTP/RTSP/SIP parsing library.
- Server uses external programs to map address to user name
(namemapper, aliases, LDAP).
- Server uses external programs to locate users (lswhod).
- Use Java resource files to configure.
- User configuration programs to set forwarding.
- Voice mail: RTSP server, send URL
- In-band with SIP
- The SIP server returns a SIP response containing an audio message:
"John Doe is not available at the moment. Please leave a message after
the beep." (This only works with TCP SIP connections, due to packet
length.) A text message or RTSP control applet would also be possible,
but an audio message works readily through ITGs.
- The SIP server contacts the local RTSP server and sets up (SETUP) a
recording session, picking a destination file name. The RTSP server
returns the port(s) it intends to listen on to the SIP server and starts
recording. (Automatically starting the recording means that the caller
doesn't have to know RTSP.)
- The SIP server returns an SDP message with the RTSP server listening
ports. The Location header parameter
indicates that this is an answering machine.
- If desired, the caller speaks (and sends data packets) as if to a
person.
- The SIP server emails the RTSP URL with the recording to the callee,
possibly including a Java applet to allow control of the recording.
- The RTSP server stops recording when it receives an RTP BYE, after
a timeout or when the SIP server receives a SIP BYE from the caller and
generates an RTSP TEARDOWN.
- RTSP server as full participant (better solution)
- When receiving call, SIP server sends SETUP for recording to RTSP server and gets
the port number on which the server wants to receive data for recording.
- The SIP server also sends SETUP for playback to RTSP server, to make
sure the server has server resources available.
- The SIP server sends 200 OK to SIP client and includes the address
and port of the RTSP server in the SDP payload.
- When the SIP client responds with CONNECTED, the SIP server issues a
PLAY and RECORD to the RTSP server. Initially, until the "beep", there
probably won't be any packets from the caller, but that does no harm.
(This also allows the client to simply ignore the rest of the message.)
- The RTSP server stops recording when it receives an RTP BYE, after
a timeout or when the SIP server receives a SIP BYE from the caller and
generates an RTSP TEARDOWN for both playback and recording streams.
- DTMF commands might be issued through the RTP stream to control
recording and (more importantly) message playback from a phone. The
latter is an instance of a more general problem of how to retrieve RTSP
data via DTMF and can be handled similarly, with an external agent.
Resources
Last modified: 1997-10-02 by Henning Schulzrinne