This script is available in sipclients package that must be installed separately from SIP SIMPLE client SDK package.


sip-session command line script is a show-case for the powerful features of SIP SIMPLE Client SDK related to establishing, modifying and terminating SIP sessions with multiple media types like VoIP, Instant Messaging and File Transfer and support for multi-party conferencing.

The script has the following features:

  1. Registers with a SIP registrar and is available for incoming sessions
  2. Switches between multiple sessions and provides in-call controls like Hold and Mute
  3. Handles outgoing SIP sessions with combinations of media types based on RTP and MSRP protocols
  4. Performs NAT traversal using ICE and MSRP relay extension
  5. Provides control for the input, output and alert audio devices
  6. Records the RTP audio streams (input, output or combined)
  7. Performs blind Call Transfer
  8. Adds and removes participants to a conference
  9. Enable text input and output for Instant Messaging sessions
  10. Provides File Transfer capability with progress indicator
  11. Gives access to real-time traces of involved protocols (DNS, SIP, ICE and MSRP)


Using account> /help

General commands:
 /call {user[@domain]}: call the specified user using audio and chat
 /audio {user[@domain]} [+chat]: call the specified user using audio and possibly chat
 /chat {user[@domain]} [+audio]: call the specified user using chat and possibly audio
 /send {user[@domain]} {file}: initiate a file transfer with the specified user
 /next: select the next connected session
 /prev: select the previous connected session
 /sessions: show the list of connected sessions
 /trace [[+|-]sip] [[+|-]msrp] [[+|-]pjsip] [[+|-]notifications]: toggle/set tracing on the console (ctrl-x s | ctrl-x m | ctrl-x j | ctrl-x n)
 /rtp [on|off]: toggle/set printing RTP statistics and ICE negotiation results on the console (ctrl-x p)
 /mute [on|off]: mute the microphone (ctrl-x u)
 /input [device]: change audio input device (ctrl-x i)
 /output [device]: change audio output device (ctrl-x o)
 /alert [device]: change audio alert device (ctrl-x a)
 /echo [+|-][value]: adjust echo cancellation (ctrl-x < | ctrl-x >)
 /quit: quit the program (ctrl-x q)
 /help: display this help message (ctrl-x ?)

In call commands:
 /hangup: hang-up the active session (ctrl-x h)
 /dtmf {0-9|*|#|A-D}...: send DTMF tones (ctrl-x 0-9|*|#|A-D)
 /record [on|off]: toggle/set audio recording (ctrl-x r)
 /hold [on|off]: hold/unhold (ctrl-x SPACE)
 /add {chat|audio}: add a stream to the current session
 /remove {chat|audio}: remove a stream from the current session
 /add_participant {user@domain}: add the specified user to the conference
 /remove_participant {user@domain}: remove the specified user from the conference
 /transfer {user@domain}: transfer (using blind transfer) callee to the specified destination

Available audio input devices: None, system_default, Built-in Input, Built-in Microphone
Available audio output devices: None, system_default, Built-in Output
Using audio input device: Built-in Microphone (system default device)
Using audio output device: Built-in Output (system default device)
Using audio alert device: Built-in Output
Type /help to see a list of available commands.
2009-10-29 22:42:14 Registered contact "sip:puioxbqy@" (expires in 600 seconds).
Other registered contacts:
  sip:jiozqyud@ (expires in 423 seconds)
Detected NAT type: Port Restricted> 

ICE connectivity checks results:> /rtp
Output of RTP statistics and ICE negotiation results on console is now activated> /audio
Initiating SIP session from '' to '' via sip:;transport=udp...

ICE negotiation succeeded in 0s:644

Local ICE candidates:
(RTP)             type srflx
(RTP)           type host
(RTP)             type host
(RTP)             type host
(RTCP)             type srflx
(RTCP)           type host
(RTCP)             type host
(RTCP)             type host
(RTP)           type prflx
(RTCP)           type prflx

Remote ICE candidates:
(RTP)           type relay
(RTCP)           type relay
(RTP)             type srflx
(RTP)           type host
(RTP)             type host
(RTP)             type host
(RTCP)             type srflx
(RTCP)           type host
(RTCP)             type host
(RTCP)             type host

ICE connectivity check results:
(RTP) <-->     Succeeded
(RTP) <-->     Succeeded
(RTP) <-->     Succeeded
(RTCP) <-->     Succeeded
(RTCP) <-->     Succeeded
(RTCP) <-->     Succeeded
(RTP) <-->     Succeeded
(RTCP) <-->     Succeeded
(RTP) <-->     Succeeded
(RTCP) <-->     Succeeded

Audio session established using "G722" codec at 16000Hz
Audio RTP endpoints (ICE type host) <-> (ICE type host)