图3-6 SIP实体之间的SIP呼叫流程
(1) 事件1:SIP PhoneA发INVITE请求到SoftX3000,请求SoftX3000邀请SIP PhoneB加入会话。SIP PhoneA还通过INVITE消息的会话描述,将自身的IP地址:191.169.150.101,端口号:8766,静荷类型,静荷类型对应的编码等信息传送给SoftX3000。 INVITE sip:1001@191.169.200.61SIP/2.0
From: sip:1000@191.169.200.61;tag=1c12674 To: sip:1001@191.169.200.61
Call-Id: call-973598097-16@191.169.150.101 Cseq: 1 INVITE
Contact: sip:1000@191.169.150.101 Content-Type: application/sdp Content-Length: 203 Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, REFER,OPTIONS, NOTIFY, REGISTER, SUBSCRIBE Supported: sip-cc,sip-cc-01, timer User-Agent: Pingtel/1.2.7 (VxWorks) Via: SIP/2.0/UDP191.169.150.101 v=0
o=Pingtel 5 5 IN IP4 191.169.150.101 s=phone-call
c=IN IP4 191.169.150.101 t=0 0
m=audio 8766 RTP/AVP 0 96 8 a=rtpmap:0 pcmu/8000/1
a=rtpmap:96 telephone-event/8000/1 a=rtpmap:8 pcma/8000/1
每行的详细解释请参考3.2.2 1.请求消息一节中的“请求消息示例”。
(2) 事件2:SoftX3000给SIP PhoneA回100Trying表示已经接收到请求消息,正在对其进行处理。
SIP/2.0 100 Trying
From:
Call-ID: call-973598097-16@191.169.150.101 Via: SIP/2.0/UDP191.169.150.101 Content-Length: 0
(3) 事件3:SoftX3000给SIP PhoneA发407Proxy Authentication Required响应,表明SoftX3000端要求对用户进行认证,并且通过Proxy-Authenticate字段携带SoftX3000支持的认证方式Digest和SoftX3000域名“huawei.com”,产生本次认证的nonce,并且通过该响应消息将这些参数返回给终端从而发起对用户的认证过程。 SIP/2.0 407 Proxy Authentication Required
From:
CSeq: 1 INVITE
Call-ID: call-973598097-16@191.169.150.101 Via: SIP/2.0/UDP191.169.150.101
Proxy-Authenticate: Digestrealm=\Content-Length: 0
(4) 事件4:SIP PhoneA发ACK消息给SoftX3000,证实已经收到SoftX3000对于INVITE请求的最终响应。
ACK sip:1001@191.169.200.61SIP/2.0 Contact: sip:1000@191.169.150.101
From:
Accept-Language: en
User-Agent: Pingtel/1.2.7 (VxWorks) Via: SIP/2.0/UDP191.169.150.101 Content-Length: 0
(5) 事件5:SIP PhoneA重新发INVITE请求到SoftX3000。携带Proxy-Authorization字段,包括认证方式DIGEST、SIP Phone的用户标识(此时为电话号码)、SoftX3000的域名、NONCE、URI和RESPONSE(SIP PhoneA收到407响应后根据服务器端返回的信息和用户配置等信息采用特定的算法生成加密的RESPONSE)字段。 INVITE sip:1001@191.169.200.61SIP/2.0
From: sip:1000@191.169.200.61;tag=1c12674 To: sip:1001@191.169.200.61
Call-Id: call-973598097-16@191.169.150.101 Cseq: 2 INVITE
Contact: sip:1000@191.169.150.101 Content-Type: application/sdp Content-Length: 203 Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, REFER,OPTIONS, NOTIFY, REGISTER, SUBSCRIBE Supported: sip-cc,sip-cc-01, timer User-Agent: Pingtel/1.2.7 (VxWorks) Proxy-Authorization: DIGESTUSERNAME=\REALM=\d\Via: SIP/2.0/UDP191.169.150.101 v=0
o=Pingtel 5 5 IN IP4 191.169.150.101 s=phone-call
c=IN IP4 191.169.150.101 t=0 0
m=audio 8766 RTP/AVP 0 96 8
a=rtpmap:0 pcmu/8000/1
a=rtpmap:96 telephone-event/8000/1 a=rtpmap:8 pcma/8000/1
(6) 事件6:SoftX3000给SIP PhoneA回100Trying表示已经接收到请求消息,正在对其进行处理。
SIP/2.0 100 Trying
From:
Call-ID: call-973598097-16@191.169.150.101 Via: SIP/2.0/UDP191.169.150.101 Content-Length: 0
(7) 事件7:SoftX3000向SIP PhoneB发INVITE消息,请求SIP PhoneB加入会话。并且通过该INVITE请求消息携带SIP PhoneA的会话描述给SIP PhoneB。 INVITE sip:1001@191.169.150.100SIP/2.0
From:
Call-ID:1746ac508a14feaaccb35e4a35ea1768@sx3000
Via: SIP/2.0/UDP191.169.200.61:5061;branch=z9hG4bK8fd4310b0 Contact:
Allow:INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER
Content-Length: 183
Content-Type: application/sdp v=0
o=HuaweiSoftX3000 1073741833 1073741833 INIP4 191.169.200.61 s=SipCall
c=IN IP4 191.169.150.101 t=0 0
m=audio 8766 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
(8) 事件8:SIP PhoneB给SoftX3000回100Trying表示已经接收到请求消息,正在对其进行处理。
SIP/2.0 100 Trying
From:
Call-Id:1746ac508a14feaaccb35e4a35ea1768@sx3000 Cseq: 1 INVITE
Via: SIP/2.0/UDP191.169.200.61:5061;branch=z9hG4bK8fd4310b0
Contact: sip:1001@191.169.150.100 User-Agent: Pingtel/1.0.0 (VxWorks) CONTENT-LENGTH: 0
(9) 事件9:SIP PhoneB振铃,并回180Ringing响应通知SoftX3000。 SIP/2.0 180 Ringing
From:
Call-Id:1746ac508a14feaaccb35e4a35ea1768@sx3000 Cseq: 1 INVITE
Via: SIP/2.0/UDP191.169.200.61:5061;branch=z9hG4bK8fd4310b0 Contact: sip:1001@191.169.150.100 User-Agent: Pingtel/1.0.0 (VxWorks) CONTENT-LENGTH: 0
(10) 事件10:SoftX3000回180Ringing响应给SIP PhoneA,SIP PhoneA听回铃音。 SIP/2.0 180 Ringing
From:
Call-ID: call-973598097-16@191.169.150.101 Via: SIP/2.0/UDP191.169.150.101
Contact:
(11) 事件11:SIP PhoneB给SoftX3000回200OK响应表示其发过来的INVITE请求已经被成功接受、处理。并且通过该消息将自身的IP地址:191.169.150.101,端口号:8766,静荷类型,静荷类型对应的编码等信息传送给SoftX3000。 SIP/2.0 200 OK
From:
Call-Id:1746ac508a14feaaccb35e4a35ea1768@sx3000 Cseq: 1 INVITE
Content-Type: application/sdp Content-Length: 164
Via: SIP/2.0/UDP191.169.200.61:5061;branch=z9hG4bK8fd4310b0 Session-Expires: 36000
Contact: sip:1001@191.169.150.100
Allow: INVITE, ACK, CANCEL, BYE, REFER,OPTIONS, NOTIFY User-Agent: Pingtel/1.0.0 (VxWorks) v=0
o=Pingtel 5 5 IN IP4 191.169.150.100 s=phone-call
c=IN IP4 191.169.150.100 t=0 0
m=audio 8766 RTP/AVP 0 8