GB35114和GB28181的注册信令
最近在开发GB35114的功能,突然发现国密不是一般的复杂,感慨国密可以支撑好多公司起来. 如果没有小伙伴的合作,一个人估计是搞好几个月也搞不出来,目前还在开发中(PS:开发完估计至少还需要1个月),先简单上传几个注册信令。目前只开发了 设备和平台之间的协议,希望对大家有所帮助
1、单向注册
13:31:56.621434 IP 192.168.3.12.sip > localhost.localdomain.sip: SIP, length: 1267
Eh....@[email protected] sip:11011200002000000100@1101120000 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.12:5060;rport;branch=z9hG4bK443099353
From:
To:
Call-ID: 1524440977
CSeq: 1 REGISTER
Contact:
Authorization: Capability algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2", keyversion="2019-08-06T05:31:39", cnonce="devicecert:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJiVENDQVJNQ0FRRXdDZ1lJS29FY3oxVUJnM1V3UWpFTE1Ba0dBMVVFQmhNQ1EwNHhFREFPQmdOVkJBZ00KQjJkaU16VXhNVFF4SVRBZkJnTlZCQW9NR0VsdWRHVnlibVYwSUZkcFpHZHBkSE1nVUhSNUlFeDBaREFlRncweApPVEEzTWpVd09USTVORGRhRncweU9UQTNNakl3T1RJNU5EZGFNRU14Q3pBSkJnTlZCQVlUQWtOT01UUXdNZ1lEClZRUUREQ3N6TWpBd01EQXdNREF3TVRNeU5UQXdNREF3TVY4eE56RTNNREV5TURFMU1EZ3dNVEk1TURZMU1URTMKTUZrd0V3WUhLb1pJemowQ0FRWUlLb0VjejFVQmdpMERRZ0FFWkhmbFZYaGxvOFZDTkRHZFcvZjVROE50SUVjcAoyRGZVbjI2Rm5WKy9Ob3F0b1dzb1JjRityUzZ2bTVubStqc0pKdWc0amN4WlBiaTNkOE9qWDgwMnpUQUtCZ2dxCmdSelBWUUdEZFFOSUFEQkZBaUVBeFMzQk9oVkRGQjBBVDBjTFJCYUJtQ3o2WXBFZjB4eUxBclVHdDBqeUwzQUMKSUR2RkE5NWFXc1JEazRaTm5iZ2l4eHRmbW53eXB1UUZLY0lwMGMwZUZKcHIKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
13:31:56.719840 IP localhost.localdomain.sip > 192.168.3.12.sip: SIP, length: 458
E....y@[email protected]/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.3.12:5060;rport=5060;branch=z9hG4bK443099353
From:
To:
Call-ID: 1524440977
CSeq: 1 REGISTER
WWW-Authenticate: Unidirection algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2", random1="PRAIIbutDbd5x/NKsbwwYw=="
Content-Type: Application/MANSCDP+xml
User-Agent: videosvr 1.0
Content-Length: 0
13:31:56.935980 IP 192.168.3.12.sip > localhost.localdomain.sip: SIP, length: 684
Eh....@[email protected] sip:11011200002000000100@1101120000 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.12:5060;rport;branch=z9hG4bK582371201
From:
To:
Call-ID: 1524440977
CSeq: 2 REGISTER
Contact:
Authorization: Unidirection random1="PRAIIbutDbd5x/NKsbwwYw==", random2="F4InuQewuMMqYPy1ItBdhQ==", serverid="11011200002000000100", sign1="MEYCIQD/9gP8olHM0TeLj0MxBRw3C8tQKFMMRgUupnyD4xXTTwIhAJvXxvTEDXj8Yk5qjHwujzUjpYpxxCGq7Zz0tKzhhJUU", algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2"
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
13:31:57.055349 IP localhost.localdomain.sip > 192.168.3.12.sip: SIP, length: 619
E.....@.@.,E.............s..SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.3.12:5060;rport=5060;branch=z9hG4bK582371201
From:
To:
Call-ID: 1524440977
CSeq: 2 REGISTER
Contact:
User-Agent: videosvr 1.0
Expires: 3600
Date: 2019-08-06T13:31:57.004
SecurityInfo: Unidirection cryptkey="MHkCIBHIiuBM7BulVNA9W1lwMzqDWFgmwqmF3lUg2ek0OJ77AiEAhLUtNE+yGqjqOKSUDIMyaSuNTaI5NUkhLq/cDxHKXJwEIHFMxhef2Mm87QjLenmuVKs1rGm7Ls3aMG+1zPp47365BBAnTJVAmqz9pBE2xKOXhpQF", algorithm="A:SM2;H:SM3"
Content-Length: 0
2、双向注册
REGISTER sip:34020000002000000003@34020000 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.64:5060;rport;branch=z9hG4bK520712539
From:
To:
Call-ID: 563593916
CSeq: 1 REGISTER
Contact:
Authorization: Capability algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2", keyversion="2018-12-20T19:27:41"
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.64:5060;rport=5060;branch=z9hG4bK520712539
From:
To:
Call-ID: 563593916
CSeq: 1 REGISTER
User-Agent: videosvr 1.0
Expires: 3600
Date: 2018-12-20T19:27:42.000
WWW-Authenticate: Bidirection algorithm="A:SM2;H:SM3;S:SM4/OFB/PKCS5,SM1/OFB/PKCS5;SI:SM3-SM2", random1="OxImNZnZwyNMtx0FjnWKrg=="
Content-Length: 0
REGISTER sip:34020000002000000003@34020000 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.64:5060;rport;branch=z9hG4bK1060289490
From:
To:
Call-ID: 563593916
CSeq: 2 REGISTER
Contact:
Authorization: Bidirection random1="OxImNZnZwyNMtx0FjnWKrg==", random2="KBDLEUo83FgcnHXcSNN04w==", serverid="34020000002000000003", sign1="MEYCIQDRWE9xmwU4+2pS7RF4H+VXhFvo6VkM/hiCvTZpxVKZ7AIhAJbLfc9r7OpgzMc0bdqE6XuOs70vF96BcCbvoOqKGRjh", algorithm="A:SM2;H:SM3;S:SM4/OFB/PKCS5,SM1/OFB/PKCS5;SI:SM3-SM2"
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.64:5060;rport=5060;branch=z9hG4bK1060289490
From:
To:
Call-ID: 563593916
CSeq: 2 REGISTER
User-Agent: videosvr 1.0
Expires: 3600
Date: 2018-12-20T19:27:42.000
SecurityInfo: Bidirection algorithm="A:SM2;H:SM3;S:SM4/OFB/PKCS5,SM1/OFB/PKCS5;SI:SM3-SM2",random1="OxImNZnZwyNMtx0FjnWKrg==",random2="KBDLEUo83FgcnHXcSNN04w==",deviceid="34020000001320000001",serverid="34020000002000000003",cryptkey="MHgCICPmu12OKCfCNsiTK/6wSsHpDEF43fedv9AxRjj+XzQ0AiAZnh6496mWVcpV+BWOK4tZ3G3q/TZ4Dwt6vBv3G4xlXQQgMfbkaXwYUL8RObHfkpQEC++/CA/Enssg7rlZgDnKCXQEEEWqHpbVai9NJaT0orxaQ4Y=",sign2="MEUCIQDzvGhJCuxmH/3NNtLNnrXIUOxYkYB7j8/3Th1LvjZHggIgD/nd9RbpEd6neZTuXDsIbNzydyS8WarbN1p6nHD5pHk="
Content-Length: 0