https://www.rfc-editor.org/rfc/rfc3455.txt
Private Header (P-Header) Extensions to the Session Initiation
3GPP_对_SIP_的私有头(P-Header)扩展 4.4 节中定义。
4.4 The P-Access-Network-Info header This header is useful in SIP-based networks that also provide layer 2/layer 3 connectivity through different access technologies. SIP User Agents may use this header to relay information about the access technology to proxies that are providing services. The serving proxy may then use this information to optimize services for the UA. For example, a 3GPP UA may use this header to pass information about the access network such as radio access technology and radio cell identity to its home service provider. SIP UA 可以通过此头部向serving proxy提供具体的接入网络信息。 In some cases, the SIP server that provides the user with services may wish to know information about the type of access network that the UA is currently using. Some services are more suitable or less suitable depending on the access type, and some services are of more value to subscribers if the access network details are known by the SIP proxy which provides the user with services. SIP proxy 可以为不同的接入网络注册更合适的服务。 In other cases, the SIP server that provides the user with services may simply wish to know crude location information in order to provide certain services to the user. For example, many of the location based services available in wireless networks today require the home network to know the identity of the cell the user is being served by. 通过此header,SIP server可以知道用户的粗略位置信息。 Some regulatory requirements exist mandating that for cellular radio systems, the identity of the cell where an emergency call is established is made available to the emergency authorities. 当紧急电话建立时,也可以通过其获取cell id。 4.4.1 Applicability Statement for the P-Access-Network-Info header This mechanism is appropriate in environments where SIP services are dependent on SIP elements knowing details about the IP and lower layer technologies used by a UA to connect to the SIP network. Specifically, the extension requires that the UA know the access technology it is using, and that a proxy desires such information to provide services. Generally, SIP is built on the "Everything over IP and IP over everything" principle, where the access technology is not relevant for the operation of SIP. Since SIP systems generally should not care or even know about the access technology, this SIP extension is not for general SIP usage. The information revealed in the P-Access-Network-Info header is potentially very sensitive. Proper protection of this information depends on the existence of specific business and security relationships amongst the proxies that will see SIP messages containing this header. It also depends on explicit knowledge of the UA of the existence of those relationships. Therefore, this mechanism is only suitable in environments where the appropriate relationships are in place, and the UA has explicit knowledge that they exist. 4.4.2 Usage of the P-Access-Network-Info header When a UA generates a SIP request or response which it knows is going to be securely sent to its SIP proxy that is providing services, the UA inserts a P-Access-Network-Info header into the SIP message. This header contains information on the access network that the UA is using to get IP connectivity. The header is typically ignored by intermediate proxies between the UA and the SIP proxy that is providing services. The proxy providing services can inspect the header and make use of the information contained there to provide appropriate services, depending on the value of the header. Before proxying the request onwards, this proxy strips the header from the message. 4.4.2.1 UA behavior A UA that supports this extension and is willing to disclose the related parameters MAY insert the P-Access-Network-Info header in any SIP request or response. The UA inserting this information MUST trust the proxy that is providing services to protect its privacy by deleting the header before forwarding the message outside of the proxy's domain. This proxy is typically located in the home network. In order to do the deletion of the header, there must also be a transitive trust in intermediate proxies between the UA and the proxy that provides the services. This trust is established by business agreements between the home network and the access network, and generally supported by the use of standard security mechanisms, e.g., IPsec, AKA, and TLS. 4.4.2.2 Proxy behavior A proxy MUST NOT insert or modify the value of the P-Access-Network-Info header. A proxy which is providing services to the UA, may act upon any information present in the P-Access-Network-Info header value, if is present, to provide a different service depending on the network or the location through which the UA is accessing the server. For example, for cellular radio access networks the SIP proxy located in the home network may use the cell ID to provide basic localized services. A proxy that provides services to the user, the proxy typically located in the home network, and therefore trusted, MUST delete the header when the SIP signaling is forwarded to a SIP server located in a non-trusted administrative network domain. The SIP server providing services to the UA uses the access network information and is of no interest to other proxies located in different administrative domains.
如下的信令字段中,
P-Access-Network-Info: IEEE-802.11ac;i-wlan-node-id=C8EAF822F2E1;country=SA
说明终端是在美国运营商的wifi网络下接入IMS。
06:42:26.053607 [0x156E] IMS SIP Message
Version = 1
Version 1 {
Direction = UE_TO_NETWORK
SDP Presence = 0
SIP Call ID Length = 36
SIP Message Length = 2047
SIP Message Logged Bytes = 2048
Message ID = IMS_SIP_REGISTER
Response Code = INFORMAL_RESPONSE (0)
CM Call ID = 255
SIP Call ID = 2586494840_975995228@10.103.218.178
Sip Message = REGISTER sip:ims.mnc001.mcc420.3gppnetwork.org SIP/2.0
From: <sip:420013411730937@ims.mnc001.mcc420.3gppnetwork.org>;tag=2586553476
To: <sip:420013411730937@ims.mnc001.mcc420.3gppnetwork.org>
CSeq: 439011194 REGISTER
Call-ID: 2586494840_975995228@10.103.218.178
Via: SIP/2.0/TCP 10.103.218.178:40108;branch=z9hG4bK1674678198
Max-Forwards: 70
Contact: <sip:c0fbc810-5222-4aab-a643-dbaf292195fe@10.103.218.178:40108>;+g.3gpp.accesstype="wlan1";+sip.instance="<urn:gsma:imei:86644905-002188-0>";audio;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
P-Access-Network-Info: IEEE-802.11ac;i-wlan-node-id=C8EAF822F2E1;country=SA
Cellular-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=4200106963C00301;cell-info-age=0
Security-Verify: ipsec-3gpp;alg=hmac-md5-96;prot=esp;mod=trans;ealg=aes-cbc;spi-c=2210503791;spi-s=4240546927;port-c=9950;port-s=9900
Expires: 600000
Require: sec-agree
Proxy-Require: sec-agree
Supported: path,sec-agree
Allow: INVITE,BYE,CANCEL,ACK,NOTIFY,UPDATE,PRACK,INFO,MESSAGE,OPTIONS
Authorization: Digest username="420013411730937@ims.mnc001.mcc420.3gppnetwork.org",realm="ims.mnc001.mcc420.3gppnetwork.org",uri="sip:ims.mnc001.mcc420.3gppnetwork.org",nonce="aiS37gy6gIyfsTYrc8Mi6n6eDEj+SQABv7khI1B+rpE=",algorithm=AKAv1-MD5,response="ff59578d8c9baf3324d47d5733df2fcc"
User-Agent: *****************
Security-Client: ipsec-3gpp; alg=hmac-md5-96; ealg=des-ede3-cbc; spi-c=1282324653; spi-s=3447760939; port-c=43259; port-s=40108,ipsec-3gpp; alg=hmac-md5-96; ealg=aes-cbc; spi-c=1282324653; spi-s=3447760939; port-c=43259; port-s=40108,ipsec-3gpp; alg=hmac-md5-96; ealg=null; spi-c=1282324653; spi-s=3447760939; port-c=43259; port-s=40108,ipsec-3gpp; alg=hmac-sha-1-96; ealg=des-ede3-cbc; spi-c=1282324653; spi-s=3447760939; port-c=43259; port-s=40108,ipsec-3gpp; alg=hmac-sha-1-96; ealg=aes-cbc; spi-c=1282324653; spi-s=3447760939; port-c=43259; port-s=40108,ipsec-3gpp; alg=hmac-sha-1-96; ealg=null; spi-c=1282324653; spi-s=3447760939; port-c=43259; port-s=40108
Content-Length: 0