一次完整的通话过程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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | 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 为挂断阶段
作者:菩提树下的杨过
出处:http://yjmyzz.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
出处:http://yjmyzz.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步