<div dir="ltr"><div dir="ltr">On Mon, Mar 23, 2020 at 2:45 PM John Hughes <<a href="mailto:john@calva.com">john@calva.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>So I've got a bit further with my project to get BLF working
between asterisk and linphone.</p>
<p>Initially asterisk was rejecting linphone's SUBSCRIBE messages
because they didn't have an Accept: header. I've fixed that and
now the initial SUBSCRIBE messages work and I see all my online
contacts in green.</p>
<p>But after a few minutes linphone attempts to renew the
subscriptions and asterisk is not happy at all:</p>
<p><br>
</p>
<p><--- SIP read from UDP:<a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> ---><br>
SUBSCRIBE <a>sip:jacques@10.27.128.1:5060</a> SIP/2.0<br>
Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.NYP-ux0Zx;rport<br>
From: <a><sip:john@masked.masked.com></a>;tag=iGH81k5xf<br>
To: <a><sip:jacques@masked.masked.com></a>;tag=as3c7de68c<br>
CSeq: 22 SUBSCRIBE<br>
Call-ID: SQOclJgm4O<br>
Max-Forwards: 70<br>
Supported: replaces, outbound<br>
Event: presence<br>
Expires: 600<br>
Accept: application/pidf+xml<br>
Contact:
<a><sip:john@10.27.128.3;transport=udp></a>;+sip.instance="<urn:uuid:abcdf51a-82e0-49b9-a8ab-2461011f25ec>"<br>
User-Agent: Linphone/3.12.0 (belle-sip/1.6.3)<br>
Authorization: Digest realm="asterisk", nonce="188b095b",
algorithm=MD5, username="john",
uri=<a>"sip:jacques@10.27.128.1:5060"</a>,
response="bdbc7cbac4453fd643050bf28996a68e"<br>
<br>
<-------------><br>
--- (14 headers 0 lines) ---<br>
Found peer 'john' for 'john' from <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a><br>
<br>
<--- Transmitting (no NAT) to <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> ---><br>
SIP/2.0 401 Unauthorized<br>
Via: SIP/2.0/UDP
10.27.128.3:5060;branch=z9hG4bK.NYP-ux0Zx;received=10.27.128.3;rport=5060<br>
From: <a><sip:john@masked.masked.com></a>;tag=iGH81k5xf<br>
To: <a><sip:jacques@masked.masked.com></a>;tag=as3c7de68c<br>
Call-ID: SQOclJgm4O<br>
CSeq: 22 SUBSCRIBE<br>
Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY, INFO, PUBLISH, MESSAGE<br>
Supported: replaces, timer<br>
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="3144c0a9", stale=true<br>
Content-Length: 0<br>
<br>
<br>
<------------><br>
Scheduling destruction of SIP dialog 'SQOclJgm4O' in 32000 ms
(Method: SUBSCRIBE)<br>
<br>
<--- SIP read from UDP:<a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> ---><br>
SUBSCRIBE <a>sip:jacques@masked.masked.com</a> SIP/2.0<br>
Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.oxfLJBaRw;rport<br>
From: <a><sip:john@masked.masked.com></a>;tag=c3Wvuu2XH<br>
To: <a>sip:jacques@masked.masked.com</a><br>
CSeq: 20 SUBSCRIBE<br>
Call-ID: SQOclJgm4O<br>
Max-Forwards: 70<br>
Supported: replaces, outbound<br>
Event: presence<br>
Expires: 600<br>
Accept: application/pidf+xml<br>
Contact:
<a><sip:john@10.27.128.3;transport=udp></a>;+sip.instance="<urn:uuid:abcdf51a-82e0-49b9-a8ab-2461011f25ec>"<br>
User-Agent: Linphone/3.12.0 (belle-sip/1.6.3)<br>
<br>
<-------------><br>
--- (13 headers 0 lines) ---<br>
Sending to <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> (no NAT)<br>
Creating new subscription<br>
Sending to <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> (no NAT)<br>
sip_route_dump: route/path hop:
<a><sip:john@10.27.128.3;transport=udp></a><br>
Found peer 'john' for 'john' from <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a><br>
<br>
<--- Transmitting (no NAT) to <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> ---><br>
SIP/2.0 401 Unauthorized<br>
Via: SIP/2.0/UDP
10.27.128.3:5060;branch=z9hG4bK.oxfLJBaRw;received=10.27.128.3;rport=5060<br>
From: <a><sip:john@masked.masked.com></a>;tag=c3Wvuu2XH<br>
To: <a>sip:jacques@masked.masked.com;tag=as007ffc64</a><br>
Call-ID: SQOclJgm4O<br>
CSeq: 20 SUBSCRIBE<br>
Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY, INFO, PUBLISH, MESSAGE<br>
Supported: replaces, timer<br>
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="4224acfb"<br>
Content-Length: 0<br>
<br>
<br>
<------------><br>
Scheduling destruction of SIP dialog 'SQOclJgm4O' in 32000 ms
(Method: SUBSCRIBE)<br>
<br>
</p>
<p><--- SIP read from UDP:<a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> ---><br>
SUBSCRIBE <a>sip:jacques@masked.masked.com</a> SIP/2.0<br>
Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.RNv418~xv;rport<br>
From: <a><sip:john@masked.masked.com></a>;tag=c3Wvuu2XH<br>
To: <a>sip:jacques@masked.masked.com</a><br>
CSeq: 21 SUBSCRIBE<br>
Call-ID: SQOclJgm4O<br>
Max-Forwards: 70<br>
Supported: replaces, outbound<br>
Event: presence<br>
Expires: 600<br>
Accept: application/pidf+xml<br>
Contact:
<a><sip:john@10.27.128.3;transport=udp></a>;+sip.instance="<urn:uuid:abcdf51a-82e0-49b9-a8ab-2461011f25ec>"<br>
User-Agent: Linphone/3.12.0 (belle-sip/1.6.3)<br>
Authorization: Digest realm="asterisk", nonce="4224acfb",
algorithm=MD5, username="john",
uri=<a>"sip:jacques@masked.masked.com"</a>,
response="eb30a9801e78d2cb2c58c61200c50cb1"<br>
<br>
<-------------><br>
--- (14 headers 0 lines) ---<br>
<br>
<--- Transmitting (no NAT) to <a href="http://10.27.128.3:5060" target="_blank">10.27.128.3:5060</a> ---><br>
<b>SIP/2.0 500 Server error</b><br>
Via: SIP/2.0/UDP
10.27.128.3:5060;branch=z9hG4bK.RNv418~xv;received=10.27.128.3;rport=5060<br>
From: <a><sip:john@masked.masked.com></a>;tag=c3Wvuu2XH<br>
To: <a>sip:jacques@masked.masked.com;tag=as3c7de68c</a><br>
Call-ID: SQOclJgm4O<br>
CSeq: 21 SUBSCRIBE<br>
Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY, INFO, PUBLISH, MESSAGE<br>
Supported: replaces, timer<br>
Content-Length: 0<br>
<br>
<br>
<------------></p>
<p>[Mar 23 18:23:09] WARNING[2128]: chan_sip.c:4071 retrans_pkt:
Retransmission timeout reached on transmission SQOclJgm4O for
seqno 103 (Critical Request) -- See
<a href="https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions" target="_blank">https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions</a><br>
Packet timed out after 32000ms with no response</p>
<p><br>
</p>
<p>Why is asterisk giving an error 500? I can find no reason, there
is nothing in any log.<br></p></div></blockquote><div><br></div><div>The sequence number is from the past. The first SUBSCRIBE is sequence number 22 (check the CSeq header). The second is 20. The third is 21. It appears as though this is from the past, so it receives a 500.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>
</p>
<p>Why does asterisk think the error 500 is going to be acked?<br></p>
</blockquote></div>It doesn't. The message is for something else, it refers to sequence number 103.<br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><font color="#073763">Joshua C. Colp</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Asterisk Technical Lead</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Sangoma Technologies</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></font><br></div></div></div></div></div></div></div></div></div></div></div>