一次完整的通话过程SIP报文分析
场景:
主叫方(1004,Yate客户端,端口号:52110) -> 通过FreeSWITCH(端口号:5070)呼叫 -> 被叫方(1000,ZoIPer客户端,端口号:5070)
被叫方经历:振铃->(N秒后)接听->正常通话一段时间后->挂断电话。
注:主叫、被叫、FreeSWITCH均在同1个机器(mac本上)

为了方便分析SIP报文,有2种方法:
1、freeswitch开启sip报文debug
sofia profile internal siptrace on
freeswitch控制台上,输入上述命令,即可开始记录SIP报文,上述通话过程,输出的报文日志如下(注:为了方便查看,每段报文手动加了序号)
1-> recv 903 bytes from udp/[192.168.7.101]:52110 at 20:07:57.811303:
------------------------------------------------------------------------
INVITE sip:1000@192.168.7.101 SIP/2.0
Max-Forwards: 20
Via: SIP/2.0/UDP 192.168.7.101:52110;rport;branch=z9hG4bK1749195434
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>
Call-ID: 1808150176@192.168.7.101
CSeq: 5 INVITE
User-Agent: YATE/5.5.0
Contact: <sip:1004@192.168.7.101:52110>
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO
Content-Type: application/sdp
Content-Length: 483 v=0
o=yate 1621771677 1621771677 IN IP4 192.168.7.101
s=SIP Call
c=IN IP4 192.168.7.101
t=0 0
m=audio 20902 RTP/AVP 0 8 11 98 97 102 103 104 105 106 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:11 L16/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:102 SPEEX/8000
a=rtpmap:103 SPEEX/16000
a=rtpmap:104 SPEEX/32000
a=rtpmap:105 iSAC/16000
a=rtpmap:106 iSAC/32000
a=rtpmap:101 telephone-event/8000
a=ptime:30
2021-05-23 20:07:57.808015 [NOTICE] switch_channel.c:1118 New Channel sofia/internal/1004@192.168.7.101 [e343d2cb-fef0-4f00-b83d-743a9b05b6f0] 2 -> send 802 bytes to udp/[192.168.7.101]:52110 at 20:07:57.814089:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.7.101:52110;rport=52110;branch=z9hG4bK1749195434
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>;tag=4c1tpQSFK9t3D
Call-ID: 1808150176@192.168.7.101
CSeq: 5 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="192.168.7.101", nonce="cf2b5f97-bf80-4637-9a38-5b5807386f0b", algorithm=MD5, qop="auth"
Content-Length: 0 3 -> recv 351 bytes from udp/[192.168.7.101]:52110 at 20:07:57.833718:
------------------------------------------------------------------------
ACK sip:1000@192.168.7.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.7.101:52110;rport;branch=z9hG4bK1749195434
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>;tag=4c1tpQSFK9t3D
Call-ID: 1808150176@192.168.7.101
CSeq: 5 ACK
Max-Forwards: 20
Contact: <sip:1004@192.168.7.101:52110>
User-Agent: YATE/5.5.0
Content-Length: 0 4 -> recv 1173 bytes from udp/[192.168.7.101]:52110 at 20:07:57.833904:
------------------------------------------------------------------------
INVITE sip:1000@192.168.7.101 SIP/2.0
Max-Forwards: 20
Via: SIP/2.0/UDP 192.168.7.101:52110;rport;branch=z9hG4bK1194732859
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>
Call-ID: 1808150176@192.168.7.101
User-Agent: YATE/5.5.0
Contact: <sip:1004@192.168.7.101:52110>
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO
CSeq: 6 INVITE
Proxy-Authorization: Digest username="1004", realm="192.168.7.101", nonce="cf2b5f97-bf80-4637-9a38-5b5807386f0b", uri="sip:1000@192.168.7.101", response="1318d10a492939a03eda60e7f0e9deed", algorithm=MD5, qop=auth, nc=0000000c, cnonce="5c5fdd612beb705f0cb01343ff044de7"
Content-Type: application/sdp
Content-Length: 483 v=0
o=yate 1621771677 1621771677 IN IP4 192.168.7.101
s=SIP Call
c=IN IP4 192.168.7.101
t=0 0
m=audio 20902 RTP/AVP 0 8 11 98 97 102 103 104 105 106 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:11 L16/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:102 SPEEX/8000
a=rtpmap:103 SPEEX/16000
a=rtpmap:104 SPEEX/32000
a=rtpmap:105 iSAC/16000
a=rtpmap:106 iSAC/32000
a=rtpmap:101 telephone-event/8000
a=ptime:30
2021-05-23 20:07:57.848628 [INFO] mod_dialplan_xml.c:637 Processing 1004 <1004>->1000 in context default 5 -> send 298 bytes to udp/[192.168.7.101]:52110 at 20:07:57.855169:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.7.101:52110;rport=52110;branch=z9hG4bK1194732859
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>
Call-ID: 1808150176@192.168.7.101
CSeq: 6 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Content-Length: 0 EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 log(CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING )
2021-05-23 20:07:57.848628 [CRIT] mod_dptools.c:1866 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 log(CRIT Open /usr/local/freeswitch/conf/vars.xml and change the default_password.)
2021-05-23 20:07:57.848628 [CRIT] mod_dptools.c:1866 Open /usr/local/freeswitch/conf/vars.xml and change the default_password.
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 log(CRIT Once changed type 'reloadxml' at the console.)
2021-05-23 20:07:57.848628 [CRIT] mod_dptools.c:1866 Once changed type 'reloadxml' at the console.
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 log(CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING )
2021-05-23 20:07:57.848628 [CRIT] mod_dptools.c:1866 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 sleep(10000)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-spymap/1004/e343d2cb-fef0-4f00-b83d-743a9b05b6f0)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-last_dial/1004/1000)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-last_dial/global/e343d2cb-fef0-4f00-b83d-743a9b05b6f0)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 export(RFC2822_DATE=Sun, 23 May 2021 20:08:06 +0800)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 export(dialed_extension=1000)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 bind_meta_app(1 b s execute_extension::dx XML features)
2021-05-23 20:08:06.698015 [INFO] switch_ivr_async.c:4465 Bound B-Leg: *1 execute_extension::dx XML features
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 bind_meta_app(2 b s record_session::/usr/local/freeswitch/recordings/1004.2021-05-23-20-08-06.wav)
2021-05-23 20:08:06.698015 [INFO] switch_ivr_async.c:4465 Bound B-Leg: *2 record_session::/usr/local/freeswitch/recordings/1004.2021-05-23-20-08-06.wav
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 bind_meta_app(3 b s execute_extension::cf XML features)
2021-05-23 20:08:06.698015 [INFO] switch_ivr_async.c:4465 Bound B-Leg: *3 execute_extension::cf XML features
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 bind_meta_app(4 b s execute_extension::att_xfer XML features)
2021-05-23 20:08:06.698015 [INFO] switch_ivr_async.c:4465 Bound B-Leg: *4 execute_extension::att_xfer XML features
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 set(ringback=%(2000,4000,440,480))
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 set(transfer_ringback=local_stream://moh)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 set(call_timeout=30)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 set(hangup_after_bridge=true)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 set(continue_on_fail=true)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-call_return/1000/1004)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-last_dial_ext/1000/e343d2cb-fef0-4f00-b83d-743a9b05b6f0)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 set(called_party_callgroup=techsupport)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-last_dial_ext/techsupport/e343d2cb-fef0-4f00-b83d-743a9b05b6f0)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-last_dial_ext/global/e343d2cb-fef0-4f00-b83d-743a9b05b6f0)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 hash(insert/192.168.7.101-last_dial/techsupport/e343d2cb-fef0-4f00-b83d-743a9b05b6f0)
EXECUTE [depth=0] sofia/internal/1004@192.168.7.101 bridge(user/1000@192.168.7.101)
2021-05-23 20:08:06.698015 [NOTICE] switch_channel.c:1118 New Channel sofia/internal/1000@192.168.7.101:5060 [0c2ec47e-f3a6-4e74-8565-c523b5547d1f]
2021-05-23 20:08:06.708027 [NOTICE] switch_ivr_originate.c:2955 Cannot create outgoing channel of type [error] cause: [USER_NOT_REGISTERED] 6 -> send 1241 bytes to udp/[192.168.7.101]:5060 at 20:08:06.709329:
------------------------------------------------------------------------
INVITE sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5 SIP/2.0
Via: SIP/2.0/UDP 192.168.7.101:5070;rport;branch=z9hG4bKKS6jBryj6cv7c
Max-Forwards: 19
From: "Extension 1004" <sip:1004@192.168.7.101>;tag=6yKctDUpDU78m
To: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>
Call-ID: 5fcdc4bf-3662-123a-9a87-1158c9642285
CSeq: 36332051 INVITE
Contact: <sip:mod_sofia@192.168.7.101:5070>
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 246
X-FS-Support: update_display,send_info
Remote-Party-ID: "Extension 1004" <sip:1004@192.168.7.101>;party=calling;screen=yes;privacy=off v=0
o=FreeSWITCH 1621743220 1621743221 IN IP4 192.168.7.101
s=FreeSWITCH
c=IN IP4 192.168.7.101
t=0 0
m=audio 28466 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:30 7 -> recv 425 bytes from udp/[192.168.7.101]:5060 at 20:08:06.764337:
------------------------------------------------------------------------
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.7.101:5070;rport=5070;branch=z9hG4bKKS6jBryj6cv7c
Contact: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>
To: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>;tag=03fd6964
From: "Extension 1004"<sip:1004@192.168.7.101>;tag=6yKctDUpDU78m
Call-ID: 5fcdc4bf-3662-123a-9a87-1158c9642285
CSeq: 36332051 INVITE
User-Agent: Zoiper rev.1809
Content-Length: 0 2021-05-23 20:08:06.775511 [NOTICE] sofia.c:7412 Ring-Ready sofia/internal/1000@192.168.7.101:5060!
2021-05-23 20:08:06.793301 [INFO] switch_ivr_originate.c:1246 Sending early media
2021-05-23 20:08:06.810398 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/1004@192.168.7.101! 8 -> send 1091 bytes to udp/[192.168.7.101]:52110 at 20:08:06.821167:
------------------------------------------------------------------------
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.7.101:52110;rport=52110;branch=z9hG4bK1194732859
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>;tag=5NtKrjaKgjHpS
Call-ID: 1808150176@192.168.7.101
CSeq: 6 INVITE
Contact: <sip:1000@192.168.7.101:5070;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 222
Remote-Party-ID: "1000" <sip:1000@192.168.7.101>;party=calling;privacy=off;screen=no v=0
o=FreeSWITCH 1621743230 1621743231 IN IP4 192.168.7.101
s=FreeSWITCH
c=IN IP4 192.168.7.101
t=0 0
m=audio 28456 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:30
2021-05-23 20:08:07.618015 [WARNING] switch_core_media.c:3192 [CBR]: Asynchronous PTIME not supported, changing our end from 30 to 20 9 -> recv 840 bytes from udp/[192.168.7.101]:5060 at 20:08:21.972451:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.7.101:5070;rport=5070;branch=z9hG4bKKS6jBryj6cv7c
Contact: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>
To: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>;tag=03fd6964
From: "Extension 1004"<sip:1004@192.168.7.101>;tag=6yKctDUpDU78m
Call-ID: 5fcdc4bf-3662-123a-9a87-1158c9642285
CSeq: 36332051 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO
Content-Type: application/sdp
User-Agent: Zoiper rev.1809
Content-Length: 306 v=0
o=Z 0 0 IN IP4 192.168.7.101
s=Z
c=IN IP4 192.168.7.101
t=0 0
m=audio 8000 RTP/AVP 0 3 110 98 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=30
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv 10 -> send 432 bytes to udp/[192.168.7.101]:5060 at 20:08:21.975783:
------------------------------------------------------------------------
ACK sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5 SIP/2.0
Via: SIP/2.0/UDP 192.168.7.101:5070;rport;branch=z9hG4bKm2ZBDKFp3Njtr
Max-Forwards: 70
From: "Extension 1004" <sip:1004@192.168.7.101>;tag=6yKctDUpDU78m
To: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>;tag=03fd6964
Call-ID: 5fcdc4bf-3662-123a-9a87-1158c9642285
CSeq: 36332051 ACK
Contact: <sip:mod_sofia@192.168.7.101:5070>
Content-Length: 0 2021-05-23 20:08:21.978841 [NOTICE] sofia.c:8479 Channel [sofia/internal/1000@192.168.7.101:5060] has been answered
11 -> send 1061 bytes to udp/[192.168.7.101]:52110 at 20:08:22.005595:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.7.101:52110;rport=52110;branch=z9hG4bK1194732859
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>;tag=5NtKrjaKgjHpS
Call-ID: 1808150176@192.168.7.101
CSeq: 6 INVITE
Contact: <sip:1000@192.168.7.101:5070;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 222
Remote-Party-ID: "Outbound Call" <sip:1000@192.168.7.101>;party=calling;privacy=off;screen=no v=0
o=FreeSWITCH 1621743230 1621743231 IN IP4 192.168.7.101
s=FreeSWITCH
c=IN IP4 192.168.7.101
t=0 0
m=audio 28456 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:30
2021-05-23 20:08:21.998639 [NOTICE] switch_ivr_originate.c:3751 Channel [sofia/internal/1004@192.168.7.101] has been answered 12 -> recv 639 bytes from udp/[192.168.7.101]:52110 at 20:08:22.012161:
------------------------------------------------------------------------
ACK sip:1000@192.168.7.101:5070;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.7.101:52110;rport;branch=z9hG4bK411043961
From: <sip:1004@192.168.7.101>;tag=106736978
To: <sip:1000@192.168.7.101>;tag=5NtKrjaKgjHpS
Call-ID: 1808150176@192.168.7.101
CSeq: 6 ACK
Max-Forwards: 20
Contact: <sip:1004@192.168.7.101:52110>
Proxy-Authorization: Digest username="1004", realm="192.168.7.101", nonce="cf2b5f97-bf80-4637-9a38-5b5807386f0b", uri="sip:1000@192.168.7.101", response="1318d10a492939a03eda60e7f0e9deed", algorithm=MD5, qop=auth, nc=0000000c, cnonce="5c5fdd612beb705f0cb01343ff044de7"
User-Agent: YATE/5.5.0
Content-Length: 0 2021-05-23 20:08:22.258073 [WARNING] switch_core_media.c:3192 [CBR]: Asynchronous PTIME not supported, changing our end from 30 to 20 13 -> recv 476 bytes from udp/[192.168.7.101]:5060 at 20:08:47.008280:
------------------------------------------------------------------------
BYE sip:mod_sofia@192.168.7.101:5070 SIP/2.0
Via: SIP/2.0/UDP 192.168.7.101:5060;branch=z9hG4bK-d8754z-1ad0fd1d257abc86-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>
To: "Extension 1004"<sip:1004@192.168.7.101>;tag=6yKctDUpDU78m
From: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>;tag=03fd6964
Call-ID: 5fcdc4bf-3662-123a-9a87-1158c9642285
CSeq: 2 BYE
User-Agent: Zoiper rev.1809
Content-Length: 0 2021-05-23 20:08:47.018016 [NOTICE] sofia.c:1089 Hangup sofia/internal/1000@192.168.7.101:5060 [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING] 14 -> send 536 bytes to udp/[192.168.7.101]:5060 at 20:08:47.020434:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.7.101:5060;branch=z9hG4bK-d8754z-1ad0fd1d257abc86-1---d8754z-;rport=5060
From: <sip:1000@192.168.7.101:5060;rinstance=00eb482b7d4631f5>;tag=03fd6964
To: "Extension 1004"<sip:1004@192.168.7.101>;tag=6yKctDUpDU78m
Call-ID: 5fcdc4bf-3662-123a-9a87-1158c9642285
CSeq: 2 BYE
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Content-Length: 0 2021-05-23 20:08:47.038076 [NOTICE] switch_ivr_bridge.c:1947 Hangup sofia/internal/1004@192.168.7.101 [CS_EXECUTE] [NORMAL_CLEARING]
2021-05-23 20:08:47.038076 [NOTICE] switch_core_session.c:1744 Session 9 (sofia/internal/1000@192.168.7.101:5060) Ended
2021-05-23 20:08:47.038076 [NOTICE] switch_core_session.c:1748 Close Channel sofia/internal/1000@192.168.7.101:5060 [CS_DESTROY] 15 -> send 547 bytes to udp/[192.168.7.101]:52110 at 20:08:47.051274:
------------------------------------------------------------------------
BYE sip:1004@192.168.7.101:52110 SIP/2.0
Via: SIP/2.0/UDP 192.168.7.101:5070;rport;branch=z9hG4bKNBS4ee0S0y8cm
Max-Forwards: 70
From: <sip:1000@192.168.7.101>;tag=5NtKrjaKgjHpS
To: <sip:1004@192.168.7.101>;tag=106736978
Call-ID: 1808150176@192.168.7.101
CSeq: 36332071 BYE
User-Agent: FreeSWITCH-mod_sofia/1.10.2-release~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Reason: Q.850;cause=16;text="NORMAL_CLEARING"
Content-Length: 0 2021-05-23 20:08:47.058169 [NOTICE] switch_core_session.c:1744 Session 8 (sofia/internal/1004@192.168.7.101) Ended
2021-05-23 20:08:47.058169 [NOTICE] switch_core_session.c:1748 Close Channel sofia/internal/1004@192.168.7.101 [CS_DESTROY] 16 -> recv 309 bytes from udp/[192.168.7.101]:52110 at 20:08:47.085929:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.7.101:5070;rport=5070;branch=z9hG4bKNBS4ee0S0y8cm;received=192.168.7.101
From: <sip:1000@192.168.7.101>;tag=5NtKrjaKgjHpS
To: <sip:1004@192.168.7.101>;tag=106736978
Call-ID: 1808150176@192.168.7.101
CSeq: 36332071 BYE
Server: YATE/5.5.0
Content-Length: 0 17 -> recv 409 bytes from udp/[192.168.7.101]:52110 at 20:08:47.116921:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.7.101:5070;rport=5070;branch=z9hG4bKNBS4ee0S0y8cm;received=192.168.7.101
From: <sip:1000@192.168.7.101>;tag=5NtKrjaKgjHpS
To: <sip:1004@192.168.7.101>;tag=106736978
Call-ID: 1808150176@192.168.7.101
CSeq: 36332071 BYE
P-RTP-Stat: PS=1986,OS=317760,PR=1987,OR=319520,PL=887
Server: YATE/5.5.0
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO
Content-Length: 0
2、采用wireshark抓包

共17条SIP报文。
梳理成时序图如下:

上图中,每1条最后的“-xx秒”,是根据wireshark中抓包截图中的Time列填上的,代表开始抓包后的第N秒截取到的包,从时间和CSeq大致可以看出来:
1-5 为主叫发起呼叫阶段
6-8 为被叫振铃阶段
9-12 为应答通话阶段
13-17 为挂断阶段
一次完整的通话过程SIP报文分析的更多相关文章
- Asterisk 通话过程中执行动作(即applicationmap )的使用方法和电话转会议的实现
asterisk在正常通话过程中执行拨号计划中动作是通过feature.conf中的[applicationmap ]下定义的,举例如下: nway-start => *0,callee,M ...
- 【转】android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创)
原文网址:http://www.cnblogs.com/zdz8207/archive/2012/11/27/android-ndk-install.html android 最新 NDK r8 在w ...
- android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创)
android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创) 一直想搞NDK开发却一直给其他事情耽搁了,参考了些网上的资料今天终于把 ...
- 使用mingw编译完整Qt5的过程(使用了niXman的msys套装)good
使用mingw编译完整Qt5的过程 坛子里似乎已经有人编译出Qt5了,不过大多有问题,不是缺少opengl就是缺少openssl,还有缺少webkit的,本文提供的仍然不能说是绝对完整的,不过相对以前 ...
- 一次http完整的请求tcp报文分析
一次http请求的报文分析 数据包如下: 第一个包113.31的主机(下边称之为客户端)给114.80的主机(下边称之为服务器)发送一个syn包请求建立连接 第二个包服务器回复客户端syn+ack表示 ...
- SIP协议分析
- SIP流程 一个标准的SIP通话流程如下: 1. A向B发送一个INVITE消息,邀请B通话. 2.B振铃,向A回复一个RING消息,通知A振铃中,A等待. 3.B提机,向A发一个OK消息, 通 ...
- Wireshark安装使用及报文分析(图文详解)
Wireshark是世界上最流行的网络分析工具.这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息.与很多其他网络工具一样,Wireshark也使用pcapnetwork l ...
- HTTP 请求报文和响应报文分析和解刨!!
http请求和响应报文分析 一>http请求报文主要包括三个部分:1.请求行:2.请求头:3;请求体: 1,请求行一般包括三个部分:请求方式:请求url : http协议版本. 请求方法:大部分 ...
- http协议请求报文与响应报文分析
什么是HTTP协议: HTTP是一个属于应用层的面向对象的协议,由于其简捷.快速的方式,适用于分布式超媒体信息系统.它于1990年提出,经过几年的使用与发展,得到 不断地完善和扩展.目前在WWW中使用 ...
- CANas分析软件,DBC文件解析,CAN报文分析,仿CANoe曲线显示
2023.01.01:增加对Kvaser的支持参考了CANoe写了下面的软件,主要用途是对报文的回放及曲线的分析. 1.CAN连接,支持周立功CAN.CANFD及PCAN 2.DBC解析与生成文件 打 ...
随机推荐
- System Integrity Protection (SIP) iOS10.15安装软件提示文件损坏问题解决方法
方法如下:1.开机的时候立即按住command+R 组合键不要放手,直到进度条加载完才松手,进入到系统恢复工具界面 2. 然后点击"实用工具"选项卡中的"终端" ...
- 【记录】PR使用技巧记录
@ 目录 [PR最重要的两个操作] 一.关键帧 1. 如何设置关键帧? 2. 应用实例 1)1s内视频从明变暗 2)1s内视频画面由大到小 二.入点.出点 [其他] PR批量调整视频效果 PR剪视频片 ...
- 关于C#的Dynamic调用方法前的一些准备的小Demo
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.Linq; us ...
- Django-debug-toolbar配置流程及主要事项
配置流程 大概的配置流程官网上已经很清楚了,主要注意的有2点:(1)'JQUERY_URL'的配置(建议)(2)debug=True模式下的template必须包含closing的(必须).下面简要介 ...
- 用QT、QImage来制作简单图像处理工具
用QT.QImage来制作简单图像处理工具 源码地址: https://github.com/dependon/simple-image-filter 下载地址(windows版本) github 下 ...
- Windows查看连接过的wifi的密码和生成二维码
打开CMD 可按WIN+R打开运行,输入cmd然后回车 查看连接过的wifi列表 输入命令:netsh wlan show profiles 结果: C:\Users\daen>netsh wl ...
- vue中使用axios获取到的Promise {<pending>}数据,无法使用的问题
使用axios拿到后端数据后 返回的是 Promise {} 我们可以看到数据是在[[PromiseResult]]这个Object对象中 此时我们是无法获取对象的 解决方法:使用async和awai ...
- python开发之路【第二章】:python简介和入门
Python简介 python起源到广泛应用 Python 由吉多・范罗苏姆(Guido van Rossum)缔造.1989 年圣诞季,身处阿姆斯特丹的他,为了打发闲暇时光,决定开发一款新脚本解释程 ...
- 开源交流丨批流一体数据集成工具ChunJun同步Hive事务表原理详解及实战分享
原文链接:批流一体数据集成工具ChunJun同步Hive事务表原理详解及实战分享 课件获取:关注公众号__ "数栈研习社",后台私信 "ChengYing"__ ...
- SpringMVC三层结构
Java SpringMVC的工程结构一般来说分为三层,自下而上是Modle层(模型,数据访问层).Cotroller层(控制,逻辑控制层).View层(视图,页面显示层),其中Modle层分为两层: ...