实践出真知。了解了一些知识,光掌握这些是不够的,还需要动手来操练。那么前面我们也学习了SIP协议的有关内容,这里我们就来分享一个网友的SIP INVITE的操练过程吧。希望对大家能够有用。
SIP INVITE中linphone发出的请求(reguest)
- INVITE sip:to@192.168.105.14 SIP/2.0
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport;branch=z9hG4bK2195
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>
- Call-ID: 8103
- CSeq: 20 INVITE
- Contact: <sip:from@192.168.105.5:5060>
- Content-Type: application/sdp
- Max-Forwards: 70
- User-Agent: Linphone/3.2.1 (eXosip2/3.3.0)
- Subject: Phone call
- Content-Length: 315
- v=0
- o=from 123456 654321 IN IP4 192.168.105.5
- s=A conversation
- c=IN IP4 192.168.105.5
- t=0 0
- m=audio 7078 RTP/AVP 111 110 0 3 8 101
- a=rtpmap:111 speex/16000/1
- a=rtpmap:110 speex/8000/1
- a=rtpmap:0 PCMU/8000/1
- a=rtpmap:3 GSM/8000/1
- a=rtpmap:8 PCMA/8000/1
- a=rtpmap:101 telephone-event/8000
- a=fmtp:101 0-11
SIP INVITE中linphone发到的回应(response)
- SIP/2.0 100 Trying
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport=5060;branch=z9hG4bK2195
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>
- Call-ID: 8103
- CSeq: 20 INVITE
- User-Agent: eXosip/3.3.0
- Content-Length: 0
- -----------------------------------------------------------------------------
- SIP/2.0 101 Dialog Establishement
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport=5060;branch=z9hG4bK2195
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>;tag=286863750
- Call-ID: 8103
- CSeq: 20 INVITE
- Contact: <sip:to@192.168.105.14:5060>
- User-Agent: eXosip/3.3.0
- Content-Length: 0
- ------------------------------------------------------------------
- SIP/2.0 180 Ringing
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport=5060;branch=z9hG4bK2195
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>;tag=286863750
- Call-ID: 8103
- CSeq: 20 INVITE
- Contact: <sip:to@192.168.105.14:5060>
- User-Agent: eXosip/3.3.0
- Content-Length: 0
- ------------------------------------------------------------------------
- SIP/2.0 200 OK
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport=5060;branch=z9hG4bK2195
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>;tag=286863750
- Call-ID: 8103
- CSeq: 20 INVITE
- Contact: <sip:to@192.168.105.14:5060>
- User-Agent: eXosip/3.3.0
- Content-Length: 0
SIP INVITE中linphone发出的请求(reguest)
- ACK sip:to@192.168.105.14:5060 SIP/2.0
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport;branch=z9hG4bK32434
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>;tag=286863750
- Call-ID: 8103
- CSeq: 20 ACK
- Contact: <sip:from@192.168.105.5:5060>
- Max-Forwards: 70
- User-Agent: Linphone/3.2.1 (eXosip2/3.3.0)
- Content-Length: 0
- ------------------------------------------------------------------------
- BYE sip:to@192.168.105.14:5060 SIP/2.0
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport;branch=z9hG4bK1384
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>;tag=286863750
- Call-ID: 8103
- CSeq: 21 BYE
- Contact: <sip:from@192.168.105.5:5060>
- Max-Forwards: 70
- User-Agent: Linphone/3.2.1 (eXosip2/3.3.0)
- Content-Length: 0
SIP INVITE中linphone发到的回应(response)
- SIP/2.0 200 OK
- Via: SIP/2.0/UDP 192.168.105.5:5060;rport=5060;branch=z9hG4bK1384
- From: <sip:from@192.168.105.5>;tag=29244
- To: <sip:to@192.168.105.14>;tag=286863750
- Call-ID: 8103
- CSeq: 21 BYE
- User-Agent: eXosip/3.3.0
- Content-Length: 0