Dahua VTO4202F-P-S2 <-> Asterisk <-> Dahua VTH5422H no video

So what I have tried till now:

  1. Using the Dahua built in SIP server the devices can connect to one another audio/video/door lock work.
  2. Using asterisk 20 (built by me) and PJSIP - no video.
  3. Using asterisk 18 (built by me) and chan_sip - no video.
  4. Using asterisk16 from the rpi distro and chan_sip - no video.

What is my config?

VTO (video doorbell) is 8001, one VTH (monitor) is 102.
On the VTH I have configured the VTO so that I can get video/audio before answering the call.
If I disable the VTO config on the VTH I gen only audio call from the VTO (but after some time it stops as no video can be connected “Network abnormal. Video connect timeout!”).
Reading the forums here I learned that this “video” preview is Dahua native implementation and has nothing to do with SIP.
After answering the call the VTH shall switch to normal SIP (e.g. show video from the VTO via sip/rtp)

Network:
Both devices are on the same POE switch (e.g. in the same LAN)
8001 has IP 192.168.178.180
102 has IP 191.168.178.41
Asterisk in running on Raspberry pi 192.168.178.47

What happens?
When I call from VTO to VTH initially the VTO video is shown, then when I answer there is audio and no video and after some seconds I get message on the VTH
“Network abnormal. Video connect timeout!” which then breaks the call.
The same happens when I call the VTO from the VTH using 8001 extension.

What is my sip.conf

[general]
language=de
bindport = 5060
bindaddr = 0.0.0.0
externrefresh=30
transport=udp
localnet=192.168.178.1/255.255.0.0
directmedia=yes
videosupport=yes
[8001]
host=dynamic
username=Door Bell
type=friend
secret=8001
context=outgoing
canreinvite=yes
videosupport=yes
directmedia=yes
qualify=yes
disallow=all
allow=ulaw
allow=h264

[102]
videosupport=yes
directmedia=yes
type=friend
username=102
secret=102
context=outgoing
dtmfmode=info
host=dynamic
canreinvite=yes
qualify=yes
allow=ulaw
allow=h264

What is my extensions.conf

[general]
static=yes
writeprotect=no
[outgoing]
exten => 102,1,Dial(SIP/102,30)
[default]
include => outgoing

What is my SIP log?
See debug_log_dahua2.zip

Do I have something in mind? Well on the VTO when configuring the SIP server I had no menu “Asterisk” but only a menu “Dahua/Dss Express/Third Party”.
I have selected “Third Party” and have given the Asterisk user/pass and I have set “SIP Domain” to asterisk (SIP Server Username and SIP Server Password are left empty).
Looks like for whatever reason the VTH cannot get the video stream from the VTO but by looking on the log I found nothing find anything obvious.
So there is logic on this VTH that dislikes the way Asterisk serves the video but I have no idea what it might be. Any ideas how to debug that? I need some hints where to look for errors as the SIP log looks fine …

I am not able to upload attachments so sip.log is added as replies

Sip log1:

[Nov 30 20:02:57] Asterisk 16.16.1~dfsg-1+deb11u1 built by nobody @ buildd.debian.org on a unknown running Linux on 2021-08-09 06:48:31 UTC
[Nov 30 20:02:58] NOTICE[2519] loader.c: 334 modules will be loaded.
[Nov 30 20:02:58] NOTICE[2519] res_config_ldap.c: No directory user found, anonymous binding as default.
[Nov 30 20:02:58] ERROR[2519] res_config_ldap.c: No directory URL or host found.
[Nov 30 20:02:58] ERROR[2519] res_config_ldap.c: Cannot load LDAP RealTime driver.
[Nov 30 20:02:58] NOTICE[2519] cdr.c: CDR simple logging enabled.
[Nov 30 20:02:58] WARNING[2519] res_phoneprov.c: Unable to find a valid server address or name.
[Nov 30 20:02:58] NOTICE[2519] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Nov 30 20:02:58] NOTICE[2519] chan_mgcp.c: Unable to load config mgcp.conf, MGCP disabled
[Nov 30 20:02:58] VERBOSE[2519] chan_sip.c: SIP channel loading...
[Nov 30 20:02:58] NOTICE[2519] chan_sip.c: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser'
[Nov 30 20:02:58] NOTICE[2519] chan_skinny.c: Configuring skinny from skinny.conf
[Nov 30 20:02:58] NOTICE[2519] chan_skinny.c: Unable to load config skinny.conf, Skinny disabled.
[Nov 30 20:02:58] ERROR[2519] ari/config.c: No configured users for ARI
[Nov 30 20:02:58] NOTICE[2519] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[Nov 30 20:02:58] NOTICE[2519] cdr_pgsql.c: cdr_pgsql configuration contains no global section, skipping module load.
[Nov 30 20:02:58] NOTICE[2519] cel_tds.c: cel_tds has no global category, nothing to configure.
[Nov 30 20:02:58] WARNING[2519] cel_tds.c: cel_tds module had config problems; declining load
[Nov 30 20:02:58] WARNING[2519] cel_pgsql.c: CEL pgsql config file missing global section.
[Nov 30 20:02:58] NOTICE[2519] cel_radius.c: Cannot load radiusclient-ng configuration file /etc/radiusclient-ng/radiusclient.conf.
[Nov 30 20:02:58] NOTICE[2519] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Nov 30 20:02:58] NOTICE[2519] cdr_radius.c: Cannot load radiusclient-ng configuration file /etc/radiusclient-ng/radiusclient.conf.
[Nov 30 20:02:58] ERROR[2519] chan_unistim.c: Unable to load config unistim.conf
[Nov 30 20:02:58] ERROR[2519] pbx_dundi.c: Unable to load config dundi.conf
[Nov 30 20:02:58] WARNING[2519] res_hep_rtcp.c: res_hep is disabled; declining module load
[Nov 30 20:02:58] WARNING[2519] res_hep_pjsip.c: res_hep is disabled; declining module load
[Nov 30 20:02:58] WARNING[2519] loader.c: Some non-required modules failed to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: chan_skinny declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: res_pjsip_transport_websocket declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cel_sqlite3_custom declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cdr_sqlite3_custom declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cdr_pgsql declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cel_tds declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cel_radius declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cdr_radius declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: cdr_tds declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: chan_unistim declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: pbx_dundi declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: res_hep_rtcp declined to load.
[Nov 30 20:02:58] ERROR[2519] loader.c: res_hep_pjsip declined to load.
[Nov 30 20:02:58] VERBOSE[2519] asterisk.c: Asterisk Ready.
[Nov 30 20:03:19] NOTICE[2568] chan_sip.c: Peer '8001' is now Reachable. (3ms / 2000ms)
[Nov 30 20:04:23] NOTICE[2568] chan_sip.c: Peer '8001' is now UNREACHABLE!  Last qualify: 3
[Nov 30 20:07:14] NOTICE[2568] chan_sip.c: Peer '102' is now Reachable. (3ms / 2000ms)
[Nov 30 20:08:33] NOTICE[2568] chan_sip.c: Peer '8001' is now Reachable. (4ms / 2000ms)
[Nov 30 20:09:09] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
REGISTER sip:192.168.178.47 SIP/2.0
Call-ID: 556ce94a2dc6e547329fca6342f5b692
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 0
CSeq: 11 REGISTER
Expires: 60
From: <sip:102@192.168.178.47:5060>;tag=b658aa08fe243302412f6ea6755abd9d
Max-Forwards: 70
PhoneState: 0
To: <sip:102@192.168.178.47:5060>
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.41:5060;rport;branch=z9hG4bK4c01861e9a8298e93921f41a396504a5

