sip学习--邀请流程

1000(192.168.1.119)              1001(192.168.1.112)
|                                                     |
|    INVITE                                     |
|    ------------------------------>           |
|    100 Trying                                |
|    <------------------------------           |
|    180 Ringing                              |
|     <------------------------------           |
|    200 OK                                     |
|    <-------------------------------          |
|    ACK                                          |
|    ------------------------------->          |
|                                                     |
|    <---RTP--------------------->         |
|    <---RTP--------------------->         |
|    <---RTP--------------------->         |
|    ...                                              |
|                                                     |
|    BYE                                          |
|    <-------------------------------          |
|    200 OK                                     |
|    -------------------------------->         |
|                                                     |

 


/1000-->INVITE-->Server

U 192.168.1.119:34308 -> 192.168.1.88:5060
INVITE sip:1001@192.168.1.88 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport;branch=z9hG4bK1735896405.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>.
Call-ID: 768170422.
CSeq: 20 INVITE.
Contact: <sip:1000@192.168.1.119:34308>.
Content-Type: application/sdp.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Subject: Phone call.
Content-Length:   503.
.
v=0.
o=1000 2317 3462 IN IP4 114.255.88.22.
s=Talk.
c=IN IP4 114.255.88.22.
b=AS:380.
t=0 0.
m=audio 44473 RTP/AVP 120 111 110 0 8 104 100 3 101.
a=rtpmap:120 SILK/16000.
a=rtpmap:111 speex/16000.
a=fmtp:111 vbr=on.
a=rtpmap:110 speex/8000.
a=fmtp:110 vbr=on.
a=rtpmap:104 AMR/8000.
a=fmtp:104 octet-align=1.
a=rtpmap:100 iLBC/8000.
a=fmtp:100 mode=30.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
a=rtcp:7079 IN IP4 192.168.1.119.
m=video 16420 RTP/AVP 103.
a=rtpmap:103 VP8/90000.
a=rtcp:9079.

/Server-->407 Proxy Authentication Required-->1000
#
U 192.168.1.88:5060 -> 192.168.1.119:34308
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1735896405.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=b27e1a1d33761e85846fc98f5f3a7e58.2eec.
Call-ID: 768170422.
CSeq: 20 INVITE.
Proxy-Authenticate: Digest realm="192.168.1.88", nonce="Uc1zLFHNcgDco99Y6IeY77vT8cUEd3V3".
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.
.

/1000-->ACK-->Server
#
U 192.168.1.119:34308 -> 192.168.1.88:5060
ACK sip:1001@192.168.1.88 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport;branch=z9hG4bK1735896405.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=b27e1a1d33761e85846fc98f5f3a7e58.2eec.
Call-ID: 768170422.
CSeq: 20 ACK.
Content-Length: 0.
.

/1000-->INVITE-->Server
#
U 192.168.1.119:34308 -> 192.168.1.88:5060
INVITE sip:1001@192.168.1.88 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport;branch=z9hG4bK1699620867.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1000@192.168.1.119:34308>.
Proxy-Authorization: Digest username="1000", realm="192.168.1.88", nonce="Uc1zLFHNcgDco99Y6IeY77vT8cUEd3V3", uri="sip:1001@192.168.1.88", response="5f3854ac9b61ab7ec8c01c1bb4dd4082", algorithm=MD5.
Content-Type: application/sdp.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Subject: Phone call.
Content-Length:   503.
.
v=0.
o=1000 2317 3462 IN IP4 114.255.88.22.
s=Talk.
c=IN IP4 114.255.88.22.
b=AS:380.
t=0 0.
m=audio 44473 RTP/AVP 120 111 110 0 8 104 100 3 101.
a=rtpmap:120 SILK/16000.
a=rtpmap:111 speex/16000.
a=fmtp:111 vbr=on.
a=rtpmap:110 speex/8000.
a=fmtp:110 vbr=on.
a=rtpmap:104 AMR/8000.
a=fmtp:104 octet-align=1.
a=rtpmap:100 iLBC/8000.
a=fmtp:100 mode=30.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
a=rtcp:7079 IN IP4 192.168.1.119.
m=video 16420 RTP/AVP 103.
a=rtpmap:103 VP8/90000.
a=rtcp:9079.

/Server-->100 Trying-->1000
#
U 192.168.1.88:5060 -> 192.168.1.119:34308
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>.
Call-ID: 768170422.
CSeq: 21 INVITE.
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.
.

