6、BYE消息
1)头字段填写说明
必选头域如下:
Call-id
Cseq
From
To
Max-Forwards
Via
常用可选头域:
Content-Length
Content-Type
Route
Reason
2)消息实例
本实例笔者在本机(192.168.2.161)上注册了17899998888号码,呼叫01062230001号码时发送INVITE消息给服务器(192.168.2.89)的软交换,并与呼叫的号码建立通话后,主叫方主动挂断时,BYE消息如下所示:
BYE sip:
192.168
.
2.89
:
14010
SIP
/
2.0
Via: SIP
/
2.0
/
UDP
192.168
.
2.161
:
9545
Max
-
Forwards:
70
From
: "Administrator"
<
sip:
17899998888
@192
.
168.2
.
89
>
;tag
=
2dc6e1000081463ba14f7db4e50b8643;epid
=
d6b5434cef
To
:
<
sip:
01062230001
@192
.
168.2
.
89
>
;tag
=-
006773
-
7d10081ef45af150
Call
-
ID: 31e72e80d5b04f52aba6cb8be8f3c0c0
@192
.
168.2
.
161
CSeq:
2
BYE
User
-
Agent: RTC
/
1.2
Content
-
Length:
0
服务器发送200 OK消息,参考实例如下:
SIP
/
2.0
200
OK
Via: SIP
/
2.0
/
UDP
192.168
.
2.161
:
9545
From
: "Administrator"
<
sip:
17899998888
@192
.
168.2
.
89
>
;tag
=
2dc6e1000081463ba14f7db4e50b8643;epid
=
d6b5434cef
To
:
<
sip:
01062230001
@192
.
168.2
.
89
>
;tag
=-
006773
-
7d10081ef45af150
Call
-
ID: 31e72e80d5b04f52aba6cb8be8f3c0c0
@192
.
168.2
.
161
CSeq:
2
BYE
Content
-
Length:
0
1)头字段填写说明
必选头域如下:
Call-id
Cseq
From
To
Max-Forwards
Via
常用可选头域:
Content-Length
Content-Type
Route
Reason
2)消息实例
本实例笔者在本机(192.168.2.161)上注册了17899998888号码,呼叫01062230001号码时发送INVITE消息给服务器(192.168.2.89)的软交换,并与呼叫的号码建立通话后,主叫方主动挂断时,BYE消息如下所示:
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)