<------------->
[Nov 30 20:09:09] VERBOSE[2568] chan_sip.c: --- (12 headers 0 lines) ---
[Nov 30 20:09:09] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.41:5060 (no NAT)
[Nov 30 20:09:09] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.41:5060 (no NAT)
[Nov 30 20:09:09] VERBOSE[2568] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.41:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.178.41:5060;branch=z9hG4bK4c01861e9a8298e93921f41a396504a5;received=192.168.178.41;rport=5060
From: <sip:102@192.168.178.47:5060>;tag=b658aa08fe243302412f6ea6755abd9d
To: <sip:102@192.168.178.47:5060>;tag=as508bccfa
Call-ID: 556ce94a2dc6e547329fca6342f5b692
CSeq: 11 REGISTER
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="22ced3a6"
Content-Length: 0


<------------>
[Nov 30 20:09:09] VERBOSE[2568] chan_sip.c: Scheduling destruction of SIP dialog '556ce94a2dc6e547329fca6342f5b692' in 32000 ms (Method: REGISTER)
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
REGISTER sip:192.168.178.47 SIP/2.0
Authorization: Digest username="102", realm="asterisk", nonce="22ced3a6", uri="sip:192.168.178.47", response="f7da65aadff6110622d78e6d790185d6", algorithm=MD5
Call-ID: 556ce94a2dc6e547329fca6342f5b692
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 0
CSeq: 12 REGISTER
Expires: 60
From: <sip:102@192.168.178.47:5060>;tag=b658aa08fe243302412f6ea6755abd9d
Max-Forwards: 70
PhoneState: 0
To: <sip:102@192.168.178.47:5060>
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.41:5060;rport;branch=z9hG4bK116fd600c969d0bb53847fce6b303ace

<------------->
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: --- (13 headers 0 lines) ---
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.41:5060 (no NAT)
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.41:5060:
OPTIONS sip:102@192.168.178.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK2de37d34
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.178.47>;tag=as2ceec119
To: <sip:102@192.168.178.41:5060>
Contact: <sip:asterisk@192.168.178.47:5060>
Call-ID: 57e729de26c5455b71a8448b43a69f98@192.168.178.47:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Date: Wed, 30 Nov 2022 19:09:10 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.41:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.178.41:5060;branch=z9hG4bK116fd600c969d0bb53847fce6b303ace;received=192.168.178.41;rport=5060
From: <sip:102@192.168.178.47:5060>;tag=b658aa08fe243302412f6ea6755abd9d
To: <sip:102@192.168.178.47:5060>;tag=as508bccfa
Call-ID: 556ce94a2dc6e547329fca6342f5b692
CSeq: 12 REGISTER
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: <sip:102@192.168.178.41:5060>;expires=60
Date: Wed, 30 Nov 2022 19:09:10 GMT
Content-Length: 0


<------------>
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: Scheduling destruction of SIP dialog '556ce94a2dc6e547329fca6342f5b692' in 32000 ms (Method: REGISTER)
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 200 OK
Call-ID: 57e729de26c5455b71a8448b43a69f98@192.168.178.47:5060
Content-Length: 0
CSeq: 102 OPTIONS
From: "asterisk"<sip:asterisk@192.168.178.47>;tag=as2ceec119
To: <sip:102@192.168.178.41:5060>;tag=6608ef8bab7db88c4c62cd625b52b5f8
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK2de37d34

<------------->
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:10] VERBOSE[2568] chan_sip.c: Really destroying SIP dialog '57e729de26c5455b71a8448b43a69f98@192.168.178.47:5060' Method: OPTIONS
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
INVITE sip:102@192.168.178.47:5060 SIP/2.0
Call-ID: 202211301909123593581836
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 321
Content-Type: application/sdp
CSeq: 1 INVITE
Expires: 120
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Max-Forwards: 70
To: <sip:102@192.168.178.47:5060>
TransMode: SuggestRTSP
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.180:5060;rport;branch=z9hG4bK26e36e7e448953aeb951f11e986c9a2b

