Sip session

Version 30 (Adrian Georgescu, 09/08/2009 11:02 pm)

1 2 Adrian Georgescu
== sip_session ==
2 1 Adrian Georgescu
3 2 Adrian Georgescu
[[TOC(SipTesting*, sip_*, depth=2)]]
4 2 Adrian Georgescu
5 4 Adrian Georgescu
=== Description ===
6 5 Adrian Georgescu
7 28 Adrian Georgescu
'''sip_session''' script is a show-case for the powerful features of SIP SIMPLE software development kit related to establishing, modifying and terminating SIP sessions with multiple media types. 
8 28 Adrian Georgescu
9 30 Adrian Georgescu
The script registers with a SIP registrar, handles multiple parallel incoming or outgoing SIP sessions with combinations of media types based on RTP and MSRP protocols, handles NAT traversal using ICE and MSRP relay extension, switches between sessions, provides control for the input, output and alert audio devices, in-call controls like Hold, Mute and Recording of RTP audio streams, enable text input and output for Instant Messaging and delivers real-time trace both on console or save in a file of all involved protocols.
10 28 Adrian Georgescu
11 28 Adrian Georgescu
=== Example ===
12 1 Adrian Georgescu
13 27 Adrian Georgescu
{{{
14 27 Adrian Georgescu
adigeo@ag-imac3:~$sip_session 
15 27 Adrian Georgescu
Using account 31208005169@ag-projects.com
16 27 Adrian Georgescu
Logging SIP trace to file "/Users/adigeo/Desktop/FileTransfers/sip_trace.txt"
17 27 Adrian Georgescu
Logging notifications trace to file "/Users/adigeo/Desktop/FileTransfers/notifications_trace.txt"
18 27 Adrian Georgescu
Available audio input devices: None, system_default, Built-in Input, Built-in Microphone, Logitech Wireless Headset
19 27 Adrian Georgescu
Available audio output devices: None, system_default, Built-in Output, Logitech Wireless Headset
20 27 Adrian Georgescu
Using audio input device: Logitech Wireless Headset
21 27 Adrian Georgescu
Using audio output device: Built-in Output
22 27 Adrian Georgescu
Using audio alert device: Built-in Output
23 27 Adrian Georgescu
Type /help to see a list of available commands.
24 27 Adrian Georgescu
2009-09-07 09:20:48 Registered contact "sip:koincezd@192.168.1.6:54441" for sip:31208005169@ag-projects.com at 81.23.228.150:5060;transport=udp (expires in 600 seconds).
25 27 Adrian Georgescu
Other registered contacts:
26 27 Adrian Georgescu
  sip:31208005169@192.168.1.123:5060 (expires in 176 seconds)
27 27 Adrian Georgescu
  sip:31208005169@192.168.1.1;uniq=5B2860C44383A3D6705629A7E1FB8 (expires in 526 seconds)
28 27 Adrian Georgescu
31208005169@ag-projects.com> /help
29 27 Adrian Georgescu
General commands:
30 27 Adrian Georgescu
  /call {user[@domain]}: call the specified user using audio and chat
31 27 Adrian Georgescu
  /audio {user[@domain]} [+chat]: call the specified user using audio and possibly chat
32 27 Adrian Georgescu
  /chat {user[@domain]} [+audio]: call the specified user using chat and possibly audio
33 27 Adrian Georgescu
  /next: select the next connected session
34 27 Adrian Georgescu
  /prev: select the previous connected session
35 27 Adrian Georgescu
  /sessions: show the list of connected sessions
36 27 Adrian Georgescu
  /trace [[+|-]sip] [[+|-]pjsip] [[+|-]notifications]: toggle/set SIP trace on the console (ctrl-x s | ctrl-x j | ctrl-x n)
37 27 Adrian Georgescu
  /rtp [on|off]: toggle/set printing RTP statistics on the console (ctrl-x p)
38 27 Adrian Georgescu
  /mute [on|off]: mute the microphone (ctrl-x m)
39 27 Adrian Georgescu
  /input [device]: change audio input device (ctrl-x i)
40 27 Adrian Georgescu
  /output [device]: change audio output device (ctrl-x o)
41 27 Adrian Georgescu
  /alert [device]: change audio alert device (ctrl-x a)
42 27 Adrian Georgescu
  /echo [+|-][value]: adjust echo cancellation (ctrl-x < | ctrl-x >)
43 27 Adrian Georgescu
  /quit: quit the program (ctrl-x q)
44 27 Adrian Georgescu
  /help: display this help message (ctrl-x ?)
45 27 Adrian Georgescu
In call commands:
46 27 Adrian Georgescu
  /hangup: hang-up the active session (ctrl-x h)
47 27 Adrian Georgescu
  /record [on|off]: toggle/set audio recording (ctrl-x r)
48 27 Adrian Georgescu
  /hold [on|off]: hold/unhold (ctrl-x SPACE)
49 27 Adrian Georgescu
  /add {chat|audio}: add a stream to the current session
50 27 Adrian Georgescu
  /remove {chat|audio}: remove a stream from the current session
51 27 Adrian Georgescu
Detected NAT type: Port Restricted
52 27 Adrian Georgescu
}}}