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:1000@192.168.1.88>;tag=627991566.
To: <sip:1000@192.168.1.88>.
Call-ID: 1426548078.
CSeq: 1 REGISTER.
Contact: <sip:1000@192.168.1.119: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:1000@192.168.1.88>;tag=627991566.
To: <sip:1000@192.168.1.88>;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:1000@192.168.1.88>;tag=1233362154.
To: <sip:1000@192.168.1.88>.
Call-ID: 209020667.
CSeq: 2 REGISTER.
Contact: <sip:1000@192.168.1.119: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:1000@192.168.1.88>;tag=1233362154.
To: <sip:1000@192.168.1.88>;tag=b27e1a1d33761e85846fc98f5f3a7e58.9f23.
Call-ID: 209020667.
CSeq: 2 REGISTER.
Contact: <sip:1000@192.168.1.119:60586;line=5711272990db3dd>;expires=2527, <sip:1000@192.168.1.119:23273;line=816f841e8312aa2>;expires=3061, <sip:1000@192.168.1.119:23273;line=752c459df9b06e6>;expires=3061, <sip:1000@192.168.1.119:52163;line=bb674e6771c3685>;expires=3087, <sip:1000@192.168.1.119:52163;line=5d658b049d7cb0e>;expires=3087, <sip:1000@192.168.1.119:52197;line=7799cb47d148658>;expires=3113, <sip:1000@192.168.1.119:52197;line=71e6322af605296>;expires=3113, <sip:1000@192.168.1.119: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:1000@192.168.1.88>;tag=843208761.
To: <sip:1000@192.168.1.88>;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.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

linyu19872008

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

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

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

打赏作者

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

抵扣说明:

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

余额充值