v=0
o=- 1669835352 2 IN IP4 192.168.178.180
s=Dahua VT 1.5
c=IN IP4 192.168.178.180
t=0 0
m=audio 20000 RTP/AVP 0 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:97 PCM/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=sendrecv
<------------->
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: --- (13 headers 15 lines) ---
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.180:5060 (no NAT)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Sending to 192.168.178.180:5060 (no NAT)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Using INVITE request as basis request - 202211301909123593581836
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found peer '8001' for '8001' from 192.168.178.180:5060
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: 
<--- Reliably Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bK26e36e7e448953aeb951f11e986c9a2b;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
To: <sip:102@192.168.178.47:5060>;tag=as58365a58
Call-ID: 202211301909123593581836
CSeq: 1 INVITE
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2870b983"
Content-Length: 0


<------------>
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Scheduling destruction of SIP dialog '202211301909123593581836' in 6400 ms (Method: INVITE)
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
ACK sip:102@192.168.178.47:5060 SIP/2.0
Call-ID: 202211301909123593581836
Content-Length: 0
CSeq: 1 ACK
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Max-Forwards: 70
Route: <sip:192.168.178.47:5060;lr>
To: <sip:102@192.168.178.47:5060>;tag=as58365a58
Via: SIP/2.0/UDP 192.168.178.180:5060;rport;branch=z9hG4bK26e36e7e448953aeb951f11e986c9a2b

Sip log 2:

<------------->
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: --- (9 headers 0 lines) ---
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
INVITE sip:102@192.168.178.47:5060 SIP/2.0
Authorization: Digest username="8001", realm="asterisk", nonce="2870b983", uri="sip:102@192.168.178.47:5060", response="6c1dbe29ae536ab05dc83f8eba458dec", algorithm=MD5
Call-ID: 202211301909123593581836
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 321
Content-Type: application/sdp
CSeq: 2 INVITE
Expires: 120
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Max-Forwards: 70
To: <sip:102@192.168.178.47:5060>
TransMode: SuggestRTSP
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.180:5060;rport;branch=z9hG4bKd5e1bbb166daa3741a72aafb5bc422c2

v=0
o=- 1669835352 2 IN IP4 192.168.178.180
s=Dahua VT 1.5
c=IN IP4 192.168.178.180
t=0 0
m=audio 20000 RTP/AVP 0 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:97 PCM/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=sendrecv
<------------->
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: --- (14 headers 15 lines) ---
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Sending to 192.168.178.180:5060 (no NAT)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Using INVITE request as basis request - 202211301909123593581836
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found peer '8001' for '8001' from 192.168.178.180:5060
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Got SDP version 2 and unique parts [- 1669835352 IN IP4 192.168.178.180]
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 0
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 97
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 101
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format PCMU for ID 0
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found unknown media description format PCM for ID 97
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format telephone-event for ID 101
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP video format 96
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found video description format H264 for ID 96
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Capabilities: us - (ulaw|h264), peer - audio=(ulaw)/video=(h264)/text=(nothing), combined - (ulaw|h264)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Peer audio RTP is at port 192.168.178.180:20000
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Peer video RTP is at port 192.168.178.180:20001
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Looking for 102 in outgoing (domain 192.168.178.47)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] sip/route.c: sip_route_dump: route/path hop: <sip:8001@192.168.178.180:5060>
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bKd5e1bbb166daa3741a72aafb5bc422c2;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
To: <sip:102@192.168.178.47:5060>
Call-ID: 202211301909123593581836
CSeq: 2 INVITE
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:102@192.168.178.47:5060>
Content-Length: 0


<------------>
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Audio is at 19034
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Video is at 192.168.178.47:15510
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec ulaw to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding video codec h264 to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec alaw to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec gsm to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding video codec h263 to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.41:5060:
INVITE sip:102@192.168.178.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK181337da
Max-Forwards: 70
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>
Contact: <sip:8001@192.168.178.47:5060>
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Date: Wed, 30 Nov 2022 19:09:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 349

v=0
o=root 1575539906 1575539906 IN IP4 192.168.178.47
s=Asterisk PBX 16.16.1~dfsg-1+deb11u1
c=IN IP4 192.168.178.47
b=CT:384
t=0 0
m=audio 19034 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
m=video 15510 RTP/AVP 96 34
a=rtpmap:96 H264/90000
a=rtpmap:34 H263/90000
a=sendrecv

---
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 100 Trying
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Content-Length: 0
CSeq: 102 INVITE
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK181337da

<------------->
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 101 Dialog Establishment
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 0
CSeq: 102 INVITE
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK181337da

<------------->
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: --- (9 headers 0 lines) ---
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 180 Ringing
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 204
Content-Type: application/sdp
CSeq: 102 INVITE
DependentInfo: 192.168.178.180
From: <sip:8001@192.168.178.47>;tag=as27c7be33
LeaveType: FTP
MaxConnectingTime: 120
MaxLeaveWordTime: 90
MaxRingingTime: 30
ShortNumber: 102
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
TransMode: SupportRTSP
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK181337da

v=0
o=0 0 0 IN IP4 192.168.178.41
s=Dahua VT 1.5
c=IN IP4 192.168.178.41
t=0 0
m=audio 20000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
<------------->
[Nov 30 20:09:12] VERBOSE[2568] chan_sip.c: --- (17 headers 10 lines) ---
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] sip/route.c: sip_route_dump: route/path hop: <sip:102@192.168.178.41:5060>
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Got SDP version 0 and unique parts [0 0 IN IP4 192.168.178.41]
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 0
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format PCMU for ID 0
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP video format 96
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Found video description format H264 for ID 96
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Capabilities: us - (ulaw|alaw|gsm|h263|h264), peer - audio=(ulaw)/video=(h264)/text=(nothing), combined - (ulaw|h264)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Non-codec capabilities (dtmf): us - 0x0 (nothing), peer - 0x0 (nothing), combined - 0x0 (nothing)
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Peer audio RTP is at port 192.168.178.41:20000
[Nov 30 20:09:12] VERBOSE[2568][C-00000001] chan_sip.c: Peer video RTP is at port 192.168.178.41:20001
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bKd5e1bbb166daa3741a72aafb5bc422c2;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
To: <sip:102@192.168.178.47:5060>;tag=as19f9d612
Call-ID: 202211301909123593581836
CSeq: 2 INVITE
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:102@192.168.178.47:5060>
Content-Length: 0


