Problem with Dahua OUTDOOR intercom VTO VTH and Asterisk: Retransmission timeout reached on transmission.

dax.busi

n3wb
Joined
Dec 18, 2020
Messages
8
Reaction score
0
Location
italy
I 've a dahua intercom system composed by:
  • a Dahua VTO2000A outdoor unit ()
  • a Dahua VTH1510 indoor unit
The system function only if I use an old version of Asterisk with chan_sip (Asterisk 11) and only if the VTO calls a group call (one of the member of the group call is the VTH indoor unit)
Now I've made an automation AGI script that in some case (based on a DB query) instead of calling the Group Call answer the call from the outdoor UNIT and plays a ulaw audio file. The script is OK becouse i tested it with zoiper and other telephone. But when I used it with the VTO intercom the script start but after some seconds asterisk fail the call and hangup with the following errors:

[2020-12-16 15:48:16] WARNING[109134]: chan_sip.c:4038 retrans_pkt: Retransmission timeout reached on transmission 202012161748091032678280@172.16.0.111 for seqno 21 (Critical Response) -- See SIP Retransmissions - Asterisk Project - Asterisk Project Wiki
Packet timed out after 6400ms with no response
[2020-12-16 15:48:16] WARNING[109134]: chan_sip.c:4067 retrans_pkt: Hanging up call 202012161748091032678280@172.16.0.111 - no reply to our critical packet (see SIP Retransmissions - Asterisk Project - Asterisk Project Wiki).

I attach two capture i made with tcp dump: one is with the right flow of the call the other one is when it fails.
My FreePBX ip is 172.16.0.160
The VTO ip is 172.16.0.111
The VTH ip is 172.16.0.99

Thank U for everyone who will help me in debugging and resolving this problem.
 

Attachments

roelb

n3wb
Joined
Mar 4, 2021
Messages
2
Reaction score
0
Location
NL
I have exactly the same issue. Did you manage to find a solution? It seems that the SIP OK message from Asterisk is never ACK'ed by the phone, and thus a session is never established.

In my setup, after the INVITE from the phone, my server sends back the following packet:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.1.251:5060;branch=z9hG4bKdf9ae05c80a0a6ef9f30f1b2bca9ddf8;received=10.0.1.251;rport=5060
From: <sip:901@10.0.1.1>;tag=f9204c2ec236931e353aa01e3723bcd9
To: <sip:10@10.0.1.1:5060>;tag=as7b4de810
Call-ID: 202103041118371923368057
CSeq: 1 INVITE
Server: Asterisk PBX 15.6.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:10@10.0.1.1:5060>
Content-Type: application/sdp
Content-Length: 301

v=0
o=root 380070931 380070931 IN IP4 10.0.1.1
s=Asterisk PBX 15.6.1
c=IN IP4 10.0.1.1
b=CT:384
t=0 0
m=audio 19020 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
m=video 19718 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv

It retries a couple of times and then fails. No further response is received from the doorphone.
 

roelb

n3wb
Joined
Mar 4, 2021
Messages
2
Reaction score
0
Location
NL
Figured it out. The Dahua won't respond to an "OK" without a SIP progress message (183 SESSION PROGRESS) in between. I auto-answer doorphone calls in asterisk (and then send a doorbell chime and a progress indication). Thas has worked with other brand SIP doorphones without any issue, as they did not require a progress indication prior to answering.

But a simple Progress() in the dialplan prior to Answer() solved this for the Dahua. Works flawlessly now.
 

dax.busi

n3wb
Joined
Dec 18, 2020
Messages
8
Reaction score
0
Location
italy
Hello thank you for the reply. I've inserted the Progress() command in the dialplan but the problem still persist. Looking to the tcpdump in my case it seems that asterisk reply with an unauthorized 401 sip message. Could you help me to debug this problem? I attach here the tcpdump.
 

Attachments

dax.busi

n3wb
Joined
Dec 18, 2020
Messages
8
Reaction score
0
Location
italy
Ok i figured out that there's a workaround to the problem. Instead of working with ring groups of freepbx, you should setup the dahua vto with internal VTH number. Then in freepbx you should enable in the VTH extensions the follow me feature to the ring group. In this way the SIP autenthication is correct. If You setup the ring group in the VTO. On the Asterisk side the authentication fail with 401 Unauthorized.
 
Top