sip学习--注册流程

  1000(192.168.1.119)         Kamailio(192.168.1.88)
  |                                                  |
  |   1.REGISTER                          |
  |   ------------------------------->        |
  |   2.SIP/2.0 401 Unauthorized   |
  |   <-------------------------------        |
  |   3.REGISTER                          |
  |   ------------------------------->        | 
  |   4.SIP/2.0 200 OK 或者401     |
  |   <-------------------------------        |
  |                                                  |
  |                                                  |


1
REGISTER sip:192.168.1.88 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.119:26023;rport;branch=z9hG4bK2011767405.
From: <sip:[email protected]>;tag=627991566.
To: <sip:[email protected]>.
Call-ID: 1426548078.
CSeq: 1 REGISTER.
Contact: <sip:[email protected]:26023;line=818829ab707ac8a>.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Expires: 3600.
Content-Length: 0.

2
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 192.168.1.119:26023;rport=26023;branch=z9hG4bK2011767405.
From: <sip:[email protected]>;tag=627991566.
To: <sip:[email protected]>;tag=b27e1a1d33761e85846fc98f5f3a7e58.4220.
Call-ID: 1426548078.
CSeq: 1 REGISTER.
WWW-Authenticate: Digest realm="192.168.1.88", nonce="Ucz8wlHM+5Zt5fGB0vjWXgziGzKF5on2".
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.

3
REGISTER sip:192.168.1.88 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.119:26023;rport;branch=z9hG4bK1264695206.
From: <sip:[email protected]>;tag=1233362154.
To: <sip:[email protected]>.
Call-ID: 209020667.
CSeq: 2 REGISTER.
Contact: <sip:[email protected]:26023;line=dd5b69438e00ed2>.
Authorization: Digest username="1000", realm="192.168.1.88", nonce="Ucz8wlHM+5Zt5fGB0vjWXgziGzKF5on2", uri="sip:192.168.1.88", response="c6866fcaa26039575aef60154af273f5", algorithm=MD5.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/2.2.1 (eXosip2/3.6.0).
Expires: 3600.
Content-Length: 0.

4
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.119:26023;rport=26023;branch=z9hG4bK1264695206.
From: <sip:[email protected]>;tag=1233362154.
To: <sip:[email protected]>;tag=b27e1a1d33761e85846fc98f5f3a7e58.9f23.
Call-ID: 209020667.
CSeq: 2 REGISTER.
Contact: <sip:[email protected]:60586;line=5711272990db3dd>;expires=2527, <sip:[email protected]:23273;line=816f841e8312aa2>;expires=3061, <sip:[email protected]:23273;line=752c459df9b06e6>;expires=3061, <sip:[email protected]:52163;line=bb674e6771c3685>;expires=3087, <sip:[email protected]:52163;line=5d658b049d7cb0e>;expires=3087, <sip:[email protected]:52197;line=7799cb47d148658>;expires=3113, <sip:[email protected]:52197;line=71e6322af605296>;expires=3113, <sip:[email protected]:26023;line=dd5b69438e00ed2>;expires=3600.
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.

SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 192.168.1.119:38610;rport=38610;branch=z9hG4bK1090759700.
From: <sip:[email protected]>;tag=843208761.
To: <sip:[email protected]>;tag=b27e1a1d33761e85846fc98f5f3a7e58.3090.
Call-ID: 1931677792.
CSeq: 4 REGISTER.
WWW-Authenticate: Digest realm="192.168.1.88", nonce="Uc0MKFHNCvyKvIxFJMEavRpdRTEEIuMZ".
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.

猜你喜欢

转载自linyu19872008.iteye.com/blog/1897267
sip