<------------>
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Audio is at 18692
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Video is at 192.168.178.47:10128
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec ulaw to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding video codec h264 to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[Nov 30 20:09:12] VERBOSE[2765][C-00000001] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bKd5e1bbb166daa3741a72aafb5bc422c2;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
To: <sip:102@192.168.178.47:5060>;tag=as19f9d612
Call-ID: 202211301909123593581836
CSeq: 2 INVITE
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:102@192.168.178.47:5060>
Content-Type: application/sdp
Content-Length: 329

v=0
o=root 829366296 829366296 IN IP4 192.168.178.47
s=Asterisk PBX 16.16.1~dfsg-1+deb11u1
c=IN IP4 192.168.178.47
b=CT:384
t=0 0
m=audio 18692 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 10128 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv

<------------>
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 200 OK
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 319
Content-Type: application/sdp
CSeq: 102 INVITE
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK181337da

v=0
o=- 1669838955 1 IN IP4 192.168.178.41
s=Dahua VT 1.5
c=IN IP4 192.168.178.41
t=0 0
m=audio 20000 RTP/AVP 0 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:97 PCM/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=recvonly
<------------->
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: --- (10 headers 15 lines) ---
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Comparing SDP version 0 -> 1 and unique parts [0 0 IN IP4 192.168.178.41] -> [- 1669838955 IN IP4 192.168.178.41]
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 0
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 97
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 101
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format PCMU for ID 0
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found unknown media description format PCM for ID 97
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format telephone-event for ID 101
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP video format 96
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found video description format H264 for ID 96
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Capabilities: us - (ulaw|alaw|gsm|h263|h264), peer - audio=(ulaw)/video=(h264)/text=(nothing), combined - (ulaw|h264)
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Non-codec capabilities (dtmf): us - 0x0 (nothing), peer - 0x1 (telephone-event|), combined - 0x0 (nothing)
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Peer audio RTP is at port 192.168.178.41:20000
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Peer video RTP is at port 192.168.178.41:20001
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] sip/route.c: sip_route_dump: route/path hop: <sip:102@192.168.178.41:5060>
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: Parsing <sip:102@192.168.178.41:5060> for address/port to send to
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: set destination to 192.168.178.41:5060
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Transmitting (no NAT) to 192.168.178.41:5060:
ACK sip:102@192.168.178.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK59ee4612
Max-Forwards: 70
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
Contact: <sip:8001@192.168.178.47:5060>
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Content-Length: 0


---
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Audio is at 18692
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Video is at 192.168.178.47:10128
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec ulaw to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding video codec h264 to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: 
<--- Reliably Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bKd5e1bbb166daa3741a72aafb5bc422c2;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
To: <sip:102@192.168.178.47:5060>;tag=as19f9d612
Call-ID: 202211301909123593581836
CSeq: 2 INVITE
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:102@192.168.178.47:5060>
Content-Type: application/sdp
Content-Length: 329

v=0
o=root 829366296 829366296 IN IP4 192.168.178.47
s=Asterisk PBX 16.16.1~dfsg-1+deb11u1
c=IN IP4 192.168.178.47
b=CT:384
t=0 0
m=audio 18692 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 10128 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv

<------------>
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: set_destination: Parsing <sip:102@192.168.178.41:5060> for address/port to send to
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: set_destination: set destination to 192.168.178.41:5060
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Audio is at 19034
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Video is at 192.168.178.180:20001
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec ulaw to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding video codec h264 to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec alaw to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding codec gsm to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Adding video codec h263 to SDP
[Nov 30 20:09:15] VERBOSE[2765][C-00000001] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.41:5060:
INVITE sip:102@192.168.178.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK2a217614
Max-Forwards: 70
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
Contact: <sip:8001@192.168.178.47:5060>
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
CSeq: 103 INVITE
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 350

v=0
o=root 1575539906 1575539907 IN IP4 192.168.178.47
s=Asterisk PBX 16.16.1~dfsg-1+deb11u1
c=IN IP4 192.168.178.180
b=CT:384
t=0 0
m=audio 20000 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=maxptime:150
a=sendrecv
m=video 20001 RTP/AVP 96 34
a=rtpmap:96 H264/90000
a=rtpmap:34 H263/90000
a=sendrecv

---
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 100 Trying
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Content-Length: 0
CSeq: 103 INVITE
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK2a217614

<------------->
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
ACK sip:102@192.168.178.47:5060 SIP/2.0
Call-ID: 202211301909123593581836
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 0
CSeq: 2 ACK
From: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Max-Forwards: 70
To: <sip:102@192.168.178.47:5060>;tag=as19f9d612
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.180:5060;rport;branch=z9hG4bK51ad0df87e7b72c8efa3d07c71de0683

<------------->
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: --- (10 headers 0 lines) ---
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: set_destination: Parsing <sip:8001@192.168.178.180:5060> for address/port to send to
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: set_destination: set destination to 192.168.178.180:5060
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: Audio is at 18692
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: Video is at 192.168.178.41:20001
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: Adding codec ulaw to SDP
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: Adding video codec h264 to SDP
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.180:5060:
INVITE sip:8001@192.168.178.180:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK53053c95;rport
Max-Forwards: 70
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Contact: <sip:102@192.168.178.47:5060>
Call-ID: 202211301909123593581836
CSeq: 102 INVITE
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 329

