[PJSIP] Ошибка сегментации после RX BYE от NVR при приглашении для загрузки - PullRequest
0 голосов
/ 28 апреля 2020
    13:38:08.315         sip_endpoint.c !Processing incoming message: Request msg REGISTER/cseq=1 (rdata0x11b6ff8)
13:38:08.315          pjsip_regesit  .RX 412 bytes Request msg REGISTER/cseq=1 (rdata0x11b6ff8) from UDP 192.168.10.191:5060:
REGISTER sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.191:5060;rport;branch=z9hG4bK827455182
From: <sip:34020000001110000001@3402000000>;tag=1624098665
To: <sip:34020000001110000001@3402000000>
Call-ID: 1813622515
CSeq: 1 REGISTER
Contact: <sip:34020000001110000001@192.168.10.191:5060>
Max-Forwards: 70
User-Agent: Embedded Net DVR/NVR/DVS
Expires: 100
Content-Length: 0


--end msg--
13:38:08.316          pjsip_regesit  .TX 371 bytes Response msg 401/REGISTER/cseq=1 (tdta0x7f6250000fb8) to UDP 192.168.10.191:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.10.191:5060;rport=5060;received=192.168.10.191;branch=z9hG4bK827455182
Call-ID: 1813622515
From: <sip:34020000001110000001@3402000000>;tag=1624098665
To: <sip:34020000001110000001@3402000000>;tag=z9hG4bK827455182
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm="123",nonce="238e1f2946e87ccd"
Content-Length:  0


--end msg--
13:38:08.327          pjsip_regesit  .RX 610 bytes Request msg REGISTER/cseq=2 (rdata0x7f6250000f38) from UDP 192.168.10.191:5060:
REGISTER sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.191:5060;rport;branch=z9hG4bK1323058227
From: <sip:34020000001110000001@3402000000>;tag=1624098665
To: <sip:34020000001110000001@3402000000>
Call-ID: 1813622515
CSeq: 2 REGISTER
Contact: <sip:34020000001110000001@192.168.10.191:5060>
Authorization: Digest username="34020000001110000001", realm="123", nonce="238e1f2946e87ccd", uri="sip:34020000002000000001@3402000000", response="cfce608b6e1e5bf8d4a229c032917225", algorithm=MD5
Max-Forwards: 70
User-Agent: Embedded Net DVR/NVR/DVS
Expires: 100
Content-Length: 0


--end msg--

13: 38: 08.327 pjsip_regesit .TX 344 байта Ответ msg 200 / REGISTER / cseq = 2 (tdta0x7f6250003578) на UDP 192.168.10.191:5060: SIP / 2.0 200 OK Через: SIP / 2.0 / UDP 192.168. 10.191: 5060; rport = 5060; получено = 192.168.10.191; филиал = z9hG4bK1323058227 Идентификатор вызова: 1813622515 От:; tag = 1624098665 Кому:; tag = z9hG4bK1323058227 CSeq: 2 REGISTER Дата: 2020-3-28T13: 38: 8.3 : 3600 Длина контента: 0

--end msg--
13:38:08.351          pjsip_regesit  .RX 589 bytes Request msg MESSAGE/cseq=20 (rdata0x7f6250000f38) from UDP 192.168.10.191:5060:
MESSAGE sip:34020000002000000001@3402000000.spvmn.cn SIP/2.0
Via: SIP/2.0/UDP 192.168.10.191:5060;rport;branch=z9hG4bK672828338
From: <sip:34020000001110000001@3402000000.spvmn.cn>;tag=1907213299
To: <sip:34020000002000000001@3402000000.spvmn.cn>
Call-ID: 1611555031
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length:   179

<?xml version="1.0" encoding="gb2312"?>
<Notify>
<CmdType>Keepalive</CmdType>
<SN>471</SN>
<DeviceID>34020000001110000001</DeviceID>
<Status>OK</Status>
<Info>
</Info>
</Notify>

--end msg--
13:38:08.351               endpoint  .Response msg 200/MESSAGE/cseq=20 (tdta0x7f6250003578) created
13:38:08.351          pjsip_regesit  .TX 316 bytes Response msg 200/MESSAGE/cseq=20 (tdta0x7f6250003578) to UDP 192.168.10.191:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.191:5060;rport=5060;received=192.168.10.191;branch=z9hG4bK672828338
Call-ID: 1611555031
From: <sip:34020000001110000001@3402000000.spvmn.cn>;tag=1907213299
To: <sip:34020000002000000001@3402000000.spvmn.cn>;tag=z9hG4bK672828338
CSeq: 20 MESSAGE
Content-Length:  0


