SipDevicesAlgo

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 Adrian Georgescu
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 1 Adrian Georgescu
7 1 Adrian Georgescu
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 1 Adrian Georgescu
9 1 Adrian Georgescu
The log is below:
10 1 Adrian Georgescu
11 1 Adrian Georgescu
2013-01-01T00:41:05+01:00 xs4all phone: sip recv 85.17.186.7:5060, size = 2095
12 1 Adrian Georgescu
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 1 Adrian Georgescu
14 1 Adrian Georgescu
Expanded messages below for clarity with the relevant headers, notice the Record-Route headers:
15 1 Adrian Georgescu
16 6 Adrian Georgescu
<pre>
17 1 Adrian Georgescu
INVITE sip:1972@192.168.1.9:5060 SIP/2.0
18 1 Adrian Georgescu
Record-Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>
19 1 Adrian Georgescu
Record-Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>
20 1 Adrian Georgescu
Record-Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
21 1 Adrian Georgescu
Record-Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
22 1 Adrian Georgescu
From: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks
23 1 Adrian Georgescu
To: <sip:1972@ag-projects.com>
24 1 Adrian Georgescu
Contact: <sip:52138976@82.161.39.123:57428;transport=tcp>
25 1 Adrian Georgescu
Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7
26 6 Adrian Georgescu
</pre>
27 1 Adrian Georgescu
28 1 Adrian Georgescu
29 1 Adrian Georgescu
2013-01-01T00:41:06+01:00 xs4all phone: sip send 85.17.186.7:5060, size = 1193
30 1 Adrian Georgescu
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 1 Adrian Georgescu
2013-01-01T00:41:06+01:00 xs4all phone: sip send 85.17.186.7:5060, size = 1421
32 1 Adrian Georgescu
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 1 Adrian Georgescu
2013-01-01T00:41:07+01:00 xs4all phone: sip recv 85.17.186.7:5060, size = 706
34 1 Adrian Georgescu
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 1 Adrian Georgescu
2013-01-01T00:42:05+01:00 xs4all phone: sip send 81.23.228.129:5060, size = 429
36 1 Adrian Georgescu
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 1 Adrian Georgescu
2013-01-01T00:42:05+01:00 xs4all phone: sip recv 81.23.228.129:5060, size = 495
38 1 Adrian Georgescu
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 1 Adrian Georgescu
40 5 Adrian Georgescu
h3. Broken BYE
41 1 Adrian Georgescu
42 1 Adrian Georgescu
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 1 Adrian Georgescu
44 6 Adrian Georgescu
<pre>
45 1 Adrian Georgescu
BYE sip:52138976@82.161.39.123:57428;transport=tcp SIP/2.0
46 1 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.9:5060;rport;branch=z9hG4bK688014405
47 1 Adrian Georgescu
From: <sip:1972@ag-projects.com>;tag=530668702
48 1 Adrian Georgescu
To: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks
49 1 Adrian Georgescu
Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7
50 1 Adrian Georgescu
CSeq: 27636006 BYE
51 1 Adrian Georgescu
Allow: INVITE, ACK, CANCEL, BYE, INFO
52 1 Adrian Georgescu
Max-Forwards: 69
53 1 Adrian Georgescu
User-Agent: Algo 8028 1.7.8
54 1 Adrian Georgescu
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 1 Adrian Georgescu
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 1 Adrian Georgescu
62 6 Adrian Georgescu
<pre>
63 1 Adrian Georgescu
BYE sip:52138976@82.161.39.123:57428;transport=tcp SIP/2.0
64 1 Adrian Georgescu
Via: SIP/2.0/UDP 192.168.1.9:5060;rport;branch=z9hG4bK688014405
65 1 Adrian Georgescu
From: <sip:1972@ag-projects.com>;tag=530668702
66 1 Adrian Georgescu
Route: <sip:81.23.228.129;transport=tcp;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
67 1 Adrian Georgescu
Route: <sip:81.23.228.129;r2=on;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.b5809b45>
68 1 Adrian Georgescu
Route: <sip:85.17.186.7;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.908d838>
69 1 Adrian Georgescu
Route: <sip:81.23.228.129;lr;ftag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks;did=1a8.c5809b45>
70 1 Adrian Georgescu
To: "Adrian Georgescu" <sip:ag@ag-projects.com>;tag=x0VdFW8sEn3bymiNLIQFWpc7Bqe0Hmks
71 1 Adrian Georgescu
Call-ID: YsTJTTdp5Kxb6eYrxDqViOkl2GaJUCd7
72 1 Adrian Georgescu
CSeq: 27636006 BYE
73 1 Adrian Georgescu
Allow: INVITE, ACK, CANCEL, BYE, INFO
74 1 Adrian Georgescu
Max-Forwards: 69
75 1 Adrian Georgescu
User-Agent: Algo 8028 1.7.8
76 1 Adrian Georgescu
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.