v=0
o=root 829366296 829366297 IN IP4 192.168.178.47
s=Asterisk PBX 16.16.1~dfsg-1+deb11u1
c=IN IP4 192.168.178.41
b=CT:384
t=0 0
m=audio 20000 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 20001 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv

---
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
SIP/2.0 100 Trying
Call-ID: 202211301909123593581836
Content-Length: 0
CSeq: 102 INVITE
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.47:5060;rport=5060;branch=z9hG4bK53053c95

<------------->
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
SIP/2.0 200 OK
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 310
Content-Type: application/sdp
CSeq: 103 INVITE
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK2a217614

v=0
o=0 0 0 IN IP4 192.168.178.41
s=Dahua VT 1.5
c=IN IP4 192.168.178.41
t=0 0
m=audio 20000 RTP/AVP 0 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:97 PCM/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=recvonly
<------------->
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: --- (10 headers 15 lines) ---
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Comparing SDP version 1 -> 0 and unique parts [- 1669838955 IN IP4 192.168.178.41] -> [0 0 IN IP4 192.168.178.41]
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 0
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 97
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 101
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format PCMU for ID 0
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found unknown media description format PCM for ID 97
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format telephone-event for ID 101
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP video format 96
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found video description format H264 for ID 96
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Capabilities: us - (ulaw|alaw|gsm|h263|h264), peer - audio=(ulaw)/video=(h264)/text=(nothing), combined - (ulaw|h264)
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Non-codec capabilities (dtmf): us - 0x0 (nothing), peer - 0x1 (telephone-event|), combined - 0x0 (nothing)
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Peer audio RTP is at port 192.168.178.41:20000
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Peer video RTP is at port 192.168.178.41:20001
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: Parsing <sip:102@192.168.178.41:5060> for address/port to send to
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: set destination to 192.168.178.41:5060
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Transmitting (no NAT) to 192.168.178.41:5060:
ACK sip:102@192.168.178.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK49827bc4
Max-Forwards: 70
From: <sip:8001@192.168.178.47>;tag=as27c7be33
To: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
Contact: <sip:8001@192.168.178.47:5060>
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
CSeq: 103 ACK
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Content-Length: 0


---
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
SIP/2.0 200 OK
Call-ID: 202211301909123593581836
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 312
Content-Type: application/sdp
CSeq: 102 INVITE
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.47:5060;rport=5060;branch=z9hG4bK53053c95

v=0
o=0 0 0 IN IP4 192.168.178.180
s=Dahua VT 1.5
c=IN IP4 192.168.178.180
t=0 0
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=sendrecv
m=audio 20000 RTP/AVP 0 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:97 PCM/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
[Nov 30 20:09:15] VERBOSE[2568] chan_sip.c: --- (10 headers 15 lines) ---
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Comparing SDP version 2 -> 0 and unique parts [- 1669835352 IN IP4 192.168.178.180] -> [0 0 IN IP4 192.168.178.180]
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP video format 96
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found video description format H264 for ID 96
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 0
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 97
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found RTP audio format 101
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format PCMU for ID 0
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found unknown media description format PCM for ID 97
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Found audio description format telephone-event for ID 101
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Capabilities: us - (ulaw|h264), peer - audio=(ulaw)/video=(h264)/text=(nothing), combined - (ulaw|h264)
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Peer audio RTP is at port 192.168.178.180:20000
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Peer video RTP is at port 192.168.178.180:20001
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: Parsing <sip:8001@192.168.178.180:5060> for address/port to send to
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: set destination to 192.168.178.180:5060
[Nov 30 20:09:15] VERBOSE[2568][C-00000001] chan_sip.c: Transmitting (no NAT) to 192.168.178.180:5060:
ACK sip:8001@192.168.178.180:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK2f1ca2fa;rport
Max-Forwards: 70
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Contact: <sip:102@192.168.178.47:5060>
Call-ID: 202211301909123593581836
CSeq: 102 ACK
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Content-Length: 0


---
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.41:5060 --->
BYE sip:8001@192.168.178.47:5060 SIP/2.0
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
Contact: <sip:102@192.168.178.41:5060>
Content-Length: 0
CSeq: 1 BYE
From: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
Max-Forwards: 70
To: <sip:8001@192.168.178.47>;tag=as27c7be33
User-Agent: Dahua UAC/3.0 VTH5422H V4.510.0.1
Via: SIP/2.0/UDP 192.168.178.41:5060;rport;branch=z9hG4bK2533b017e5c0f777b9f2994203e813f3

<------------->
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: --- (10 headers 0 lines) ---
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: Sending to 192.168.178.41:5060 (no NAT)
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: Scheduling destruction of SIP dialog '56a7b399152500e62b67d69d3106baab@192.168.178.47:5060' in 6400 ms (Method: BYE)
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.41:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.178.41:5060;branch=z9hG4bK2533b017e5c0f777b9f2994203e813f3;received=192.168.178.41;rport=5060
From: <sip:102@192.168.178.41:5060>;tag=f70f82b526d81baa040b3b5b3bdb57f8
To: <sip:8001@192.168.178.47>;tag=as27c7be33
Call-ID: 56a7b399152500e62b67d69d3106baab@192.168.178.47:5060
CSeq: 1 BYE
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

Sip log 3:

<------------>
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: set_destination: Parsing <sip:8001@192.168.178.180:5060> for address/port to send to
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: set_destination: set destination to 192.168.178.180:5060
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: Audio is at 18692
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: Video is at 192.168.178.47:10128
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: Adding codec ulaw to SDP
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: Adding video codec h264 to SDP
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[Nov 30 20:09:26] VERBOSE[2766][C-00000001] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.180:5060:
INVITE sip:8001@192.168.178.180:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK54b740fe;rport
Max-Forwards: 70
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Contact: <sip:102@192.168.178.47:5060>
Call-ID: 202211301909123593581836
CSeq: 103 INVITE
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 329