--end msg--
13:38:08.351     tdta0x7f6250003578  .Destroying txdata Response msg 200/MESSAGE/cseq=20 (tdta0x7f6250003578)
13:38:08.351      dlg0x7f6250003578  .UAC dialog created
added as dialog usage, data=0x7f6250004968
13:38:08.351      dlg0x7f6250003578  ..Session count inc to 3 by mod-invite
13:38:08.351      dlg0x7f6250003578  .Module mod-100rel added as dialog usage, data=0x7f6250006068
13:38:08.351      dlg0x7f6250003578  .100rel module attached
13:38:08.351      inv0x7f6250003578  .UAC invite session created for dialog dlg0x7f6250003578
INVITE/cseq=2133 (tdta0x7f6250006858) created.
13:38:08.351      inv0x7f6250003578  ..Sending Request msg INVITE/cseq=2133 (tdta0x7f6250006858)
13:38:08.351      dlg0x7f6250003578  ...Sending Request msg INVITE/cseq=2133 (tdta0x7f6250006858)
13:38:08.351      tsx0x7f62500097c8  ....Transaction created for Request msg INVITE/cseq=2132 (tdta0x7f6250006858)
13:38:08.351      tsx0x7f62500097c8  ...Sending Request msg INVITE/cseq=2132 (tdta0x7f6250006858) in state Null
13:38:08.351          sip_resolve.c  ....Target '192.168.10.191:5060' type=Unspecified resolved to '192.168.10.191:5060' type=UDP (UDP transport)
13:38:08.351          pjsip_regesit  ....TX 801 bytes Request msg INVITE/cseq=2132 (tdta0x7f6250006858) to UDP 192.168.10.191:5060:
INVITE sip:34020000001320000001@192.168.10.191:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.116:5061;rport;branch=z9hG4bKPjMuRBU2j.KGSI94O1i7pQoYqcuJnNBdID
Max-Forwards: 70
From: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
To: <sip:34020000001320000001@192.168.10.191>
Contact: <sip:1010@192.168.10.116:5061>
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
CSeq: 2132 INVITE
Allow: INVITE, ACK, BYE, CANCEL, UPDATE
Supported:
Subject: 34020000001320000001:0,1010:0
Content-Type: application/sdp
Content-Length:   259

v=0
o=1010 0 0 IN IP4 192.168.10.116
s=Download
u=34020000001320000001:0
c=IN IP4 192.168.10.116
t=1587484793 1587484794
m=video 2002 RTP/AVP 96 98 97
a=recvonly
a=rtpmap:96 PS/90000
a=rtpmap:98 H264/90000
a=rtpmap:97 MPEG4/90000
y=1340200002
f=

--end msg--
13:38:08.351      tsx0x7f62500097c8  ....State changed from Null to Calling, event=TX_MSG
13:38:08.351      dlg0x7f6250003578  .....Transaction tsx0x7f62500097c8 state changed to Calling
13:38:08.351          pjsip_regesit  ......Call state changed to CALLING
13:38:08.415         sip_endpoint.c  Processing incoming message: Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38)
13:38:08.415          pjsip_regesit  .RX 730 bytes Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38) from UDP 192.168.10.191:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.116:5061;rport=5061;branch=z9hG4bKPjMuRBU2j.KGSI94O1i7pQoYqcuJnNBdID
From: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
To: <sip:34020000001320000001@192.168.10.191>;tag=2115151752
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
CSeq: 2132 INVITE
Contact: <sip:34020000001320000001@192.168.10.191:5060>
Content-Type: application/SDP
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length:   271

v=0
o=34020000001110000001 0 0 IN IP4 192.168.10.191
s=Download
c=IN IP4 192.168.10.191
t=1587513593 1587513594
m=video 62178 RTP/AVP 96
a=sendonly
a=rtpmap:96 PS/90000
a=username:34020000001110000001
a=password:12345678
a=filesize:455469548
y=1340200002
f=