/Server-->INVITE-->1001
#
U 192.168.1.88:5060 -> 192.168.1.112:5060
INVITE sip:1001@192.168.1.112;line=a99bbc8e3e5e611 SIP/2.0.
Record-Route: <sip:192.168.1.88;lr=on>.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1000@192.168.1.119:34308>.
Content-Type: application/sdp.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Max-Forwards: 16.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Subject: Phone call.
Content-Length:   503.
.
v=0.
o=1000 2317 3462 IN IP4 114.255.88.22.
s=Talk.
c=IN IP4 114.255.88.22.
b=AS:380.
t=0 0.
m=audio 44473 RTP/AVP 120 111 110 0 8 104 100 3 101.
a=rtpmap:120 SILK/16000.
a=rtpmap:111 speex/16000.
a=fmtp:111 vbr=on.
a=rtpmap:110 speex/8000.
a=fmtp:110 vbr=on.
a=rtpmap:104 AMR/8000.
a=fmtp:104 octet-align=1.
a=rtpmap:100 iLBC/8000.
a=fmtp:100 mode=30.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
a=rtcp:7079 IN IP4 192.168.1.119.
m=video 16420 RTP/AVP 103.
a=rtpmap:103 VP8/90000.
a=rtcp:9079.

/Server-->INVITE-->1001
#
U 192.168.1.88:5060 -> 192.168.1.112:5060
INVITE sip:1001@192.168.1.112;line=6aea0c5f6333c41 SIP/2.0.
Record-Route: <sip:192.168.1.88;lr=on>.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.1.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1000@192.168.1.119:34308>.
Content-Type: application/sdp.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Max-Forwards: 16.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Subject: Phone call.
Content-Length:   503.
.
v=0.
o=1000 2317 3462 IN IP4 114.255.88.22.
s=Talk.
c=IN IP4 114.255.88.22.
b=AS:380.
t=0 0.
m=audio 44473 RTP/AVP 120 111 110 0 8 104 100 3 101.
a=rtpmap:120 SILK/16000.
a=rtpmap:111 speex/16000.
a=fmtp:111 vbr=on.
a=rtpmap:110 speex/8000.
a=fmtp:110 vbr=on.
a=rtpmap:104 AMR/8000.
a=fmtp:104 octet-align=1.
a=rtpmap:100 iLBC/8000.
a=fmtp:100 mode=30.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
a=rtcp:7079 IN IP4 192.168.1.119.
m=video 16420 RTP/AVP 103.
a=rtpmap:103 VP8/90000.
a=rtcp:9079.

/1001-->100 Trying-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>.
Call-ID: 768170422.
CSeq: 21 INVITE.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/1001-->101 Dialog Establishement-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
SIP/2.0 101 Dialog Establishement.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
Record-Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1001@192.168.1.112:5060>.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/1001-->404 Not Found-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
SIP/2.0 404 Not Found.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.1.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=18467.
Call-ID: 768170422.
CSeq: 21 INVITE.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/Server-->ACK-->1001
#
U 192.168.1.88:5060 -> 192.168.1.112:5060
ACK sip:1001@192.168.1.112;line=6aea0c5f6333c41 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.1.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=18467.
Call-ID: 768170422.
CSeq: 21 ACK.
Max-Forwards: 16.
Content-Length: 0.
.

/Server-->101 Dialog Establishement-->1000
#
U 192.168.1.88:5060 -> 192.168.1.119:34308
SIP/2.0 101 Dialog Establishement.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
Record-Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1001@192.168.1.112:5060>.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/1001-->OPTIONS-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
OPTIONS sip:1000@192.168.1.88 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.112:5060;rport;branch=z9hG4bK14574.
From: <sip:1001@192.168.1.88>;tag=6308.
To: <sip:1000@192.168.1.88>.
Call-ID: 9633.
CSeq: 20 OPTIONS.
Accept: application/sdp.
Max-Forwards: 70.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/Server-->407 Proxy Authentication Required-->1001
#
U 192.168.1.88:5060 -> 192.168.1.112:5060
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 192.168.1.112:5060;rport=5060;branch=z9hG4bK14574.
From: <sip:1001@192.168.1.88>;tag=6308.
To: <sip:1000@192.168.1.88>;tag=b27e1a1d33761e85846fc98f5f3a7e58.7679.
Call-ID: 9633.
CSeq: 20 OPTIONS.
Proxy-Authenticate: Digest realm="192.168.1.88", nonce="Uc1zLVHNcgHi878xjXYDM8ev5Fm+HVH4".
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.
.

