Sip session

Version 42 (Adrian Georgescu, 09/20/2011 12:07 pm)

1 1 Adrian Georgescu
2 42 Adrian Georgescu
h2. sip-session
3 41 Adrian Georgescu
4 1 Adrian Georgescu
5 1 Adrian Georgescu
6 1 Adrian Georgescu
7 42 Adrian Georgescu
> This script is available in _sipclients_ package that must be installed separately from SIP SIMPLE client SDK package.
8 42 Adrian Georgescu
9 42 Adrian Georgescu
10 42 Adrian Georgescu
h3. Description
11 42 Adrian Georgescu
12 42 Adrian Georgescu
13 42 Adrian Georgescu
*sip-session* command line script is a show-case for the powerful features of SIP SIMPLE development kit related to establishing, modifying and terminating SIP sessions with multiple media types like VoIP, Instant Messaging and File Transfer.
14 42 Adrian Georgescu
15 1 Adrian Georgescu
The script has the following features:
16 1 Adrian Georgescu
17 42 Adrian Georgescu
# Registers with a SIP registrar and is available for incoming sessions
18 42 Adrian Georgescu
# Switches between multiple sessions and provides in-call controls like Hold and Mute
19 42 Adrian Georgescu
# Handles outgoing SIP sessions with combinations of media types based on RTP and MSRP protocols
20 42 Adrian Georgescu
# Performs NAT traversal using ICE and MSRP relay extension
21 42 Adrian Georgescu
# Provides control for the input, output and alert audio devices
22 42 Adrian Georgescu
# Records the RTP audio streams (input, output or combined) 
23 42 Adrian Georgescu
# Performs blind Call Transfer
24 42 Adrian Georgescu
# Adds and removes participants to a conference
25 42 Adrian Georgescu
# Enable text input and output for Instant Messaging sessions
26 42 Adrian Georgescu
# Provides File Transfer capability with progress indicator
27 42 Adrian Georgescu
# Gives access to real-time traces of involved protocols (DNS, SIP and MSRP)
28 31 Adrian Georgescu
29 31 Adrian Georgescu
30 27 Adrian Georgescu
31 42 Adrian Georgescu
h3. Example
32 42 Adrian Georgescu
33 42 Adrian Georgescu
34 42 Adrian Georgescu
<pre>
35 1 Adrian Georgescu
adigeo@ag-imac3:~$sip-session 
36 40 Adrian Georgescu
Using account adi@umts.ro
37 1 Adrian Georgescu
adi@umts.ro> /help
38 40 Adrian Georgescu
39 40 Adrian Georgescu
General commands:
40 40 Adrian Georgescu
 /call {user[@domain]}: call the specified user using audio and chat
41 40 Adrian Georgescu
 /audio {user[@domain]} [+chat]: call the specified user using audio and possibly chat
42 40 Adrian Georgescu
 /chat {user[@domain]} [+audio]: call the specified user using chat and possibly audio
43 40 Adrian Georgescu
 /send {user[@domain]} {file}: initiate a file transfer with the specified user
44 40 Adrian Georgescu
 /next: select the next connected session
45 40 Adrian Georgescu
 /prev: select the previous connected session
46 40 Adrian Georgescu
 /sessions: show the list of connected sessions
47 40 Adrian Georgescu
 /trace [[+|-]sip] [[+|-]msrp] [[+|-]pjsip] [[+|-]notifications]: toggle/set tracing on the console (ctrl-x s | ctrl-x m | ctrl-x j | ctrl-x n)
48 40 Adrian Georgescu
 /rtp [on|off]: toggle/set printing RTP statistics and ICE negotiation results on the console (ctrl-x p)
49 40 Adrian Georgescu
 /mute [on|off]: mute the microphone (ctrl-x u)
50 40 Adrian Georgescu
 /input [device]: change audio input device (ctrl-x i)
51 40 Adrian Georgescu
 /output [device]: change audio output device (ctrl-x o)
52 40 Adrian Georgescu
 /alert [device]: change audio alert device (ctrl-x a)
53 40 Adrian Georgescu
 /echo [+|-][value]: adjust echo cancellation (ctrl-x < | ctrl-x >)
54 40 Adrian Georgescu
 /quit: quit the program (ctrl-x q)
55 40 Adrian Georgescu
 /help: display this help message (ctrl-x ?)
56 40 Adrian Georgescu
57 40 Adrian Georgescu
In call commands:
58 40 Adrian Georgescu
 /hangup: hang-up the active session (ctrl-x h)