v=0
o=root 829366296 829366298 IN IP4 192.168.178.47
s=Asterisk PBX 16.16.1~dfsg-1+deb11u1
c=IN IP4 192.168.178.47
b=CT:384
t=0 0
m=audio 18692 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 10128 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv

---
[Nov 30 20:09:26] VERBOSE[2765][C-00000001] chan_sip.c: Scheduling destruction of SIP dialog '202211301909123593581836' in 6400 ms (Method: ACK)
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
SIP/2.0 100 Trying
Call-ID: 202211301909123593581836
Content-Length: 0
CSeq: 103 INVITE
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.47:5060;rport=5060;branch=z9hG4bK54b740fe

<------------->
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
SIP/2.0 200 OK
Call-ID: 202211301909123593581836
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 312
Content-Type: application/sdp
CSeq: 103 INVITE
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.47:5060;rport=5060;branch=z9hG4bK54b740fe

v=0
o=0 0 0 IN IP4 192.168.178.180
s=Dahua VT 1.5
c=IN IP4 192.168.178.180
t=0 0
m=video 20001 RTP/AVP 96
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=sendrecv
m=audio 20000 RTP/AVP 0 97 101
a=rtpmap:0 PCMU/8000
a=rtpmap:97 PCM/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: --- (10 headers 15 lines) ---
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: Comparing SDP version 0 -> 0 and unique parts [0 0 IN IP4 192.168.178.180] -> [0 0 IN IP4 192.168.178.180]
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: Parsing <sip:8001@192.168.178.180:5060> for address/port to send to
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: set_destination: set destination to 192.168.178.180:5060
[Nov 30 20:09:26] VERBOSE[2568][C-00000001] chan_sip.c: Transmitting (no NAT) to 192.168.178.180:5060:
ACK sip:8001@192.168.178.180:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK5526639b;rport
Max-Forwards: 70
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Contact: <sip:102@192.168.178.47:5060>
Call-ID: 202211301909123593581836
CSeq: 103 ACK
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Content-Length: 0


---
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: set_destination: Parsing <sip:8001@192.168.178.180:5060> for address/port to send to
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: set_destination: set destination to 192.168.178.180:5060
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.180:5060:
BYE sip:8001@192.168.178.180:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK1c0e32d4;rport
Max-Forwards: 70
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
Call-ID: 202211301909123593581836
CSeq: 104 BYE
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Proxy-Authorization: Digest username="Door Bell", realm="asterisk", algorithm=MD5, uri="sip:192.168.178.47", nonce="2870b983", response="2b445594a7dfaa88a6249a1397fde186"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: Scheduling destruction of SIP dialog '202211301909123593581836' in 6400 ms (Method: ACK)
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
SIP/2.0 200 OK
Call-ID: 202211301909123593581836
Content-Length: 0
CSeq: 104 BYE
From: <sip:102@192.168.178.47:5060>;tag=as19f9d612
To: <sip:8001@192.168.178.47>;tag=a60b2bff28ced9a382849a7fa70e7051
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.47:5060;rport=5060;branch=z9hG4bK1c0e32d4

<------------->
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:26] VERBOSE[2568] chan_sip.c: Really destroying SIP dialog '202211301909123593581836' Method: ACK
[Nov 30 20:09:30] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
REGISTER sip:192.168.178.47 SIP/2.0
Call-ID: 3867c32ae105e308a4755f60106456fd
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 0
CSeq: 11 REGISTER
Expires: 60
From: <sip:8001@192.168.178.47:5060>;tag=a77a96f5f827ac006ed3a044c3b4a71d
Max-Forwards: 70
PhoneState: 0
To: <sip:8001@192.168.178.47:5060>
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.180:5060;rport;branch=z9hG4bKfd27aade407babe4567dbece0a0c2081

<------------->
[Nov 30 20:09:30] VERBOSE[2568] chan_sip.c: --- (12 headers 0 lines) ---
[Nov 30 20:09:30] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.180:5060 (no NAT)
[Nov 30 20:09:30] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.180:5060 (no NAT)
[Nov 30 20:09:30] VERBOSE[2568] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bKfd27aade407babe4567dbece0a0c2081;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47:5060>;tag=a77a96f5f827ac006ed3a044c3b4a71d
To: <sip:8001@192.168.178.47:5060>;tag=as05748e54
Call-ID: 3867c32ae105e308a4755f60106456fd
CSeq: 11 REGISTER
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6f1049c7"
Content-Length: 0


<------------>
[Nov 30 20:09:30] VERBOSE[2568] chan_sip.c: Scheduling destruction of SIP dialog '3867c32ae105e308a4755f60106456fd' in 32000 ms (Method: REGISTER)
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
REGISTER sip:192.168.178.47 SIP/2.0
Authorization: Digest username="8001", realm="asterisk", nonce="6f1049c7", uri="sip:192.168.178.47", response="77c6bb86d9cbcb4300d93d781472b26c", algorithm=MD5
Call-ID: 3867c32ae105e308a4755f60106456fd
Contact: <sip:8001@192.168.178.180:5060>
Content-Length: 0
CSeq: 12 REGISTER
Expires: 60
From: <sip:8001@192.168.178.47:5060>;tag=a77a96f5f827ac006ed3a044c3b4a71d
Max-Forwards: 70
PhoneState: 0
To: <sip:8001@192.168.178.47:5060>
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.180:5060;rport;branch=z9hG4bK69fa892f6c768835a1b84917e3d08af3