/1001-->407 180 Ringing-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
Record-Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1001@192.168.1.112:5060>.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/Server-->407 180 Ringing-->1000
#
U 192.168.1.88:5060 -> 192.168.1.119:34308
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
Record-Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1001@192.168.1.112:5060>.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/1001-->200 OK-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK489f.b6c1ec97.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
Record-Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1001@192.168.1.112>.
Content-Type: application/sdp.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length:   207.
.
v=0.
o=1001 1188 861 IN IP4 192.168.1.112.
s=Talk.
c=IN IP4 192.168.1.112.
t=0 0.
m=audio 0 RTP/AVP 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 9078 RTP/AVP 103.
a=rtpmap:103 VP8/90000.


/Server-->200 OK-->1000
#
U 192.168.1.88:5060 -> 192.168.1.119:34308
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1699620867.
Record-Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 INVITE.
Contact: <sip:1001@192.168.1.112>.
Content-Type: application/sdp.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length:   207.
.
v=0.
o=1001 1188 861 IN IP4 192.168.1.112.
s=Talk.
c=IN IP4 192.168.1.112.
t=0 0.
m=audio 0 RTP/AVP 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.
m=video 9078 RTP/AVP 103.
a=rtpmap:103 VP8/90000.

/1000-->ACK-->Server
#
U 192.168.1.119:34308 -> 192.168.1.88:5060
ACK sip:1001@192.168.1.112 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport;branch=z9hG4bK1059414352.
Route: <sip:192.168.1.88;lr=on>.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 ACK.
Contact: <sip:1000@192.168.1.119:34308>.
Proxy-Authorization: Digest username="1000", realm="192.168.1.88", nonce="Uc1zLFHNcgDco99Y6IeY77vT8cUEd3V3", uri="sip:1001@192.168.1.88", response="5f3854ac9b61ab7ec8c01c1bb4dd4082", algorithm=MD5.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/Server-->ACK-->1001
#
U 192.168.1.88:5060 -> 192.168.1.112:5060
ACK sip:1001@192.168.1.112 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bKcydzigwkX.
Via: SIP/2.0/UDP 192.168.1.119:34308;rport=34308;branch=z9hG4bK1059414352.
From: <sip:1000@192.168.1.88>;tag=963256715.
To: <sip:1001@192.168.1.88>;tag=41.
Call-ID: 768170422.
CSeq: 21 ACK.
Contact: <sip:1000@192.168.1.119:34308>.
Proxy-Authorization: Digest username="1000", realm="192.168.1.88", nonce="Uc1zLFHNcgDco99Y6IeY77vT8cUEd3V3", uri="sip:1001@192.168.1.88", response="5f3854ac9b61ab7ec8c01c1bb4dd4082", algorithm=MD5.
Max-Forwards: 16.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Content-Length: 0.
.

 

挂断
/1001-->BYE-->Server
#
U 192.168.1.112:5060 -> 192.168.1.88:5060
BYE sip:1000@192.168.1.119:34308 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.112:5060;rport;branch=z9hG4bK24657.
Route: <sip:192.168.1.88;lr=on>.
From: <sip:1001@192.168.1.88>;tag=41.
To: <sip:1000@192.168.1.88>;tag=963256715.
Call-ID: 768170422.
CSeq: 2 BYE.
Contact: <sip:1001@192.168.1.112:5060>.
Max-Forwards: 70.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/Server-->BYE-->1000
#
U 192.168.1.88:5060 -> 192.168.1.119:34308
BYE sip:1000@192.168.1.119:34308 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK935c.67a7a982.0.
Via: SIP/2.0/UDP 192.168.1.112:5060;rport=5060;branch=z9hG4bK24657.
From: <sip:1001@192.168.1.88>;tag=41.
To: <sip:1000@192.168.1.88>;tag=963256715.
Call-ID: 768170422.
CSeq: 2 BYE.
Contact: <sip:1001@192.168.1.112:5060>.
Max-Forwards: 16.
User-Agent: Linphone/3.6.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/1000-->200 OK-->Server
#
U 192.168.1.119:34308 -> 192.168.1.88:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.88;branch=z9hG4bK935c.67a7a982.0.
Via: SIP/2.0/UDP 192.168.1.112:5060;rport=5060;branch=z9hG4bK24657.
From: <sip:1001@192.168.1.88>;tag=41.
To: <sip:1000@192.168.1.88>;tag=963256715.
Call-ID: 768170422.
CSeq: 2 BYE.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Content-Length: 0.
.

/Server-->BYE-->1001
#
U 192.168.1.88:5060 -> 192.168.1.112:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.112:5060;rport=5060;branch=z9hG4bK24657.
From: <sip:1001@192.168.1.88>;tag=41.
To: <sip:1000@192.168.1.88>;tag=963256715.
Call-ID: 768170422.
CSeq: 2 BYE.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Content-Length: 0.

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

linyu19872008

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值