Project

General

Profile

Sip session » History » Version 44

Adrian Georgescu, 06/18/2014 03:41 PM

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