<------------->
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: --- (13 headers 0 lines) ---
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: Sending to 192.168.178.180:5060 (no NAT)
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.178.180:5060:
OPTIONS sip:8001@192.168.178.180:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK79a455f0
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.178.47>;tag=as19245897
To: <sip:8001@192.168.178.180:5060>
Contact: <sip:asterisk@192.168.178.47:5060>
Call-ID: 54da9a57792c1ef229b8963c73500991@192.168.178.47:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Date: Wed, 30 Nov 2022 19:09:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: 
<--- Transmitting (no NAT) to 192.168.178.180:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.178.180:5060;branch=z9hG4bK69fa892f6c768835a1b84917e3d08af3;received=192.168.178.180;rport=5060
From: <sip:8001@192.168.178.47:5060>;tag=a77a96f5f827ac006ed3a044c3b4a71d
To: <sip:8001@192.168.178.47:5060>;tag=as05748e54
Call-ID: 3867c32ae105e308a4755f60106456fd
CSeq: 12 REGISTER
Server: Asterisk PBX 16.16.1~dfsg-1+deb11u1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: <sip:8001@192.168.178.180:5060>;expires=60
Date: Wed, 30 Nov 2022 19:09:31 GMT
Content-Length: 0


<------------>
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: Scheduling destruction of SIP dialog '3867c32ae105e308a4755f60106456fd' in 32000 ms (Method: REGISTER)
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: 
<--- SIP read from UDP:192.168.178.180:5060 --->
SIP/2.0 200 OK
Call-ID: 54da9a57792c1ef229b8963c73500991@192.168.178.47:5060
Content-Length: 0
CSeq: 102 OPTIONS
From: "asterisk"<sip:asterisk@192.168.178.47>;tag=as19245897
To: <sip:8001@192.168.178.180:5060>;tag=caf189a460c8cdda64fbf918e8e27425
User-Agent: Dahua UAC/3.0 VTO4202F-P-S2 V4.511.0.0 SN:8D013F2PAJ5CC46
Via: SIP/2.0/UDP 192.168.178.47:5060;branch=z9hG4bK79a455f0

<------------->
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: --- (8 headers 0 lines) ---
[Nov 30 20:09:31] VERBOSE[2568] chan_sip.c: Really destroying SIP dialog '54da9a57792c1ef229b8963c73500991@192.168.178.47:5060' Method: OPTIONS
[Nov 30 20:09:32] VERBOSE[2568] chan_sip.c: Really destroying SIP dialog '56a7b399152500e62b67d69d3106baab@192.168.178.47:5060' Method: BYE

The Dahua 5422 is offering to receive audio and video on consecutive even and odd port numbers. That’s wrong, because Asterisk will expect to use the odd number for the RTCP for the audio.

The Dahua 5422 is also putting the video on receive only hold so will not send any video.

@david Thanks for the reply!

because Asterisk will expect to use the odd number for the RTCP for the audio.

Is there some setting that I can use to influence how Asterisk will expect the ports?

The Dahua 5422 is also putting the video on receive only hold so will not send any video.

The VTH5422H is a door monitor it will not send video, it shall only receive video and reiceve/send audio. Is there some setting I need to put in sip.conf to tell Asterisk that this device will only receive/send audio?

No… It is the peer’s responsibility to specify the port number if the default is not being used. There is no way of Asterisk knowing the correct value to use unless it uses the default, or the peer provides a value.

Can you tell me where exactly the is the place where you have identified the port inconsistency so that I can play with other clients to better understand the port “handshake” problem? If you can quote some lines from my SIP debug will be great.

For the second thing with the video on hold: Is there some setting I need to configure in order to specify that the monitor will have only send/receive audio and only receive video?

20000 and 20001

I’m saying this will cause some difficulty, but I don’t know exactly how Asterisk will handle it; there could be other issues, too.

If you are expecting one way video, this may not be a problem. I think Asterisk will treat this as hold for an audio stream, but I think it still passes through video.

Hm I did sme more testing and I can confirm that audio work between the vto and vth via asterisk for short while befor the “cannot open video” error message on the vth … so my asumption is that asterisk somehow manifests video and the vh tries to start it … but whenit fails it drops the entire call. How should a video attempt look on wireshark? I hope to see some instructions via sip to open a steam somewhere and then that attemp fails or the setting is misunderstood by the device and then there is no one there. From sip perspective a how the video stream shall looolk on the asterisk side asterisk ip and the port 20001? Or can you point me to sme sip docu I can read in detail? I find some highlevel overview things in google…

That would be helpful to see, per your scenario 1:

What’s the text of that log in wireshark look like ?

Could be that changing useragent in sip.conf to match whatever you see in wireshark eg. DahuaX does the trick. Kind of a black box though.

To see RTP stream you can run on the Asterisk CLI rtp set debug on but your re-invites to direct media between VTO and VTH should preclude this path from being set up.

As penguinpbx says, you have a direct media re-INVITE, which means the video will be bypassing Asterisk, and should be going directly between the two devices.

This is slightly broken, as it has sent a=sendrecv to the 420, when it should have sent the same as the 422 sent, recvonly. However, it is the 422 that brings the call down, but only the the 420 that should have seen something strange.

The primary references for SIP are:

RFC 3261 SIP
RFC 4566 SDP
RFC 3550 RTP

hello,

Thanks again, I am following the path of trying to make asterisk behave like the Dahua SIP server by experimenting against the VTH (which is actually the blackbox device that somehow misunderstands Asterisk).

First I tried this trick setting the useragent header to pretend to be Dahua SIP server but did not help (thanks for the idea).

Here are two different wireshark dumps from the port where the VTH is connected. One is with Asterisk the other with Dahua SIP Server (flow is exported also as PDF).
https://drive.google.com/drive/u/0/folders/1anLlEuNZ_P6zWfOopK5DLUjBxXPPE7sP

Initially I have seen that the Dahua sends “telephone-event”. To enable that I have used “dtmfmode=rfc2833” but what I currently cannot reproduce is sending a media request PCM/16000 - by looking at the Asterisk Audio and Video Capabilities - Asterisk Project - Asterisk Project Wiki I could not find any codec that will deliver this media header - seems important for the VTH as the VTH-VTO Sip server seems to happening via this PCM codec.