59 40 Adrian Georgescu
 /dtmf {0-9|*|#|A-D}...: send DTMF tones (ctrl-x 0-9|*|#|A-D)
60 1 Adrian Georgescu
 /record [on|off]: toggle/set audio recording (ctrl-x r)
61 40 Adrian Georgescu
 /hold [on|off]: hold/unhold (ctrl-x SPACE)
62 40 Adrian Georgescu
 /add {chat|audio}: add a stream to the current session
63 1 Adrian Georgescu
 /remove {chat|audio}: remove a stream from the current session
64 40 Adrian Georgescu
 /add_participant {user@domain}: add the specified user to the conference
65 40 Adrian Georgescu
 /remove_participant {user@domain}: remove the specified user from the conference
66 31 Adrian Georgescu
 /transfer {user@domain}: transfer (using blind transfer) callee to the specified destination
67 31 Adrian Georgescu
68 37 Adrian Georgescu
Available audio input devices: None, system_default, Built-in Input, Built-in Microphone
69 31 Adrian Georgescu
Available audio output devices: None, system_default, Built-in Output
70 31 Adrian Georgescu
Using audio input device: Built-in Microphone (system default device)
71 27 Adrian Georgescu
Using audio output device: Built-in Output (system default device)
72 31 Adrian Georgescu
Using audio alert device: Built-in Output
73 1 Adrian Georgescu
Type /help to see a list of available commands.
74 38 Adrian Georgescu
2009-10-29 22:42:14 Registered contact "sip:puioxbqy@192.168.1.124:50150" (expires in 600 seconds).
75 38 Adrian Georgescu
Other registered contacts:
76 38 Adrian Georgescu
  sip:jiozqyud@192.168.1.124:49569 (expires in 423 seconds)
77 38 Adrian Georgescu
Detected NAT type: Port Restricted
78 38 Adrian Georgescu
adi@umts.ro> 
79 42 Adrian Georgescu
</pre>
80 38 Adrian Georgescu
81 38 Adrian Georgescu
ICE connectivity checks results:
82 38 Adrian Georgescu
83 42 Adrian Georgescu
<pre>
84 38 Adrian Georgescu
adi@umts.ro> /rtp
85 38 Adrian Georgescu
Output of RTP statistics and ICE negotiation results on console is now activated
86 38 Adrian Georgescu
adi@umts.ro> /audio ag@sip2sip.info
87 38 Adrian Georgescu
Initiating SIP session from 'sip:adi@umts.ro' to 'sip:ag@sip2sip.info' via sip:81.23.228.150:5060;transport=udp...
88 38 Adrian Georgescu
 
89 38 Adrian Georgescu
ICE negotiation succeeded in 0s:644
90 38 Adrian Georgescu
 
91 38 Adrian Georgescu
Local ICE candidates:
92 38 Adrian Georgescu
(RTP)	 95.97.50.27:55656        	 type srflx
93 38 Adrian Georgescu
(RTP)	 192.168.1.122:55656      	 type host
94 39 Adrian Georgescu
(RTP)	 10.211.55.2:55656        	 type host
95 38 Adrian Georgescu
(RTP)	 10.37.129.2:55656        	 type host
96 38 Adrian Georgescu
(RTCP)	 95.97.50.27:55890        	 type srflx
97 38 Adrian Georgescu
(RTCP)	 192.168.1.122:55890      	 type host
98 38 Adrian Georgescu
(RTCP)	 10.211.55.2:55890        	 type host
99 38 Adrian Georgescu
(RTCP)	 10.37.129.2:55890        	 type host
100 38 Adrian Georgescu
(RTP)	 81.23.228.150:51782      	 type prflx
101 38 Adrian Georgescu
(RTCP)	 81.23.228.150:51783      	 type prflx
102 38 Adrian Georgescu
 
103 38 Adrian Georgescu
Remote ICE candidates:
104 38 Adrian Georgescu
(RTP)	 81.23.228.150:51780      	 type relay
105 38 Adrian Georgescu
(RTCP)	 81.23.228.150:51781      	 type relay
106 38 Adrian Georgescu
(RTP)	 95.97.50.27:55876        	 type srflx
107 38 Adrian Georgescu
(RTP)	 192.168.1.122:55876      	 type host
108 1 Adrian Georgescu
(RTP)	 10.211.55.2:55876        	 type host
109 38 Adrian Georgescu
(RTP)	 10.37.129.2:55876        	 type host
110 38 Adrian Georgescu
(RTCP)	 95.97.50.27:54037        	 type srflx
111 38 Adrian Georgescu
(RTCP)	 192.168.1.122:54037      	 type host
112 38 Adrian Georgescu
(RTCP)	 10.211.55.2:54037        	 type host
113 38 Adrian Georgescu
(RTCP)	 10.37.129.2:54037        	 type host
114 38 Adrian Georgescu
 
115 38 Adrian Georgescu
ICE connectivity check results:
116 38 Adrian Georgescu
(RTP)	 192.168.1.122:55656 <--> 192.168.1.122:55876 	Succeeded
117 38 Adrian Georgescu
(RTP)	 10.211.55.2:55656 <--> 10.211.55.2:55876 	Succeeded
118 38 Adrian Georgescu
(RTP)	 10.37.129.2:55656 <--> 10.37.129.2:55876 	Succeeded
119 38 Adrian Georgescu
(RTCP)	 192.168.1.122:55890 <--> 192.168.1.122:54037 	Succeeded
120 38 Adrian Georgescu
(RTCP)	 10.211.55.2:55890 <--> 10.211.55.2:54037 	Succeeded
121 38 Adrian Georgescu
(RTCP)	 10.37.129.2:55890 <--> 10.37.129.2:54037 	Succeeded
122 38 Adrian Georgescu
(RTP)	 95.97.50.27:55656 <--> 95.97.50.27:55876 	Succeeded
123 38 Adrian Georgescu
(RTCP)	 95.97.50.27:55890 <--> 95.97.50.27:54037 	Succeeded
124 1 Adrian Georgescu
(RTP)	 81.23.228.150:51782 <--> 81.23.228.150:51780 	Succeeded
125 1 Adrian Georgescu
(RTCP)	 81.23.228.150:51783 <--> 81.23.228.150:51781 	Succeeded
126 1 Adrian Georgescu
 
127 1 Adrian Georgescu
Audio session established using "G722" codec at 16000Hz
128 1 Adrian Georgescu
Audio RTP endpoints 192.168.1.122:55656 (ICE type host) <-> 192.168.1.122:55876 (ICE type host)
129 42 Adrian Georgescu
</pre>