Project

General

Profile

SipDevicesAlgo » History » Version 8

Adrian Georgescu, 02/12/2013 09:23 PM

1 5 Adrian Georgescu
h1. ALGO doorbel
2 1 Adrian Georgescu
 
3 5 Adrian Georgescu
h2. Cannot terminate calls
4
5 1 Adrian Georgescu
The unit is not able to correctly terminate the calls when the next hop is a state-full SIP Proxy. A state-full SIP Proxy uses record route to maintain the same signaling path for all subsequent messages part of the same dialog. The unit does not handle this situation, which is standard setup of any VoIP provider that uses a SIP Proxy instead of using a VoIP switch like Asterisk or FreeSwitch, which behave like an end-point. 
6
7
Secondly, the unit does not correctly send the BYE to the right next hop when there is more than one SIP server for the same domain (regardless of whether it is a SIP Proxy or not).
8
9
The log is below:
10
11
2013-01-01T00:41:05+01:00 xs4all phone: sip recv 85.17.186.7:5060, size = 2095
12
2013-01-01T00:41:05+01:00 xs4all phone: [truncated] INVITE sip:1972@192.168.1.9:5060 SIP/2.0#015#012Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.a08d838>#015#012Record-Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>#015#012Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>#015#012Record-Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>#015#012Record-Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.28ff94f5.0#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.338f5a74.0#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.18ff94f5.0#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.238f5a74.0;i=7db2#015#012Via: SIP/2.0/tcp 192.168.1.57:57428;received=82.161.39.123;rport=57428;branch=z9hG4bKPjkhvJ8eoLpQhZKMzod4XgVhJZrJxAEtUe#015#012Max-Forwards: 66#015#012From: "Adrian Georgescu" <sip:ag@ag-projects.c
13
14
Expanded messages below for clarity with the relevant headers, notice the Record-Route headers:
15
16 6 Adrian Georgescu
<pre>
17 1 Adrian Georgescu
INVITE sip:1972@192.168.1.9:5060 SIP/2.0
18
Record-Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>
19
Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>
20
Record-Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
21
Record-Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
22
From: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks
23
To: <sip:1972@ag-projects.com>
24
Contact: <sip:52138976@82.161.39.123:57428;transport=tcp>
25
Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7
26 6 Adrian Georgescu
</pre>
27 1 Adrian Georgescu
28
29
2013-01-01T00:41:06+01:00 xs4all phone: sip send 85.17.186.7:5060, size = 1193
30
2013-01-01T00:41:06+01:00 xs4all phone: [truncated] SIP/2.0 180 Ringing#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.28ff94f5.0#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.338f5a74.0#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.18ff94f5.0#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.238f5a74.0;i=7db2#015#012Via: SIP/2.0/tcp 192.168.1.57:57428;received=82.161.39.123;rport=57428;branch=z9hG4bKPjkhvJ8eoLpQhZKMzod4XgVhJZrJxAEtUe#015#012Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.a08d838>#015#012Record-Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>#015#012Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>#015#012Record-Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>#015#012Record-Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>#015#012From: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmk
31
2013-01-01T00:41:06+01:00 xs4all phone: sip send 85.17.186.7:5060, size = 1421
32
2013-01-01T00:41:06+01:00 xs4all phone: [truncated] SIP/2.0 200 OK#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.28ff94f5.0#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.338f5a74.0#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.18ff94f5.0#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.238f5a74.0;i=7db2#015#012Via: SIP/2.0/tcp 192.168.1.57:57428;received=82.161.39.123;rport=57428;branch=z9hG4bKPjkhvJ8eoLpQhZKMzod4XgVhJZrJxAEtUe#015#012Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.a08d838>#015#012Record-Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>#015#012Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>#015#012Record-Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>#015#012Record-Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>#015#012From: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks#015#012To
33
2013-01-01T00:41:07+01:00 xs4all phone: sip recv 85.17.186.7:5060, size = 706
34
2013-01-01T00:41:07+01:00 xs4all phone: ACK sip:1972@82.161.39.123:61031 SIP/2.0#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.18ff94f5.2#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.238f5a74.2#015#012Via: SIP/2.0/UDP 85.17.186.7:5060;branch=z9hG4bK0159.18ff94f5.2#015#012Via: SIP/2.0/UDP 81.23.228.129:5060;branch=z9hG4bK0159.238f5a74.2;i=7db2#015#012Via: SIP/2.0/tcp 192.168.1.57:57428;received=82.161.39.123;rport=57428;branch=z9hG4bKPj6Uyn5PV6pApqRSblxHYaZ-7P.0Aid2IR#015#012Max-Forwards: 66#015#012From: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks#015#012To: <sip:1972@ag-projects.com>;tag=530668702#015#012Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7#015#012CSeq: 31053 ACK#015#012User-Agent: Blink Pro 2.0.3 (MacOSX)#015#012Content-Length:  0#015#012#015
35
2013-01-01T00:42:05+01:00 xs4all phone: sip send 81.23.228.129:5060, size = 429
36
2013-01-01T00:42:05+01:00 xs4all phone: BYE sip:52138976@82.161.39.123:57428;transport=tcp SIP/2.0#015#012Via: SIP/2.0/UDP 192.168.1.9:5060;rport;branch=z9hG4bK688014405#015#012From: <sip:1972@ag-projects.com>;tag=530668702#015#012To: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks#015#012Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7#015#012CSeq: 27636006 BYE#015#012Allow: INVITE, ACK, CANCEL, BYE, INFO#015#012Max-Forwards: 70#015#012User-Agent: Algo 8028 1.7.8#015#012Content-Length: 0#015#012#015
37
2013-01-01T00:42:05+01:00 xs4all phone: sip recv 81.23.228.129:5060, size = 495
38
2013-01-01T00:42:05+01:00 xs4all phone: SIP/2.0 200 OK#015#012Via: SIP/2.0/UDP 192.168.1.9:5060;rport=61031;received=82.161.39.123;branch=z9hG4bK688014405#015#012Record-Route: <sip:81.23.228.129;transport=tcp;lr;r2=on;ftag=530668702>#015#012Record-Route: <sip:81.23.228.129;lr;r2=on;ftag=530668702>#015#012Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7#015#012From: <sip:1972@ag-projects.com>;tag=530668702#015#012To: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks#015#012CSeq: 27636006 BYE#015#012Server: Blink Pro 2.0.3 (MacOSX)#015#012Content-Length:  0#015#012#015
39
40 5 Adrian Georgescu
h3. Broken BYE
41 1 Adrian Georgescu
42
Algo sends this BYE message, which never arrives at the original destination as the intermediate SIP proxy has no information where to route it (it has no Route headers):
43
44 6 Adrian Georgescu
<pre>
45 1 Adrian Georgescu
BYE sip:52138976@82.161.39.123:57428;transport=tcp SIP/2.0
46
Via: SIP/2.0/UDP 192.168.1.9:5060;rport;branch=z9hG4bK688014405
47
From: <sip:1972@ag-projects.com>;tag=530668702
48
To: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks
49
Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7
50
CSeq: 27636006 BYE
51
Allow: INVITE, ACK, CANCEL, BYE, INFO
52
Max-Forwards: 69
53
User-Agent: Algo 8028 1.7.8
54
Content-Length: 0
55 6 Adrian Georgescu
</pre>
56 1 Adrian Georgescu
57 3 Adrian Georgescu
58 5 Adrian Georgescu
h3. Correct BYE
59 1 Adrian Georgescu
60
The correct BYE message must be (observe the missing Route headers that the unit must add, they must be copied in reverse order from the original INVITE Record-Route headers same when Algo was building the 200 OK message, which incidentally is done correctly):
61
62 6 Adrian Georgescu
<pre>
63 1 Adrian Georgescu
BYE sip:52138976@82.161.39.123:57428;transport=tcp SIP/2.0
64
Via: SIP/2.0/UDP 192.168.1.9:5060;rport;branch=z9hG4bK688014405
65
From: <sip:1972@ag-projects.com>;tag=530668702
66
Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
67
Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
68
Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>
69
Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>
70
To: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks
71
Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7
72
CSeq: 27636006 BYE
73
Allow: INVITE, ACK, CANCEL, BYE, INFO
74
Max-Forwards: 69
75
User-Agent: Algo 8028 1.7.8
76
Content-Length: 0
77 6 Adrian Georgescu
</pre>
78 1 Adrian Georgescu
79 5 Adrian Georgescu
h2. Incorrect Next Hop
80 1 Adrian Georgescu
81 8 Adrian Georgescu
ALGO performs a DNS lookup before sending the BYE. This is plain wrong. The BYE message must be sent to the IP:port where the unit has received the INVITE from and not by performing a new DNS lookup. By doing a DNS lookup one may find another SIP Proxy from the same domain that has no knowledge about the SIP dialog in question, there should never be a DNS lookup performed in the middle of an established SIP dialog, the standard is explicit about this behavior.