Here is my current sip.conf

[general]
language=de
bindport = 5060
bindaddr = 0.0.0.0
externrefresh=30
transport=udp
localnet=192.168.178.1/255.255.0.0
directmedia=yes
videosupport=yes
;useragent=Dahua UAS/3.0 VTO4202F-P-S2 ;Make asterisk pretend it is a dahua VTO SIP server

[8001]
host=dynamic
username=8001
type=friend
secret=123456
context=outgoing
videosupport=yes
directmedia=yes
qualify=yes
disallow=all
allow=ulaw,pcm,H264
dtmfmode=rfc2833


[102]
disallow=all
allow=ulaw,pcm,H264
videosupport=yes
directmedia=yes
type=friend
username=admin
secret=123456
context=outgoing
dtmfmode=rfc2833
host=dynamic
qualify=yes

and my extensions.conf

[general]
static=yes
writeprotect=no

[outgoing]
exten => 102,1,Dial(SIP/102,30)

[default]
include => outgoing

Any ideas a highly appreciated.

p.s.
By looking at the working setup VTH-VTO - I cannot see anywhere a video connection (only audio PCM at port 20000) I am analyzing this correctly with wireshark (I am using the “Telephony->Voip Calls” menu)?

PCM/16000 would, probably be slin16. although I don’t know if Asterisk actually recognizes this in SDP. It seems it doesn’t:

which is not surprising, as it doesn’t have any official meaning! It is not listed in the official, IANA, register of codec names.

If it actually requires such a proprietary format, you will have to write your own format module. Unfortunately, without an official definition, you can only guess as to what it really means, although Asterisk slin16 seems likely. Given that it also offers PCMU, it seem unlikely that excluding it would be fatal.

As a more general point, although a lot of people seem to push the limits with video doorbells, so end up here, you are assuming a lot of terminology that I’m having to guess from context. A backgrounder on your system, explaining the terminology, might be useful.

Thanks for taking the time!

I also read the source code for the chan_sip.c and can confirm such thing does not exist as offering. Having that in mind I have tested the hypothesis that the PCM/16000 is important by disabling the video and having only “ulaw” as an audio codec. Call is working just fine attached the flow here: delme - Google Drive (dahua-asterisk-audio-only.pdf). That resulted in a RTP call using g711U and everything was OK. So audio via PCM/16000 is not a requirement.

So back to the video - can you point me to the video exchange? I can only see RTP (H264) from Asterisk (192.168.178.47) to VTH (192.168.178.41) but then no direct video between VTO (192.168.178.180) and VTH. Looks like direct video is not working? I have made a test where I have disabled “directmedia” (and completely removed the “canreinvite” as I read here that “canreinvite” is a legacy setting for “directmedia” and can cause problems). If you can point me to video exchange that seems stick I can dig down further.

p.s.
I plan to switch to PJSIP once I get chan_sip working. I am using chan_sip for now only because I saw lots of people having a working setup with chan_sip and dahua VTO/VTH. Once I have it working will migrate to PJSIP.

p.s.

A backgrounder on your system, explaining the terminology, might be useful.

Well I am trying to become such a backgrounder out of necessity by running experiments :slight_smile:

I am puzzled by my latest experiment
sip.conf (only videosupport in the general section, in extensions only matching codecs)

[general]
language=de
bindport = 5060
bindaddr = 0.0.0.0
externrefresh=30
transport=udp
localnet=192.168.178.1/255.255.0.0
;directmedia=yes
videosupport=yes
;useragent=Dahua UAS/3.0 VTO4202F-P-S2 ;Make asterisk pretend it is a dahua VTO SIP server

[8001]
host=dynamic
username=8001
type=friend
secret=123456
context=outgoing
;videosupport=yes
;directmedia=yes
qualify=yes
disallow=all
allow=ulaw,H264
dtmfmode=rfc2833


[102]
disallow=all
allow=ulaw,H264
;videosupport=yes
;directmedia=yes
type=friend
username=admin
secret=123456
context=outgoing
dtmfmode=rfc2833
host=dynamic
qualify=yes

In the dahua-vth-h264-packets.pcapng here delme - Google Drive I can see H264 packets flowing from 12130 on Asterisk to 20001 on the VTH … is my observation correct? Does that mean that there is a channel open but for whatever reason the device does not like the content? That would be important as it would mean that from connection perspective (that is SIP RTP connection) all is fine, it is only the content delivered by the Asterisk that is somewhat disliked by the device.

I answered that my self with another test - installed linphone on android, registered it in asterisk and then instead of calling the VTH using the VTO via asterisk I have called the phone from the VTO via Asterisk and video works. So connectivity wize is all OK. That means there is something in the streaming that breaks some logic inside the VTH.
Can you point me to some video settings that can I can play with? My assumption based on the observation here is that

  1. Direct video does not work (the VTH always connectes to the Asterisk sever for RTP H264 video)
  2. Asterisk serves the video in an unsupported format for the VTH

So I think Asterisk shall not be doing reencoding or something as on both wireshark dums (that is the working VTO-VTH dump and the non working VTO-Asterisk-VTH dump) the format is manifested as H264 but I guess when proxying the video to the VTH device something is changed … can you give me some directions where can a look?

Asterisk has told both sides to send video directly, and both have accepted. If they don’t honour those acceptances, that is not Asterisk’s problem.

As I said Asterisk has wrongly told the 4202 that it can expect video from the the 5422, but the 4202 is the only one that could take exception to that, and it is the 5422 that actually seems to have taken exception, as it is the one that sent the BYE.
.
Asterisk offers both way video from 4202’s address to 5422 The 4202 had offered both way.

Asterisk offers both way video (should be one way) from address of 5422 ti 4202

5422 accepts but says it isn’t going to send.

4202 accepts the stream. I’m not sure it is quite legal for it to change the order of the streams, from both the latest offer and its original offer.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.