--end msg--
13:38:08.416      tsx0x7f62500097c8  .Incoming Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38) in state Calling
13:38:08.416      tsx0x7f62500097c8  ..State changed from Calling to Terminated, event=RX_MSG
13:38:08.416      dlg0x7f6250003578  ...Received Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38)
13:38:08.416      dlg0x7f6250003578  ....Route-set updated
13:38:08.416      dlg0x7f6250003578  ....Route-set frozen
13:38:08.416      dlg0x7f6250003578  ...Transaction tsx0x7f62500097c8 state changed to Terminated
13:38:08.416          pjsip_regesit  ....Call state changed to CONNECTING
13:38:08.416      inv0x7f6250003578  ....Got SDP answer in Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38)
13:38:08.416      inv0x7f6250003578  ....SDP negotiation done: Success
13:38:08.416                  rtp.c  ....pjmedia_rtp_session_init: ses=0x7f625000c310, default_pt=96, ssrc=0x4fe1d442
13:38:08.416            SIPRTP:2002  ....SO_RCVBUF set to 212992
13:38:08.416            SIPRTP:2002  ....SO_SNDBUF set to 212992
13:38:08.416      inv0x7f6250003578  ....Received Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38), sending ACK
13:38:08.416      inv0x7f6250003578  ....Received Response msg 200/INVITE/cseq=2132 (rdata0x7f6250000f38), notifying application callback
13:38:08.416      inv0x7f6250003578  .....Sending Request msg ACK/cseq=2132 (tdta0x7f625000fd68)
13:38:08.416      dlg0x7f6250003578  ......Sending Request msg ACK/cseq=2132 (tdta0x7f625000fd68)
13:38:08.416          sip_resolve.c  ......Target '192.168.10.191:5060' type=UDP resolved to '192.168.10.191:5060' type=UDP (UDP transport)
发送下行请求帧13:38:08.416          pjsip_regesit  ......TX 687 bytes Request msg ACK/cseq=2132 (tdta0x7f625000fd68) to UDP 192.168.10.191:5060:
ACK sip:34020000001320000001@192.168.10.191:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.116:5061;rport;branch=z9hG4bKPjTyR.hn3zMtTNiHYmNLr3J9bm5TyUGMJu
Max-Forwards: 70
From: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
To: <sip:34020000001320000001@192.168.10.191>;tag=2115151752
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
CSeq: 2132 ACK
Content-Type: application/SDP
Content-Length:   271

v=0
o=34020000001110000001 0 0 IN IP4 192.168.10.191
s=Download
c=IN IP4 192.168.10.191
t=1587513593 1587513594
m=video 62178 RTP/AVP 96
a=sendonly
a=rtpmap:96 PS/90000
a=username:34020000001110000001
a=password:12345678
a=filesize:455469548
y=1340200002
f=

--end msg--
13:38:08.417      tsx0x7f62500097c8  Timeout timer event
13:38:08.417      tsx0x7f62500097c8  .State changed from Terminated to Destroyed, event=TIMER
13:38:08.417      tsx0x7f62500097c8  Transaction destroyed!


Receive PS stream file....................

13:38:09.034         sip_endpoint.c  Processing incoming message: Request msg MESSAGE/cseq=2 (rdata0x7f6250000f38)
13:38:09.034          pjsip_regesit  .RX 658 bytes Request msg MESSAGE/cseq=2 (rdata0x7f6250000f38) from UDP 192.168.10.191:5060:
MESSAGE sip:1010@192.168.10.116:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.191:5060;rport;branch=z9hG4bK774817212
From: <sip:34020000001320000001@192.168.10.191>;tag=2115151752
To: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
CSeq: 2 MESSAGE
Contact: <sip:34020000001320000001@192.168.10.191:5060>
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length:   175

<?xml version="1.0" encoding="gb2312"?>
<Notify>
<CmdType>MediaStatus</CmdType>
<SN>472</SN>
<DeviceID>34020000001320000001</DeviceID>
<NotifyType>121</NotifyType>
</Notify>

--end msg--
13:38:09.034      dlg0x7f6250003578  .Received Request msg MESSAGE/cseq=2 (rdata0x7f6250000f38)
13:38:09.034      tsx0x7f62500097c8  ...Transaction created for Request msg MESSAGE/cseq=2 (rdata0x7f6250000f38)
13:38:09.034      tsx0x7f62500097c8  ..Incoming Request msg MESSAGE/cseq=2 (rdata0x7f6250000f38) in state Null
13:38:09.034      tsx0x7f62500097c8  ...State changed from Null to Trying, event=RX_MSG
13:38:09.034      dlg0x7f6250003578  ....Transaction tsx0x7f62500097c8 state changed to Trying
13:38:09.034      dlg0x7f6250003578  ......Sending Response msg 200/MESSAGE/cseq=2 (tdta0x7f6250012cc8)
13:38:09.034      tsx0x7f62500097c8  ......Sending Response msg 200/MESSAGE/cseq=2 (tdta0x7f6250012cc8) in state Trying
13:38:09.034          pjsip_regesit  .......TX 327 bytes Response msg 200/MESSAGE/cseq=2 (tdta0x7f6250012cc8) to UDP 192.168.10.191:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.191:5060;rport=5060;received=192.168.10.191;branch=z9hG4bK774817212
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
From: <sip:34020000001320000001@192.168.10.191>;tag=2115151752
To: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
CSeq: 2 MESSAGE
Content-Length:  0


