Project

General

Profile

Sip session » History » 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
6
7 42 Adrian Georgescu
> This script is available in _sipclients_ package that must be installed separately from SIP SIMPLE client SDK package.
8
9
10
h3. Description
11
12
13
*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
15 1 Adrian Georgescu
The script has the following features:
16
17 42 Adrian Georgescu
# Registers with a SIP registrar and is available for incoming sessions
18
# Switches between multiple sessions and provides in-call controls like Hold and Mute
19
# Handles outgoing SIP sessions with combinations of media types based on RTP and MSRP protocols
20
# Performs NAT traversal using ICE and MSRP relay extension
21
# Provides control for the input, output and alert audio devices
22
# Records the RTP audio streams (input, output or combined) 
23
# Performs blind Call Transfer
24
# Adds and removes participants to a conference
25
# Enable text input and output for Instant Messaging sessions
26
# Provides File Transfer capability with progress indicator
27
# Gives access to real-time traces of involved protocols (DNS, SIP and MSRP)
28 31 Adrian Georgescu
29
30 27 Adrian Georgescu
31 42 Adrian Georgescu
h3. Example
32
33
34
<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
General commands:
40
 /call {user[@domain]}: call the specified user using audio and chat
41
 /audio {user[@domain]} [+chat]: call the specified user using audio and possibly chat
42
 /chat {user[@domain]} [+audio]: call the specified user using chat and possibly audio
43
 /send {user[@domain]} {file}: initiate a file transfer with the specified user
44
 /next: select the next connected session
45
 /prev: select the previous connected session
46
 /sessions: show the list of connected sessions
47
 /trace [[+|-]sip] [[+|-]msrp] [[+|-]pjsip] [[+|-]notifications]: toggle/set tracing on the console (ctrl-x s | ctrl-x m | ctrl-x j | ctrl-x n)
48
 /rtp [on|off]: toggle/set printing RTP statistics and ICE negotiation results on the console (ctrl-x p)
49
 /mute [on|off]: mute the microphone (ctrl-x u)
50
 /input [device]: change audio input device (ctrl-x i)
51
 /output [device]: change audio output device (ctrl-x o)
52
 /alert [device]: change audio alert device (ctrl-x a)
53
 /echo [+|-][value]: adjust echo cancellation (ctrl-x < | ctrl-x >)
54
 /quit: quit the program (ctrl-x q)
55
 /help: display this help message (ctrl-x ?)
56
57
In call commands:
58
 /hangup: hang-up the active session (ctrl-x h)
59
 /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
 /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
 /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
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
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
Other registered contacts:
76
  sip:jiozqyud@192.168.1.124:49569 (expires in 423 seconds)
77
Detected NAT type: Port Restricted
78
adi@umts.ro> 
79 42 Adrian Georgescu
</pre>
80 38 Adrian Georgescu
81
ICE connectivity checks results:
82
83 42 Adrian Georgescu
<pre>
84 38 Adrian Georgescu
adi@umts.ro> /rtp
85
Output of RTP statistics and ICE negotiation results on console is now activated
86
adi@umts.ro> /audio ag@sip2sip.info
87
Initiating SIP session from 'sip:adi@umts.ro' to 'sip:ag@sip2sip.info' via sip:81.23.228.150:5060;transport=udp...
88
 
89
ICE negotiation succeeded in 0s:644
90
 
91
Local ICE candidates:
92
(RTP)	 95.97.50.27:55656        	 type srflx
93
(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
(RTCP)	 95.97.50.27:55890        	 type srflx
97
(RTCP)	 192.168.1.122:55890      	 type host
98
(RTCP)	 10.211.55.2:55890        	 type host
99
(RTCP)	 10.37.129.2:55890        	 type host
100
(RTP)	 81.23.228.150:51782      	 type prflx
101
(RTCP)	 81.23.228.150:51783      	 type prflx
102
 
103
Remote ICE candidates:
104
(RTP)	 81.23.228.150:51780      	 type relay
105
(RTCP)	 81.23.228.150:51781      	 type relay
106
(RTP)	 95.97.50.27:55876        	 type srflx
107
(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
(RTCP)	 95.97.50.27:54037        	 type srflx
111
(RTCP)	 192.168.1.122:54037      	 type host
112
(RTCP)	 10.211.55.2:54037        	 type host
113
(RTCP)	 10.37.129.2:54037        	 type host
114
 
115
ICE connectivity check results:
116
(RTP)	 192.168.1.122:55656 <--> 192.168.1.122:55876 	Succeeded
117
(RTP)	 10.211.55.2:55656 <--> 10.211.55.2:55876 	Succeeded
118
(RTP)	 10.37.129.2:55656 <--> 10.37.129.2:55876 	Succeeded
119
(RTCP)	 192.168.1.122:55890 <--> 192.168.1.122:54037 	Succeeded
120
(RTCP)	 10.211.55.2:55890 <--> 10.211.55.2:54037 	Succeeded
121
(RTCP)	 10.37.129.2:55890 <--> 10.37.129.2:54037 	Succeeded
122
(RTP)	 95.97.50.27:55656 <--> 95.97.50.27:55876 	Succeeded
123
(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
(RTCP)	 81.23.228.150:51783 <--> 81.23.228.150:51781 	Succeeded
126
 
127
Audio session established using "G722" codec at 16000Hz
128
Audio RTP endpoints 192.168.1.122:55656 (ICE type host) <-> 192.168.1.122:55876 (ICE type host)
129 42 Adrian Georgescu
</pre>