Sip audio session

Version 23 (Adrian Georgescu, 09/24/2009 10:34 pm)

1 1 Adrian Georgescu
== sip_audio_session ==
2 2 Adrian Georgescu
[[TOC(SipTesting*, sip_*, xcap*,depth=2)]]
3 1 Adrian Georgescu
4 1 Adrian Georgescu
=== Description ===
5 1 Adrian Georgescu
6 1 Adrian Georgescu
This script can be used for interactive audio session or for scripting alarms. The script returns appropriate shell response codes for failed or successful sessions. The script can be setup to auto answer and auto hangup after predefined number of seconds, detects SIP negative response codes, missing ACK and the lack of RTP media after a session has been established.
7 6 Adrian Georgescu
8 10 Adrian Georgescu
[[Image(http://www.tech-invite.com/img/cf3665/cf3665-32.gif)]]
9 1 Adrian Georgescu
10 1 Adrian Georgescu
Source code: [source:scripts/sip_audio_session.py scripts/sip_audio_session.py]
11 1 Adrian Georgescu
12 1 Adrian Georgescu
{{{
13 21 Adrian Georgescu
adigeo@ag-blink:~$sip_audio_session -h
14 17 Adrian Georgescu
Usage: sip_audio_session [options] [user@domain]
15 1 Adrian Georgescu
16 17 Adrian Georgescu
This script can sit idle waiting for an incoming audio session, or initiate an
17 17 Adrian Georgescu
outgoing audio session to a SIP address. The program will close the session
18 17 Adrian Georgescu
and quit when Ctrl+D is pressed.
19 1 Adrian Georgescu
20 1 Adrian Georgescu
Options:
21 1 Adrian Georgescu
  -h, --help            show this help message and exit
22 5 Adrian Georgescu
  -a NAME, --account=NAME
23 5 Adrian Georgescu
                        The account name to use for any outgoing traffic. If
24 5 Adrian Georgescu
                        not supplied, the default account will be used.
25 19 Adrian Georgescu
  -c FILE, --config-file=FILE
26 1 Adrian Georgescu
                        The path to a configuration file to use. This
27 5 Adrian Georgescu
                        overrides the default location of the configuration
28 5 Adrian Georgescu
                        file.
29 17 Adrian Georgescu
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
30 17 Adrian Georgescu
                        messages.
31 17 Adrian Georgescu
  -j, --trace-pjsip     Print PJSIP logging output.
32 17 Adrian Georgescu
  -n, --trace-notifications
33 17 Adrian Georgescu
                        Print all notifications (disabled by default).
34 5 Adrian Georgescu
  -S, --disable-sound   Disables initializing the sound card.
35 17 Adrian Georgescu
  --auto-answer         Interval after which to answer an incoming session
36 1 Adrian Georgescu
                        (disabled by default). If the option is specified but
37 17 Adrian Georgescu
                        the interval is not, it defaults to 0 (accept the
38 1 Adrian Georgescu
                        session as soon as it starts ringing).
39 1 Adrian Georgescu
  --auto-hangup         Interval after which to hang up an established session
40 19 Adrian Georgescu
                        (disabled by default). If the option is specified but
41 19 Adrian Georgescu
                        the interval is not, it defaults to 0 (hangup the
42 19 Adrian Georgescu
                        session as soon as it connects).
43 19 Adrian Georgescu
  -b, --batch           Run the program in batch mode: reading input from the
44 19 Adrian Georgescu
                        console is disabled and the option --auto-answer is
45 19 Adrian Georgescu
                        implied. This is particularly useful when running this
46 19 Adrian Georgescu
                        script in a non-interactive environment.
47 19 Adrian Georgescu
  -D, --daemonize       Enable running this program as a deamon. This option
48 20 Adrian Georgescu
                        implies --disable-sound, --auto-answer and --batch.
49 1 Adrian Georgescu
}}}
50 1 Adrian Georgescu
51 1 Adrian Georgescu
52 1 Adrian Georgescu
=== Example for incoming session ===
53 1 Adrian Georgescu
54 1 Adrian Georgescu
{{{
55 21 Adrian Georgescu
adigeo@ag-blink:~$sip_audio_session 
56 1 Adrian Georgescu
Using account 31208005169@ag-projects.com
57 21 Adrian Georgescu
Logging SIP trace to file "/Users/adigeo/Library/Application Support/Blink/logs/sip_trace.txt"
58 21 Adrian Georgescu
Logging PJSIP trace to file "/Users/adigeo/Library/Application Support/Blink/logs/pjsip_trace.txt"
59 21 Adrian Georgescu
Available audio input devices: None, system_default, Built-in Input, Built-in Microphone
60 21 Adrian Georgescu
Available audio output devices: None, system_default, Built-in Output
61 19 Adrian Georgescu
Using audio input device: Built-in Microphone
62 19 Adrian Georgescu
Using audio output device: Built-in Output
63 19 Adrian Georgescu
Using audio alert device: Built-in Output
64 19 Adrian Georgescu
65 1 Adrian Georgescu
Available control keys:
66 1 Adrian Georgescu
  s: toggle SIP trace on the console
67 1 Adrian Georgescu
  j: toggle PJSIP trace on the console
68 1 Adrian Georgescu
  n: toggle notifications trace on the console
69 1 Adrian Georgescu
  p: toggle printing RTP statistics on the console
70 19 Adrian Georgescu
  h: hang-up the active session
71 19 Adrian Georgescu
  r: toggle audio recording
72 21 Adrian Georgescu
  m: mute the microphone
73 21 Adrian Georgescu
  i: change audio input device
74 21 Adrian Georgescu
  o: change audio output device
75 21 Adrian Georgescu
  a: change audio alert device
76 1 Adrian Georgescu
  <>: adjust echo cancellation
77 1 Adrian Georgescu
  SPACE: hold/unhold
78 1 Adrian Georgescu
  Ctrl-d: quit the program
79 1 Adrian Georgescu
  ?: display this help message
80 1 Adrian Georgescu
81 21 Adrian Georgescu
2009-08-25 16:37:12 Registered contact "sip:hxsyungk@192.168.1.124:59164" for sip:31208005169@ag-projects.com at 81.23.228.150:5060;transport=udp (expires in 600 seconds).
82 1 Adrian Georgescu
Other registered contacts:
83 21 Adrian Georgescu
  sip:31208005169@192.168.1.123:5060 (expires in 274 seconds)
84 21 Adrian Georgescu
  sip:kwbfxyvl@192.168.1.124:59116 (expires in 522 seconds)
85 21 Adrian Georgescu
  sip:ilmegvkp@192.168.1.124:59003 (expires in 339 seconds)
86 21 Adrian Georgescu
  sip:31208005169@192.168.1.1;uniq=5B2860C44383A3D6705629A7E1FB8 (expires in 1162 seconds)
87 19 Adrian Georgescu
Detected NAT type: Port Restricted
88 21 Adrian Georgescu
Incoming audio session from 'sip:adi@umts.ro', do you want to accept? (y/n)
89 21 Adrian Georgescu
Audio session established using "speex" codec at 16000Hz
90 21 Adrian Georgescu
Audio RTP endpoints 192.168.1.124:50378 <-> 85.17.186.6:58868
91 19 Adrian Georgescu
RTP audio stream is encrypted
92 21 Adrian Georgescu
Remote SIP User Agent is "Blink-0.9.0"
93 21 Adrian Georgescu
Remote party has put the audio session on hold
94 21 Adrian Georgescu
Audio session is put on hold
95 8 Adrian Georgescu
Audio session ended by remote party
96 21 Adrian Georgescu
Session duration was 6 seconds
97 21 Adrian Georgescu
2009-08-25 16:37:44 Registration ended.
98 1 Adrian Georgescu
}}}
99 1 Adrian Georgescu
100 1 Adrian Georgescu
=== Example for outgoing session ===
101 11 Adrian Georgescu
102 11 Adrian Georgescu
{{{
103 21 Adrian Georgescu
adigeo@ag-blink:~$sip -a umts ag@ag-projects.com
104 21 Adrian Georgescu
Using account adi@umts.ro
105 21 Adrian Georgescu
Logging SIP trace to file "/Users/adigeo/Library/Application Support/Blink/logs/sip_trace.txt"
106 21 Adrian Georgescu
Logging PJSIP trace to file "/Users/adigeo/Library/Application Support/Blink/logs/pjsip_trace.txt"
107 21 Adrian Georgescu
Available audio input devices: None, system_default, Built-in Input, Built-in Microphone
108 21 Adrian Georgescu
Available audio output devices: None, system_default, Built-in Output
109 1 Adrian Georgescu
Using audio input device: Built-in Microphone
110 11 Adrian Georgescu
Using audio output device: Built-in Output
111 1 Adrian Georgescu
Using audio alert device: Built-in Output
112 11 Adrian Georgescu
113 12 Adrian Georgescu
Available control keys:
114 11 Adrian Georgescu
  s: toggle SIP trace on the console
115 12 Adrian Georgescu
  j: toggle PJSIP trace on the console
116 11 Adrian Georgescu
  n: toggle notifications trace on the console
117 11 Adrian Georgescu
  p: toggle printing RTP statistics on the console
118 12 Adrian Georgescu
  h: hang-up the active session
119 12 Adrian Georgescu
  r: toggle audio recording
120 21 Adrian Georgescu
  m: mute the microphone
121 21 Adrian Georgescu
  i: change audio input device
122 21 Adrian Georgescu
  o: change audio output device
123 21 Adrian Georgescu
  a: change audio alert device
124 15 Adrian Georgescu
  <>: adjust echo cancellation
125 14 Adrian Georgescu
  SPACE: hold/unhold
126 16 Adrian Georgescu
  Ctrl-d: quit the program
127 14 Adrian Georgescu
  ?: display this help message
128 14 Adrian Georgescu
129 21 Adrian Georgescu
Initiating SIP audio session from 'sip:adi@umts.ro' to 'sip:ag@ag-projects.com' via sip:85.17.186.7:5060;transport=udp...
130 21 Adrian Georgescu
Audio session established using "speex" codec at 16000Hz
131 21 Adrian Georgescu
Audio RTP endpoints 192.168.1.124:50054 <-> 85.17.186.6:58866
132 18 Adrian Georgescu
RTP audio stream is encrypted
133 21 Adrian Georgescu
Audio session is put on hold
134 21 Adrian Georgescu
Remote party has put the audio session on hold
135 21 Adrian Georgescu
Detected NAT type: Port Restricted
136 18 Adrian Georgescu
Ending audio session...
137 18 Adrian Georgescu
Audio session ended by local party
138 21 Adrian Georgescu
Session duration was 7 seconds
139 18 Adrian Georgescu
}}}
140 1 Adrian Georgescu
141 23 Adrian Georgescu
=== Session with sip trace enabled ===
142 23 Adrian Georgescu
143 23 Adrian Georgescu
Use -s parameter you can see on the console detailed trace of all DNS queries/responses and SIP traffic exchanged during the session.
144 23 Adrian Georgescu
 
145 23 Adrian Georgescu
{{{
146 23 Adrian Georgescu
adigeo@ag-imac3:~$sip -s -a umts ag@ag-projects.com
147 23 Adrian Georgescu
Using account adi@umts.ro
148 23 Adrian Georgescu
Logging SIP trace to file "/Users/adigeo/Desktop/FileTransfers/sip_trace.txt"
149 23 Adrian Georgescu
Logging PJSIP trace to file "/Users/adigeo/Desktop/FileTransfers/pjsip_trace.txt"
150 23 Adrian Georgescu
Logging notifications trace to file "/Users/adigeo/Desktop/FileTransfers/notifications_trace.txt"
151 23 Adrian Georgescu
Available audio input devices: None, system_default, Built-in Input, Built-in Microphone, Logitech Wireless Headset
152 23 Adrian Georgescu
Available audio output devices: None, system_default, Built-in Output, Logitech Wireless Headset
153 23 Adrian Georgescu
Using audio input device: Logitech Wireless Headset
154 23 Adrian Georgescu
Using audio output device: Logitech Wireless Headset
155 23 Adrian Georgescu
Using audio alert device: Built-in Output
156 23 Adrian Georgescu
157 23 Adrian Georgescu
Available control keys:
158 23 Adrian Georgescu
  s: toggle SIP trace on the console
159 23 Adrian Georgescu
  j: toggle PJSIP trace on the console
160 23 Adrian Georgescu
  n: toggle notifications trace on the console
161 23 Adrian Georgescu
  p: toggle printing RTP statistics on the console
162 23 Adrian Georgescu
  h: hang-up the active session
163 23 Adrian Georgescu
  r: toggle audio recording
164 23 Adrian Georgescu
  m: mute the microphone
165 23 Adrian Georgescu
  i: change audio input device
166 23 Adrian Georgescu
  o: change audio output device
167 23 Adrian Georgescu
  a: change audio alert device
168 23 Adrian Georgescu
  <>: adjust echo cancellation
169 23 Adrian Georgescu
  SPACE: hold/unhold
170 23 Adrian Georgescu
  Ctrl-d: quit the program
171 23 Adrian Georgescu
  ?: display this help message
172 23 Adrian Georgescu
173 23 Adrian Georgescu
2009-09-24 22:31:24.118467: DNS lookup SRV _stun._udp.umts.ro succeeded, ttl=10758: 0 0 3478 stun1.dns-hosting.info., 0 0 3479 stun2.dns-hosting.info.
174 23 Adrian Georgescu
2009-09-24 22:31:24.120425: DNS lookup NAPTR ag-projects.com succeeded, ttl=244: 20 0 "s" "SIP+D2U" "" _sip._udp.ag-projects.com.
175 23 Adrian Georgescu
2009-09-24 22:31:24.126619: DNS lookup A stun1.dns-hosting.info. succeeded, ttl=845: 81.23.228.150
176 23 Adrian Georgescu
2009-09-24 22:31:24.128383: DNS lookup SRV _sip._udp.ag-projects.com. succeeded, ttl=18: 0 0 5060 proxy.sipthor.net.
177 23 Adrian Georgescu
2009-09-24 22:31:24.132502: DNS lookup A stun2.dns-hosting.info. succeeded, ttl=845: 85.17.186.6
178 23 Adrian Georgescu
2009-09-24 22:31:24.136754: DNS lookup A proxy.sipthor.net. succeeded, ttl=5: 85.17.186.7, 81.23.228.129
179 23 Adrian Georgescu
Initiating SIP audio session from '"Adrian G." <sip:adi@umts.ro>' to 'sip:ag@ag-projects.com' via sip:85.17.186.7:5060;transport=udp...
180 23 Adrian Georgescu
2009-09-24 22:31:24.145751: DNS lookup SRV _stun._udp.umts.ro succeeded, ttl=10758: 0 0 3478 stun1.dns-hosting.info., 0 0 3479 stun2.dns-hosting.info.
181 23 Adrian Georgescu
2009-09-24 22:31:24.150530: DNS lookup A stun1.dns-hosting.info. succeeded, ttl=845: 81.23.228.150
182 23 Adrian Georgescu
2009-09-24 22:31:24.155510: DNS lookup A stun2.dns-hosting.info. succeeded, ttl=845: 85.17.186.6
183 23 Adrian Georgescu
2009-09-24 22:31:24.572498: SENDING: Packet 1, +0:00:00
184 23 Adrian Georgescu
192.168.1.6:62054 -(SIP over UDP)-> 85.17.186.7:5060
185 23 Adrian Georgescu
INVITE sip:ag@ag-projects.com SIP/2.0
186 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport;branch=z9hG4bKPjWy0ZCjWb9Ro6Cy15cBX3FE3H.er7.wzB
187 23 Adrian Georgescu
Max-Forwards: 70
188 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
189 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>
190 23 Adrian Georgescu
Contact: <sip:pfxtjskq@192.168.1.6:62054>
191 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
192 23 Adrian Georgescu
CSeq: 16887 INVITE
193 23 Adrian Georgescu
Route: <sip:85.17.186.7;lr>
194 23 Adrian Georgescu
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE
195 23 Adrian Georgescu
Supported: 100rel
196 23 Adrian Georgescu
User-Agent: blink-0.9.0
197 23 Adrian Georgescu
Content-Type: application/sdp
198 23 Adrian Georgescu
Content-Length:  1087
199 23 Adrian Georgescu
200 23 Adrian Georgescu
v=0
201 23 Adrian Georgescu
o=- 3462813084 3462813084 IN IP4 192.168.1.6
202 23 Adrian Georgescu
s=blink-0.9.0
203 23 Adrian Georgescu
c=IN IP4 80.101.96.20
204 23 Adrian Georgescu
t=0 0
205 23 Adrian Georgescu
m=audio 62066 RTP/AVP 104 103 102 3 9 0 8 101
206 23 Adrian Georgescu
a=rtcp:62067 IN IP4 80.101.96.20
207 23 Adrian Georgescu
a=rtpmap:104 speex/32000
208 23 Adrian Georgescu
a=rtpmap:103 speex/16000
209 23 Adrian Georgescu
a=rtpmap:102 speex/8000
210 23 Adrian Georgescu
a=rtpmap:3 GSM/8000
211 23 Adrian Georgescu
a=rtpmap:9 G722/8000
212 23 Adrian Georgescu
a=rtpmap:0 PCMU/8000
213 23 Adrian Georgescu
a=rtpmap:8 PCMA/8000
214 23 Adrian Georgescu
a=rtpmap:101 telephone-event/8000
215 23 Adrian Georgescu
a=fmtp:101 0-15
216 23 Adrian Georgescu
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:eQ0XcBiuyy33zR2HEHLiaS5LCxA1T9rvP9J8GLw6
217 23 Adrian Georgescu
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:zWQU33HIZ0a7otihkQe2Y4jvqpKpXtotNwoW9Xl8
218 23 Adrian Georgescu
a=ice-ufrag:0aa3379a
219 23 Adrian Georgescu
a=ice-pwd:619764ea
220 23 Adrian Georgescu
a=candidate:S 1 UDP 31 80.101.96.20 62066 typ srflx raddr 192.168.1.6 rport 62066
221 23 Adrian Georgescu
a=candidate:H 1 UDP 23 192.168.1.6 62066 typ host
222 23 Adrian Georgescu
a=candidate:H 1 UDP 23 10.211.55.2 62066 typ host
223 23 Adrian Georgescu
a=candidate:H 1 UDP 23 10.37.129.2 62066 typ host
224 23 Adrian Georgescu
a=candidate:S 2 UDP 30 80.101.96.20 62067 typ srflx raddr 192.168.1.6 rport 62067
225 23 Adrian Georgescu
a=candidate:H 2 UDP 22 192.168.1.6 62067 typ host
226 23 Adrian Georgescu
a=candidate:H 2 UDP 22 10.211.55.2 62067 typ host
227 23 Adrian Georgescu
a=candidate:H 2 UDP 22 10.37.129.2 62067 typ host
228 23 Adrian Georgescu
a=sendrecv
229 23 Adrian Georgescu
230 23 Adrian Georgescu
--
231 23 Adrian Georgescu
232 23 Adrian Georgescu
2009-09-24 22:31:24.601167: RECEIVED: Packet 2, +0:00:00.028669
233 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
234 23 Adrian Georgescu
SIP/2.0 100 Giving a try
235 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport=62054;branch=z9hG4bKPjWy0ZCjWb9Ro6Cy15cBX3FE3H.er7.wzB;received=80.101.96.20
236 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
237 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>
238 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
239 23 Adrian Georgescu
CSeq: 16887 INVITE
240 23 Adrian Georgescu
Server: SIP Thor on OpenSIPS XS 1.4.5
241 23 Adrian Georgescu
Content-Length: 0
242 23 Adrian Georgescu
243 23 Adrian Georgescu
244 23 Adrian Georgescu
--
245 23 Adrian Georgescu
246 23 Adrian Georgescu
2009-09-24 22:31:24.621860: RECEIVED: Packet 3, +0:00:00.049362
247 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
248 23 Adrian Georgescu
SIP/2.0 407 Proxy Authentication Required
249 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;received=80.101.96.20;rport=62054;branch=z9hG4bKPjWy0ZCjWb9Ro6Cy15cBX3FE3H.er7.wzB
250 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
251 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=e7d4d6b46afb9bf88242924a8d869ebf.962b
252 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
253 23 Adrian Georgescu
CSeq: 16887 INVITE
254 23 Adrian Georgescu
Proxy-Authenticate: Digest realm="umts.ro", nonce="4abbd73a48ba8c7fc6617208684ad122088d2207"
255 23 Adrian Georgescu
Server: SIP Thor on OpenSIPS XS 1.4.5
256 23 Adrian Georgescu
Content-Length: 0
257 23 Adrian Georgescu
258 23 Adrian Georgescu
259 23 Adrian Georgescu
--
260 23 Adrian Georgescu
261 23 Adrian Georgescu
2009-09-24 22:31:24.622019: SENDING: Packet 4, +0:00:00.049521
262 23 Adrian Georgescu
192.168.1.6:62054 -(SIP over UDP)-> 85.17.186.7:5060
263 23 Adrian Georgescu
ACK sip:ag@ag-projects.com SIP/2.0
264 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport;branch=z9hG4bKPjWy0ZCjWb9Ro6Cy15cBX3FE3H.er7.wzB
265 23 Adrian Georgescu
Max-Forwards: 70
266 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
267 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=e7d4d6b46afb9bf88242924a8d869ebf.962b
268 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
269 23 Adrian Georgescu
CSeq: 16887 ACK
270 23 Adrian Georgescu
Route: <sip:85.17.186.7;lr>
271 23 Adrian Georgescu
User-Agent: blink-0.9.0
272 23 Adrian Georgescu
Content-Length:  0
273 23 Adrian Georgescu
274 23 Adrian Georgescu
275 23 Adrian Georgescu
--
276 23 Adrian Georgescu
277 23 Adrian Georgescu
2009-09-24 22:31:24.622214: SENDING: Packet 5, +0:00:00.049716
278 23 Adrian Georgescu
192.168.1.6:62054 -(SIP over UDP)-> 85.17.186.7:5060
279 23 Adrian Georgescu
INVITE sip:ag@ag-projects.com SIP/2.0
280 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport;branch=z9hG4bKPjwxj-gfiYVdjLvEWkt0l-pLfriN3gjo-T
281 23 Adrian Georgescu
Max-Forwards: 70
282 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
283 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>
284 23 Adrian Georgescu
Contact: <sip:pfxtjskq@192.168.1.6:62054>
285 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
286 23 Adrian Georgescu
CSeq: 16888 INVITE
287 23 Adrian Georgescu
Route: <sip:85.17.186.7;lr>
288 23 Adrian Georgescu
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE
289 23 Adrian Georgescu
Supported: 100rel
290 23 Adrian Georgescu
User-Agent: blink-0.9.0
291 23 Adrian Georgescu
Proxy-Authorization: Digest username="adi", realm="umts.ro", nonce="4abbd73a48ba8c7fc6617208684ad122088d2207", uri="sip:ag@ag-projects.com", response="cb85bbe3dbe0dcd71820c6ceaa027566"
292 23 Adrian Georgescu
Content-Type: application/sdp
293 23 Adrian Georgescu
Content-Length:  1087
294 23 Adrian Georgescu
295 23 Adrian Georgescu
v=0
296 23 Adrian Georgescu
o=- 3462813084 3462813084 IN IP4 192.168.1.6
297 23 Adrian Georgescu
s=blink-0.9.0
298 23 Adrian Georgescu
c=IN IP4 80.101.96.20
299 23 Adrian Georgescu
t=0 0
300 23 Adrian Georgescu
m=audio 62066 RTP/AVP 104 103 102 3 9 0 8 101
301 23 Adrian Georgescu
a=rtcp:62067 IN IP4 80.101.96.20
302 23 Adrian Georgescu
a=rtpmap:104 speex/32000
303 23 Adrian Georgescu
a=rtpmap:103 speex/16000
304 23 Adrian Georgescu
a=rtpmap:102 speex/8000
305 23 Adrian Georgescu
a=rtpmap:3 GSM/8000
306 23 Adrian Georgescu
a=rtpmap:9 G722/8000
307 23 Adrian Georgescu
a=rtpmap:0 PCMU/8000
308 23 Adrian Georgescu
a=rtpmap:8 PCMA/8000
309 23 Adrian Georgescu
a=rtpmap:101 telephone-event/8000
310 23 Adrian Georgescu
a=fmtp:101 0-15
311 23 Adrian Georgescu
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:eQ0XcBiuyy33zR2HEHLiaS5LCxA1T9rvP9J8GLw6
312 23 Adrian Georgescu
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:zWQU33HIZ0a7otihkQe2Y4jvqpKpXtotNwoW9Xl8
313 23 Adrian Georgescu
a=ice-ufrag:0aa3379a
314 23 Adrian Georgescu
a=ice-pwd:619764ea
315 23 Adrian Georgescu
a=candidate:S 1 UDP 31 80.101.96.20 62066 typ srflx raddr 192.168.1.6 rport 62066
316 23 Adrian Georgescu
a=candidate:H 1 UDP 23 192.168.1.6 62066 typ host
317 23 Adrian Georgescu
a=candidate:H 1 UDP 23 10.211.55.2 62066 typ host
318 23 Adrian Georgescu
a=candidate:H 1 UDP 23 10.37.129.2 62066 typ host
319 23 Adrian Georgescu
a=candidate:S 2 UDP 30 80.101.96.20 62067 typ srflx raddr 192.168.1.6 rport 62067
320 23 Adrian Georgescu
a=candidate:H 2 UDP 22 192.168.1.6 62067 typ host
321 23 Adrian Georgescu
a=candidate:H 2 UDP 22 10.211.55.2 62067 typ host
322 23 Adrian Georgescu
a=candidate:H 2 UDP 22 10.37.129.2 62067 typ host
323 23 Adrian Georgescu
a=sendrecv
324 23 Adrian Georgescu
325 23 Adrian Georgescu
--
326 23 Adrian Georgescu
327 23 Adrian Georgescu
2009-09-24 22:31:24.656088: RECEIVED: Packet 6, +0:00:00.083590
328 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
329 23 Adrian Georgescu
SIP/2.0 100 Giving a try
330 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport=62054;branch=z9hG4bKPjwxj-gfiYVdjLvEWkt0l-pLfriN3gjo-T;received=80.101.96.20
331 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
332 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>
333 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
334 23 Adrian Georgescu
CSeq: 16888 INVITE
335 23 Adrian Georgescu
Server: SIP Thor on OpenSIPS XS 1.4.5
336 23 Adrian Georgescu
Content-Length: 0
337 23 Adrian Georgescu
338 23 Adrian Georgescu
339 23 Adrian Georgescu
--
340 23 Adrian Georgescu
341 23 Adrian Georgescu
2009-09-24 22:31:24.721041: RECEIVED: Packet 7, +0:00:00.148543
342 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
343 23 Adrian Georgescu
SIP/2.0 180 Ringing
344 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport=62054;received=80.101.96.20;branch=z9hG4bKPjwxj-gfiYVdjLvEWkt0l-pLfriN3gjo-T
345 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.9e165924>
346 23 Adrian Georgescu
Record-Route: <sip:81.23.228.150;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.e5ffeb2>
347 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.8e165924>
348 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
349 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
350 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=FkXkUNDcrT80u8GHaUIUuF4OrIJI6O8f
351 23 Adrian Georgescu
CSeq: 16888 INVITE
352 23 Adrian Georgescu
Server: blink-0.9.0
353 23 Adrian Georgescu
Contact: <sip:iwralmqz@80.101.96.20:61962>
354 23 Adrian Georgescu
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE
355 23 Adrian Georgescu
Content-Length:  0
356 23 Adrian Georgescu
357 23 Adrian Georgescu
358 23 Adrian Georgescu
--
359 23 Adrian Georgescu
360 23 Adrian Georgescu
2009-09-24 22:31:24.878489: RECEIVED: Packet 8, +0:00:00.305991
361 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
362 23 Adrian Georgescu
SIP/2.0 180 Ringing
363 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;received=80.101.96.20;rport=62054;branch=z9hG4bKPjwxj-gfiYVdjLvEWkt0l-pLfriN3gjo-T
364 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.9e165924>
365 23 Adrian Georgescu
Record-Route: <sip:81.23.228.150;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.e5ffeb2>
366 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.8e165924>
367 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
368 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=96A4E0ACA527F9AF
369 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
370 23 Adrian Georgescu
CSeq: 16888 INVITE
371 23 Adrian Georgescu
Contact: <sip:31208005169@80.101.96.20:5060;uniq=5B2860C44383A3D6705629A7E1FB8>
372 23 Adrian Georgescu
User-Agent: AVM FRITZ!Box Fon WLAN 7170 29.04.56 (May  1 2008)
373 23 Adrian Georgescu
Content-Length: 0
374 23 Adrian Georgescu
375 23 Adrian Georgescu
376 23 Adrian Georgescu
--
377 23 Adrian Georgescu
378 23 Adrian Georgescu
2009-09-24 22:31:25.154425: RECEIVED: Packet 9, +0:00:00.581927
379 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
380 23 Adrian Georgescu
SIP/2.0 180 Ringing
381 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;received=80.101.96.20;rport=62054;branch=z9hG4bKPjwxj-gfiYVdjLvEWkt0l-pLfriN3gjo-T
382 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
383 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=000c854663c02cf2799a9168-4ae390b1
384 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
385 23 Adrian Georgescu
CSeq: 16888 INVITE
386 23 Adrian Georgescu
Server: CSCO/7
387 23 Adrian Georgescu
Contact: <sip:31208005169@80.101.96.20:61000>
388 23 Adrian Georgescu
Record-Route: <sip:81.23.228.129;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.985cae24>,<sip:85.17.186.7;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.9e165924>,<sip:81.23.228.150;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.e5ffeb2>,<sip:85.17.186.7;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.8e165924>
389 23 Adrian Georgescu
Content-Length: 0
390 23 Adrian Georgescu
391 23 Adrian Georgescu
392 23 Adrian Georgescu
--
393 23 Adrian Georgescu
394 23 Adrian Georgescu
2009-09-24 22:31:25.368613: RECEIVED: Packet 10, +0:00:00.796115
395 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
396 23 Adrian Georgescu
SIP/2.0 200 OK
397 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;received=80.101.96.20;rport=62054;branch=z9hG4bKPjwxj-gfiYVdjLvEWkt0l-pLfriN3gjo-T
398 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
399 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=000c854663c02cf2799a9168-4ae390b1
400 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
401 23 Adrian Georgescu
CSeq: 16888 INVITE
402 23 Adrian Georgescu
Server: CSCO/7
403 23 Adrian Georgescu
Contact: <sip:31208005169@80.101.96.20:61000>
404 23 Adrian Georgescu
Record-Route: <sip:81.23.228.129;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.985cae24>,<sip:85.17.186.7;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.9e165924>,<sip:81.23.228.150;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.e5ffeb2>,<sip:85.17.186.7;lr=on;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.8e165924>
405 23 Adrian Georgescu
Content-Type: application/sdp
406 23 Adrian Georgescu
Content-Length: 197
407 23 Adrian Georgescu
408 23 Adrian Georgescu
v=0
409 23 Adrian Georgescu
o=Cisco-SIPUA 8420 8964 IN IP4 192.168.1.123
410 23 Adrian Georgescu
s=SIP Call
411 23 Adrian Georgescu
c=IN IP4 81.23.228.150
412 23 Adrian Georgescu
t=0 0
413 23 Adrian Georgescu
m=audio 51974 RTP/AVP 0 101
414 23 Adrian Georgescu
a=rtpmap:0 PCMU/8000
415 23 Adrian Georgescu
a=rtpmap:101 telephone-event/8000
416 23 Adrian Georgescu
a=fmtp:101 0-15
417 23 Adrian Georgescu
418 23 Adrian Georgescu
--
419 23 Adrian Georgescu
420 23 Adrian Georgescu
2009-09-24 22:31:25.369124: SENDING: Packet 11, +0:00:00.796626
421 23 Adrian Georgescu
192.168.1.6:62054 -(SIP over UDP)-> 85.17.186.7:5060
422 23 Adrian Georgescu
ACK sip:31208005169@80.101.96.20:61000 SIP/2.0
423 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.6:62054;rport;branch=z9hG4bKPjkq3Y5tZfK3d.zASBBAHQHZMavNNRQw0W
424 23 Adrian Georgescu
Max-Forwards: 70
425 23 Adrian Georgescu
From: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
426 23 Adrian Georgescu
To: <sip:ag@ag-projects.com>;tag=000c854663c02cf2799a9168-4ae390b1
427 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
428 23 Adrian Georgescu
CSeq: 16888 ACK
429 23 Adrian Georgescu
Route: <sip:85.17.186.7;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.8e165924>
430 23 Adrian Georgescu
Route: <sip:81.23.228.150;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.e5ffeb2>
431 23 Adrian Georgescu
Route: <sip:85.17.186.7;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.9e165924>
432 23 Adrian Georgescu
Route: <sip:81.23.228.129;lr;ftag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF;did=2f3.985cae24>
433 23 Adrian Georgescu
User-Agent: blink-0.9.0
434 23 Adrian Georgescu
Content-Length:  0
435 23 Adrian Georgescu
436 23 Adrian Georgescu
437 23 Adrian Georgescu
--
438 23 Adrian Georgescu
439 23 Adrian Georgescu
Audio session established using "PCMU" codec at 8000Hz
440 23 Adrian Georgescu
Audio RTP endpoints 80.101.96.20:62066 <-> 81.23.228.150:51974
441 23 Adrian Georgescu
Detected NAT type: Port Restricted
442 23 Adrian Georgescu
2009-09-24 22:31:40.495793: RECEIVED: Packet 12, +0:00:15.923295
443 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
444 23 Adrian Georgescu
NOTIFY sip:80.101.96.20:62054 SIP/2.0
445 23 Adrian Georgescu
Via: SIP/2.0/UDP 85.17.186.7:5060;branch=0
446 23 Adrian Georgescu
From: sip:keepalive@85.17.186.7;tag=7c29b7d5
447 23 Adrian Georgescu
To: sip:80.101.96.20:62054
448 23 Adrian Georgescu
Call-ID: 296fc4b6-56ba6860-24109f@85.17.186.7
449 23 Adrian Georgescu
CSeq: 1 NOTIFY
450 23 Adrian Georgescu
Event: keep-alive
451 23 Adrian Georgescu
Content-Length: 0
452 23 Adrian Georgescu
453 23 Adrian Georgescu
454 23 Adrian Georgescu
--
455 23 Adrian Georgescu
456 23 Adrian Georgescu
2009-09-24 22:31:40.495929: SENDING: Packet 13, +0:00:15.923431
457 23 Adrian Georgescu
192.168.1.6:62054 -(SIP over UDP)-> 85.17.186.7:5060
458 23 Adrian Georgescu
SIP/2.0 405 Method Not Allowed
459 23 Adrian Georgescu
Via: SIP/2.0/UDP 85.17.186.7:5060;received=85.17.186.7;branch=0
460 23 Adrian Georgescu
Call-ID: 296fc4b6-56ba6860-24109f@85.17.186.7
461 23 Adrian Georgescu
From: <sip:keepalive@85.17.186.7>;tag=7c29b7d5
462 23 Adrian Georgescu
To: <sip:80.101.96.20>
463 23 Adrian Georgescu
CSeq: 1 NOTIFY
464 23 Adrian Georgescu
Server: blink-0.9.0
465 23 Adrian Georgescu
Content-Length:  0
466 23 Adrian Georgescu
467 23 Adrian Georgescu
468 23 Adrian Georgescu
--
469 23 Adrian Georgescu
470 23 Adrian Georgescu
2009-09-24 22:31:43.425393: RECEIVED: Packet 14, +0:00:18.852895
471 23 Adrian Georgescu
85.17.186.7:5060 -(SIP over UDP)-> 192.168.1.6:62054
472 23 Adrian Georgescu
BYE sip:pfxtjskq@80.101.96.20:62054 SIP/2.0
473 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr=on;ftag=000c854663c02cf2799a9168-4ae390b1>
474 23 Adrian Georgescu
Record-Route: <sip:81.23.228.150;lr=on;ftag=000c854663c02cf2799a9168-4ae390b1>
475 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr=on;ftag=000c854663c02cf2799a9168-4ae390b1>
476 23 Adrian Georgescu
Max-Forwards:  7
477 23 Adrian Georgescu
Record-Route: <sip:81.23.228.129;lr=on;ftag=000c854663c02cf2799a9168-4ae390b1>
478 23 Adrian Georgescu
Via: SIP/2.0/UDP 85.17.186.7;branch=z9hG4bK9c22.feada044.0
479 23 Adrian Georgescu
Via: SIP/2.0/UDP 81.23.228.150;branch=z9hG4bK9c22.3cf12dd3.0
480 23 Adrian Georgescu
Via: SIP/2.0/UDP 85.17.186.7;branch=z9hG4bK9c22.eeada044.0
481 23 Adrian Georgescu
Via: SIP/2.0/UDP 81.23.228.129;branch=z9hG4bK9c22.877deec6.0
482 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.123:5060;rport=61000;received=80.101.96.20;branch=z9hG4bK63eb02c1
483 23 Adrian Georgescu
From: <sip:ag@ag-projects.com>;tag=000c854663c02cf2799a9168-4ae390b1
484 23 Adrian Georgescu
To: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
485 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
486 23 Adrian Georgescu
CSeq: 101 BYE
487 23 Adrian Georgescu
User-Agent: CSCO/7
488 23 Adrian Georgescu
Content-Length: 0
489 23 Adrian Georgescu
RTP-RxStat: Dur=18,Pkt=29,Oct=4640,LatePkt=0,LostPkt=0,AvgJit=0
490 23 Adrian Georgescu
RTP-TxStat: Dur=18,Pkt=889,Oct=142240
491 23 Adrian Georgescu
492 23 Adrian Georgescu
493 23 Adrian Georgescu
--
494 23 Adrian Georgescu
495 23 Adrian Georgescu
2009-09-24 22:31:43.425554: SENDING: Packet 15, +0:00:18.853056
496 23 Adrian Georgescu
192.168.1.6:62054 -(SIP over UDP)-> 85.17.186.7:5060
497 23 Adrian Georgescu
SIP/2.0 200 OK
498 23 Adrian Georgescu
Via: SIP/2.0/UDP 85.17.186.7;received=85.17.186.7;branch=z9hG4bK9c22.feada044.0
499 23 Adrian Georgescu
Via: SIP/2.0/UDP 81.23.228.150;branch=z9hG4bK9c22.3cf12dd3.0
500 23 Adrian Georgescu
Via: SIP/2.0/UDP 85.17.186.7;branch=z9hG4bK9c22.eeada044.0
501 23 Adrian Georgescu
Via: SIP/2.0/UDP 81.23.228.129;branch=z9hG4bK9c22.877deec6.0
502 23 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.123:5060;rport=61000;received=80.101.96.20;branch=z9hG4bK63eb02c1
503 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr;ftag=000c854663c02cf2799a9168-4ae390b1>
504 23 Adrian Georgescu
Record-Route: <sip:81.23.228.150;lr;ftag=000c854663c02cf2799a9168-4ae390b1>
505 23 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr;ftag=000c854663c02cf2799a9168-4ae390b1>
506 23 Adrian Georgescu
Record-Route: <sip:81.23.228.129;lr;ftag=000c854663c02cf2799a9168-4ae390b1>
507 23 Adrian Georgescu
Call-ID: TvSQ8UaRQkYIz53p8itOYiV.MLKdlzC3
508 23 Adrian Georgescu
From: <sip:ag@ag-projects.com>;tag=000c854663c02cf2799a9168-4ae390b1
509 23 Adrian Georgescu
To: "Adrian G." <sip:adi@umts.ro>;tag=tv6vh5PXicua6Zuu0ZCv9smnXR.J-CxF
510 23 Adrian Georgescu
CSeq: 101 BYE
511 23 Adrian Georgescu
Server: blink-0.9.0
512 23 Adrian Georgescu
Content-Length:  0
513 23 Adrian Georgescu
514 23 Adrian Georgescu
515 23 Adrian Georgescu
--
516 23 Adrian Georgescu
517 23 Adrian Georgescu
Audio session ended by remote party
518 23 Adrian Georgescu
Session duration was 18 seconds
519 23 Adrian Georgescu
}}}
520 23 Adrian Georgescu
521 1 Adrian Georgescu
=== Alarm system ===
522 1 Adrian Georgescu
523 22 Adrian Georgescu
sip_audio_session script can be used for end-to-end testing of a SIP service including the RTP media path. The follow failures can be detected:
524 1 Adrian Georgescu
525 22 Adrian Georgescu
 * Timeout
526 22 Adrian Georgescu
 * Negative response code
527 22 Adrian Georgescu
 * Lack of RTP media after the SIP session has been established
528 22 Adrian Georgescu
 * Missing ACK
529 22 Adrian Georgescu
530 22 Adrian Georgescu
531 22 Adrian Georgescu
To setup the alarm system start periodically a caller script from a monitoring software using the following arguments:
532 22 Adrian Georgescu
533 1 Adrian Georgescu
  {{{
534 1 Adrian Georgescu
sip_audio_session --auto-hangup user@domain
535 1 Adrian Georgescu
  }}}
536 1 Adrian Georgescu
537 22 Adrian Georgescu
Where the user@domain has been configured as the SIP account of the listener, can be an answering machine on the PSTN network. The caller script hangs up after each call. The shell return code can be used to determine if the session setup has failed.
538 1 Adrian Georgescu
539 1 Adrian Georgescu
To receive calls and answer them automatically you can also use sip_audio_session script as follows:
540 1 Adrian Georgescu
541 1 Adrian Georgescu
  {{{
542 1 Adrian Georgescu
sip_audio_session --daemonize
543 1 Adrian Georgescu
  }}}
544 1 Adrian Georgescu
545 1 Adrian Georgescu
You must run the script as user root. The --daemonize option puts the client in the background and the logging goes to /var/log/syslog. The program saves its pid file to /var/run/sip_audio_session.pid.