--end msg--
13:38:09.034      tsx0x7f62500097c8  .......State changed from Trying to Completed, event=TX_MSG
13:38:09.034      dlg0x7f6250003578  ........Transaction tsx0x7f62500097c8 state changed to Completed
13:38:09.034               endpoint  ......Request msg BYE/cseq=2134 (tdta0x7f6250015c28) created.
13:38:09.034      inv0x7f6250003578  ......Sending Request msg BYE/cseq=2134 (tdta0x7f6250015c28)
13:38:09.034      dlg0x7f6250003578  .......Sending Request msg BYE/cseq=2134 (tdta0x7f6250015c28)
13:38:09.034      tsx0x7f6250016c38  ........Transaction created for Request msg BYE/cseq=2133 (tdta0x7f6250015c28)
13:38:09.034      tsx0x7f6250016c38  .......Sending Request msg BYE/cseq=2133 (tdta0x7f6250015c28) in state Null
13:38:09.034          sip_resolve.c  ........Target '192.168.10.191:5060' type=UDP resolved to '192.168.10.191:5060' type=UDP (UDP transport)
13:38:09.034          pjsip_regesit  ........TX 382 bytes Request msg BYE/cseq=2133 (tdta0x7f6250015c28) to UDP 192.168.10.191:5060:
BYE sip:34020000001320000001@192.168.10.191:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.116:5061;rport;branch=z9hG4bKPjhp3nPiJRk4MOfpmVQZR8ub3XBdE36l3A
Max-Forwards: 70
From: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
To: <sip:34020000001320000001@192.168.10.191>;tag=2115151752
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
CSeq: 2133 BYE
Content-Length:  0


--end msg--
13:38:09.034      tsx0x7f6250016c38  ........State changed from Null to Calling, event=TX_MSG
13:38:09.034      dlg0x7f6250003578  .........Transaction tsx0x7f6250016c38 state changed to Calling
13:38:09.036         sip_endpoint.c  Processing incoming message: Response msg 200/BYE/cseq=2133 (rdata0x7f6250000f38)
13:38:09.036          pjsip_regesit  .RX 364 bytes Response msg 200/BYE/cseq=2133 (rdata0x7f6250000f38) from UDP 192.168.10.191:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.116:5061;rport=5061;branch=z9hG4bKPjhp3nPiJRk4MOfpmVQZR8ub3XBdE36l3A
From: <sip:1010@192.168.10.116>;tag=yhIZQG-du1TsYkW1MPmX6L5Vz0KD2mdI
To: <sip:34020000001320000001@192.168.10.191>;tag=2115151752
Call-ID: xOTBIMg2pPgKOBdDB3SowCcfiNeUsXjd
CSeq: 2133 BYE
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 0


--end msg--
13:38:09.036      tsx0x7f6250016c38  .Incoming Response msg 200/BYE/cseq=2133 (rdata0x7f6250000f38) in state Calling
13:38:09.036      tsx0x7f6250016c38  ..State changed from Calling to Completed, event=RX_MSG
13:38:09.036      dlg0x7f6250003578  ...Received Response msg 200/BYE/cseq=2133 (rdata0x7f6250000f38)
13:38:09.036      dlg0x7f6250003578  ...Transaction tsx0x7f6250016c38 state changed to Completed
13:38:09.036          pjsip_regesit  ....Call state changed to DISCONNCTD
13:38:09.036     tdta0x7f625000fd68  ....Destroying txdata Request msg ACK/cseq=2132 (tdta0x7f625000fd68)
13:38:09.036     tdta0x7f6250006858  ....Destroying txdata Request msg INVITE/cseq=2132 (tdta0x7f6250006858)
13:38:09.036      dlg0x7f6250003578  .....Session count dec to 2 by mod-invite
Segmentation fault (core dumped)




The above log is the complete registration, the process of requesting to download the history file from NVR of Hikvision。

The log clearly shows that I have completed the request------download file----BYE process, but when the pjsip system is scheduled, a very serious segmentation error occurs.

I want to know where the segfault is.
...