原始来源:https://www.sharetechnote.com/html/Handbook_UMTS_EmergencyCall.html
正文
大家都知道紧急呼叫是什么(在北美相当于 911,在韩国相当于 112 等)。所以我不再解释什么是紧急呼叫,而是重点介绍允许发起紧急呼叫的各种条件,以及紧急呼叫协议流程的细节。
您可以在以下几种不同条件下发起紧急呼叫,如下所示。
- i) 该小区未被禁止发起紧急呼叫
- ii) UE 已注册到某个小区
- iii) UE 持有 USIM,但该 USIM 未在 UE 当前所在网络中开通(在这种情况下,UE 不会向该小区执行注册流程)
- iv) UE 中没有任何 USIM(在这种情况下,UE 不会向该小区执行注册流程) 下面两个案例来自 WCDMA UE 的抓包。在此之前有一节列出了将一次呼叫标记为紧急呼叫的信息元素;在此之后有一节汇总了决定网络是否接受该呼叫的规则。
以下是 WCDMA 中紧急呼叫典型场景的协议流程与消息细节。
- 哪些信息元素将一次呼叫标记为紧急呼叫?
- 案例 1:正常注册且持有正常 USIM
- 案例 2:未注册且无 USIM
- 网络在什么情况下会接受紧急呼叫?
- 参考资料 UMTS 中的紧急呼叫与普通语音呼叫使用相同的 RRC、MM 和 CC 流程。因此网络需要在每一层都有一个标记,以便区别对待该呼叫。我们先列出这些标记,然后在抓包中逐一找到它们。
UE 会对该呼叫做四次标记。第一次在 RRC 层,RRC Connection Request 携带 establishmentCause emergencyCall。第二次在 MM 层,CM Service Request 携带 CM 业务类型 Emergency call establishment。第三次是 CC 消息本身,因为 UE 发送的是 EMERGENCY SETUP 而不是 SETUP。第四次是可选的,即 EMERGENCY SETUP 中的 Emergency category 信息元素,它告诉网络用户需要哪种紧急服务。
| 层 | 消息 | 紧急标记 | 规范 |
|---|---|---|---|
| RRC | RRC Connection Request | establishmentCause = emergencyCall | 25.331 |
| MM | CM Service Request | CM service type = Emergency call establishment, 0010 | 24.008 10.5.3.3 |
| CC | EMERGENCY SETUP | 消息类型为 Emergency setup,且不带被叫号码 | 24.008 9.3.8 |
| CC | EMERGENCY SETUP | Emergency category 信息元素,包含对应 Police、Ambulance、Fire Brigade 及其他类别的比特位 | 24.008 10.5.4.33 |
层
消息
紧急标记
规范
RRC
RRC Connection Request
establishmentCause = emergencyCall
25.331
MM
CM Service Request
CM service type = Emergency call establishment, 0010
24.008 10.5.3.3
CC
EMERGENCY SETUP
消息类型为 Emergency setup,且不带被叫号码
24.008 9.3.8
Emergency category 信息元素,包含对应 Police、Ambulance、Fire Brigade 及其他类别的比特位
24.008 10.5.4.33
仔细看缺失的被叫号码。UE 拨打 112 或 911,但 EMERGENCY SETUP 并不携带这些数字。因此网络根据紧急类别和小区位置来路由该呼叫。如果 UE 省略了 Emergency category,网络会假设为一次非特定紧急呼叫。
- 四个标记,三个层:RRC 原因值、CM 业务类型、EMERGENCY SETUP 以及可选的 Emergency category。
- 拨打的数字不会送达网络:EMERGENCY SETUP 中没有被叫号码。
- 紧急类别是可选的:没有它时,网络将该呼叫视为非特定紧急呼叫。 当手机中插有 USIM 时,除以下几个信息元素(见以下链接标注)外,紧急呼叫的整体处理流程与普通呼叫非常相似。
-
< 空闲模式(Idle Mode)>
-
< 从 UE 发起紧急呼叫 >
-
RACH 前导码
-
AICH
-
RACH 消息
-
RRC:RRC Connection Request
-
RRC:RRC Connection Setup
-
RRC:RRC Connection Setup Complete
-
RRC:initialDirectTransfer + MM:CM Service Request
-
RRC:downlinkDirectTransfer + MM:Authentication Request
-
RRC:uplinkDirectTransfer + MM:Authentication Response
-
RRC:Security Mode Command
-
RRC:Security Mode Complete
-
RRC:uplinkDirectTransfer + CC:Emergency Setup
-
RRC:downlinkDirectTransfer + CC:Call Proceeding
-
RRC:Radio Bearer Setup
-
RRC:Radio Bearer Setup Complete
-
RRC:downlinkDirectTransfer + CC:Alerting
-
RRC:uplinkDirectTransfer + CC:Connect
-
RRC:downlinkDirectTransfer + CC:Connect Acknowledge
-
< 语音业务(Voice Traffic)>
06 - RRC:RRC Connection Request
RRC Connection Request 是第一条向网络告知紧急情况的指令。查看 establishmentCause,其值为 emergencyCall (9)。由于 UE 持有有效的 USIM,它在此处用 IMSI 标识自己。
这是从 UE 日志中解码得到的消息(抓取所得)。字段值来自实际抓包,而非规范。
rrcConnectionRequest initialUE-Identity: imsi (0) imsi: 15 items Item 0 Digit: 0 Item 1 Digit: 0 Item 2 Digit: 1 Item 3 Digit: 0 Item 4 Digit: 1 Item 5 Digit: 0 Item 6 Digit: 1 Item 7 Digit: 2 Item 8 Digit: 3 Item 9 Digit: 4 Item 10 Digit: 5 Item 11 Digit: 6 Item 12 Digit: 7 Item 13 Digit: 8 Item 14 Digit: 9 establishmentCause: emergencyCall (9) protocolErrorIndicator: noError (0) measuredResultsOnRACH currentCell modeSpecificInfo: fdd (0) fdd measurementQuantity: cpich-Ec-N0 (0) cpich-Ec-N0: 43 v3d0NonCriticalExtensions rRCConnectionRequest-v3d0ext v4b0NonCriticalExtensions rrcConnectionRequest-v4b0ext accessStratumReleaseIndicator: rel-8 (4) v590NonCriticalExtensions rrcConnectionRequest-v590ext 0... .... predefinedConfigStatusInfo: False v690NonCriticalExtensions rrcConnectionRequest-v690ext ueCapabilityIndication: hsdch-edch (1) domainIndicator: cs-domain (0) cs-domain csCallType: speech (0) v6b0NonCriticalExtensions rrcConnectionRequest-v6b0ext v6e0NonCriticalExtensions rrcConnectionRequest-v6e0ext v770NonCriticalExtensions rrcConnectionRequest-v770ext mac-ehsSupport: true (0) v7b0NonCriticalExtensions rrcConnectionRequest-v7b0ext v860NonCriticalExtensions rrcConnectionRequest-v860ext UL CCCH (Hex) : 38 90 01 01 01 23 45 67 89 48 2B A9 68 A9 40 00 00 00 00 00 00
消息其余部分与普通呼叫相同。domainIndicator 为 cs-domain,csCallType 为 speech,因此 RNC 很早就知道后续将建立 CS 语音承载。
09 - RRC:initialDirectTransfer + MM:CM Service Request
CM Service Request 是 NAS 层的标记。UE 向 MM 层请求建立 MM 连接,其 CM 业务类型为 Emergency call establishment,而不是 Mobile originating call establishment。
initialDirectTransfer cn-DomainIdentity: cs-domain (0) intraDomainNasNodeSelector version: release99 (0) release99 cn-Type: gsm-Map-IDNNS (0) gsm-Map-IDNNS routingbasis: localPTMSI (0) localPTMSI routingparameter: 0000 0... .... dummy: False nas-Message: 052402035758a605f400000000 GSM A-I/F DTAP - CM Service Request Protocol Discriminator: Mobility Management messages .... 0101 = Protocol discriminator: Mobility Management messages (0x05) 0000 .... = Skip Indicator: No indication of selected PLMN (0) 00.. .... = Sequence number: 0 ..10 0100 = DTAP Mobility Management Message Type: CM Service Request (0x24) Ciphering Key Sequence Number 0... .... = Spare bit(s): 0 .000 .... = Ciphering Key Sequence Number: 0 CM Service Type .... 0010 = Service Type: (2) Emergency call establishment Mobile Station Classmark 2 Length: 3 0... .... = Spare: 0 .10. .... = Revision Level: Used by mobile stations supporting R99 or later versions of the protocol (2) ...1 .... = ES IND: Controlled Early Classmark Sending option is implemented in the MS .... 0... = A5/1 algorithm supported: encryption algorithm A5/1 available .... .111 = RF Power Capability: RF Power capability is irrelevant in this information element (7) 0... .... = Spare: 0 .1.. .... = PS capability (pseudo-synchronization capability): PS capability present ..01 .... = SS Screening Indicator: Capability of handling of ellipsis notation and phase 2 error handling (1) .... 1... = SM capability (MT SMS pt to pt capability): Mobile station supports mobile terminated point to point SMS .... .0.. = VBS notification reception: no VBS capability or no notifications wanted .... ..0. = VGCS notification reception: no VGCS capability or no notifications wanted .... ...0 = FC Frequency Capability: The MS does not support the E-GSM or R-GSM band 1... .... = CM3: The MS supports options that are indicated in classmark 3 IE .0.. .... = Spare: 0 ..1. .... = LCS VA capability (LCS value added location request notification capability): LCS value added location request notification capability supported ...0 .... = UCS2 treatment: the ME has a preference for the default alphabet .... 0... = SoLSA: The ME does not support SoLSA .... .1.. = CMSP: CM Service Prompt: Network initiated MO CM connection request supported for at least one CM protocol .... ..1. = A5/3 algorithm supported: encryption algorithm A5/3 available .... ...0 = A5/2 algorithm supported: encryption algorithm A5/2 not available Mobile Identity - TMSI/P-TMSI (0x0000) Length: 5 1111 .... = Unused: 0x0f .... 0... = Odd/even indication: Even number of identity digits .... .100 = Mobile Identity Type: TMSI/P-TMSI/M-TMSI (4) TMSI/P-TMSI: 0x00000000 v3a0NonCriticalExtensions initialDirectTransfer-v3a0ext start-Value: 000040 [bit length 20, 4 LSB pad bits, 0000 0000 0000 0000 0100 .... decimal value 4] laterNonCriticalExtensions v590NonCriticalExtensions initialDirectTransfer-v590ext v690NonCriticalExtensions initialDirectTransfer-v690ext v770NonCriticalExtensions initialDirectTransfer-v770ext v860NonCriticalExtensions initialDirectTransfer-v860ext supportOfCSG: true (0) UL DCCH (Hex) : 15 00 00 00 60 29 20 10 1A BA C5 30 2F A0 00 00 00 06 00 00 8D 12
UE 在此处用 TMSI 标识自己。对于紧急呼叫建立,24.008 规定了移动标识的优先级。当 UE 的位置更新状态为 UPDATED 且存储的 LAI 与当前小区一致时,UE 使用 TMSI;否则使用 IMSI;若没有有效的 SIM 或 USIM,则使用 IMEI。
14 - RRC:uplinkDirectTransfer + CC:Emergency Setup
CC 层此时发送 EMERGENCY SETUP 而不是 SETUP。将其简短的信息元素列表与普通呼叫的 SETUP 对比:缺少被叫号码,只保留了 Bearer capability、Supported Codecs 和 Emergency category。
uplinkDirectTransfer cn-DomainIdentity: cs-domain (0) nas-Message: 038e040660040200058140080402600000021f002e0104 GSM A-I/F DTAP - Emergency Setup Protocol Discriminator: Call Control; call related SS messages .... 0011 = Protocol discriminator: Call Control; call related SS messages (0x03) 0... .... = TI flag: allocated by sender .000 .... = TIO: 0 10.. .... = Sequence number: 2 ..00 1110 = DTAP Call Control Message Type: Emergency Setup (0x0e) Bearer Capability - (MS supports at least full rate speech version 1 and half rate speech version 1. MS has a greater preference for full rate speech version 1 than for half rate speech version 1) Element ID: 0x04 Length: 6 Octet 3 0... .... = Extension: Extended .11. .... = Radio channel requirement: MS supports at least full rate speech version 1 and half rate speech version 1. MS has a greater preference for full rate speech version 1 than for half rate speech version 1 ...0 .... = Coding standard: GSM standardized coding .... 0... = Transfer mode: circuit .... .000 = Information transfer capability: Speech (0x00) Octets 3a - Speech Versions 0... .... = Extension: Extended .0.. .... = Coding: octet used for extension of information transfer capability ..00 .... = Spare bit(s): 0 .... 0100 = Speech version indication: GSM full rate speech version 3(FR AMR) (0x04) 0... .... = Extension: Extended .0.. .... = Coding: octet used for extension of information transfer capability ..00 .... = Spare bit(s): 0 .... 0010 = Speech version indication: GSM full rate speech version 2(GSM EFR) (0x02) 0... .... = Extension: Extended .0.. .... = Coding: octet used for extension of information transfer capability ..00 .... = Spare bit(s): 0 .... 0000 = Speech version indication: GSM full rate speech version 1(GSM FR) (0x00) 0... .... = Extension: Extended .0.. .... = Coding: octet used for extension of information transfer capability ..00 .... = Spare bit(s): 0 .... 0101 = Speech version indication: GSM half rate speech version 3(HR AMR) (0x05) 1... .... = Extension: No Extension .0.. .... = Coding: octet used for extension of information transfer capability ..00 .... = Spare bit(s): 0 .... 0001 = Speech version indication: GSM half rate speech version 1(GSM HR) (0x01) Supported Codec List Element ID: 0x40 Length: 8 System Identification (SysID): UMTS (0x04) Bitmap Length: 2 Codec Bitmap for SysID 1 0... .... = TDMA EFR: False .1.. .... = UMTS AMR 2: True ..1. .... = UMTS AMR: True ...0 .... = HR AMR: False .... 0... = FR AMR: False .... .0.. = GSM EFR: False .... ..0. = GSM HR: False .... ...0 = GSM FR: False 00.. .... = Spare bit(s): 0 ..0. .... = OHR AMR-WB: False ...0 .... = OFR AMR-WB: False .... 0... = OHR AMR: False .... .0.. = UMTS AMR-WB: False .... ..0. = FR AMR-WB: False .... ...0 = PDC EFR: False System Identification (SysID): GSM (0x00) Bitmap Length: 2 Codec Bitmap for SysID 2 0... .... = TDMA EFR: False .0.. .... = UMTS AMR 2: False ..0. .... = UMTS AMR: False ...1 .... = HR AMR: True .... 1... = FR AMR: True .... .1.. = GSM EFR: True .... ..1. = GSM HR: True .... ...1 = GSM FR: True 00.. .... = Spare bit(s): 0 ..0. .... = OHR AMR-WB: False ...0 .... = OFR AMR-WB: False .... 0... = OHR AMR: False .... .0.. = UMTS AMR-WB: False .... ..0. = FR AMR-WB: False .... ...0 = PDC EFR: False Service Category - Emergency category Element ID: 0x2e Length: 1 0... .... = Spare bit(s): 0 .0.. .... = Automatically initiated eCall: False ..0. .... = Manually initiated eCall: False ...0 .... = Mountain Rescue: False .... 0... = Marine Guard: False .... .1.. = Fire Brigade: True .... ..0. = Ambulance: False .... ...0 = Police: False UL DCCH (Hex) : 8B ED 0C 6B 8E C0 0B 01 C7 02 03 30 02 01 00 02 C0 A0 04 02 01 30 00 00 01 0F 80 17 00 82 00
抓包显示了 24.008 表 9.62 中四个可选信息元素里的三个。Bearer capability 列出了五种 GSM 语音版本,FR AMR 排在首位。Supported Codec List 针对 UMTS 提供 UMTS AMR 和 UMTS AMR 2,针对 GSM 提供五种 GSM 编解码器。24.008 要求支持 UMTS 无线接入的 UE 携带该信息元素。Emergency category 只设置了 Fire Brigade,因此用户选择的是消防服务。两个 eCall 比特位为 False,因为这是一次普通紧急呼叫。
- 案例 1 看起来像普通呼叫:由于 UE 持有 USIM 且已注册,鉴权和安全模式流程仍然执行。
- establishmentCause 和 CM 业务类型将其标记出来:RRC 中为 emergencyCall,MM 中为 Emergency call establishment。
- EMERGENCY SETUP 携带类别:本抓包中为 Fire Brigade,且没有被叫号码。 当手机中没有 USIM 时,您可能会在 UE 显示屏上看到类似「未插入 SIM,仅允许紧急呼叫」的警告提示。当从 UE 发起紧急呼叫时,会经过以下流程。
UE 会发送 RRC Connection Request,其原因为 Emergency Call,并携带 IMEI(不是 IMSI 也不是 TMSI),网络无需经过鉴权和安全流程即允许建立该呼叫。
-
< 未注册:仅紧急呼叫模式 >
-
RRC:downlinkDirectTransfer + MM:CM Service Accept
没有 USIM 时,UE 无法提供 IMSI 和 TMSI。因此 initialUE-Identity 携带 IMEI,而 establishmentCause 仍为 emergencyCall (9),与案例 1 完全相同。
rrcConnectionRequest initialUE-Identity: imei (3) imei: 15 items Item 0 IMEI-Digit: 3 Item 1 IMEI-Digit: 5 Item 2 IMEI-Digit: 6 Item 3 IMEI-Digit: 4 Item 4 IMEI-Digit: 3 Item 5 IMEI-Digit: 2 Item 6 IMEI-Digit: 0 Item 7 IMEI-Digit: 5 Item 8 IMEI-Digit: 7 Item 9 IMEI-Digit: 9 Item 10 IMEI-Digit: 3 Item 11 IMEI-Digit: 4 Item 12 IMEI-Digit: 5 Item 13 IMEI-Digit: 3 Item 14 IMEI-Digit: 0 establishmentCause: emergencyCall (9) protocolErrorIndicator: noError (0) measuredResultsOnRACH currentCell modeSpecificInfo: fdd (0) fdd measurementQuantity: cpich-Ec-N0 (0) cpich-Ec-N0: 43 v3d0NonCriticalExtensions rRCConnectionRequest-v3d0ext v4b0NonCriticalExtensions rrcConnectionRequest-v4b0ext accessStratumReleaseIndicator: rel-8 (4) v590NonCriticalExtensions rrcConnectionRequest-v590ext .... 0... predefinedConfigStatusInfo: False v690NonCriticalExtensions rrcConnectionRequest-v690ext ueCapabilityIndication: hsdch-edch (1) domainIndicator: cs-domain (0) cs-domain csCallType: speech (0) v6b0NonCriticalExtensions rrcConnectionRequest-v6b0ext v6e0NonCriticalExtensions rrcConnectionRequest-v6e0ext v770NonCriticalExtensions rrcConnectionRequest-v770ext mac-ehsSupport: true (0) v7b0NonCriticalExtensions rrcConnectionRequest-v7b0ext v860NonCriticalExtensions rrcConnectionRequest-v860ext pre-redirectionInfo .... .1.. supportEUTRA-FDD: True .... ..0. supportEUTRA-TDD: False
同样的标识规则也适用于第 09 步的 CM Service Request。第 09 步链接到案例 1 的抓包,其中显示的是 TMSI。在案例 2 中,该消息的 Mobile Identity 则改为 IMEI。要让该场景成立,网络必须接受 IMEI。如果不接受,网络会以 CM SERVICE REJECT 应答,例如携带原因值 #5 IMEI not accepted。
案例 2 的列表还跳过了第 11 至 13 步。没有 USIM 就没有可用于鉴权的密钥,因此网络用 CM SERVICE ACCEPT 应答 CM Service Request,且不执行任何安全模式流程。随后呼叫按案例 1 的方式以 EMERGENCY SETUP 继续进行。
- IMEI 取代 IMSI:当没有有效 USIM 时,UE 在 RRC 和 MM 中均使用 IMEI。
- 无鉴权、无安全流程:CM SERVICE ACCEPT 直接跟在 CM Service Request 之后。
- 网络可以拒绝 IMEI 呼叫:在 CM SERVICE REJECT 中携带原因值 #5 IMEI not accepted。 本页开头的条件说明了 UE 何时可以尝试发起紧急呼叫。网络仍有自己的规则,这些规则决定尝试是否成功。在 UMTS 中最重要的有三条规则:接入等级限制、UE 能够提供的标识,以及紧急号码列表。
第一条规则是 Access Class 10。每个 UE 都属于 0 到 9 中的一个接入等级(access class),有些 UE 还拥有 11 到 15 的特殊等级。SIB3 携带一个包含 16 项的 Access Class Barred 列表,其中一项就是 Access Class 10。该比特指示接入等级 0 到 9 的 UE 或无 IMSI 的 UE 是否可以发起紧急呼叫。对于等级 11 到 15 的 UE,只有在 Access Class 10 和其自身等级同时被禁止时,才会被阻止发起紧急呼叫。因此,本页开头的条件 i) 在工程实践中实际就是 Access Class 10 该比特的状态。
第二条规则是标识。24.008 允许在一切允许普通主叫呼叫的 MM 状态下,以及所有已选择小区的业务状态下,为紧急呼叫建立 MM 连接。作为网络可选配置,网络仍可在其中某些状态下拒绝该请求。不支持基于 IMEI 呼叫的网络会以原因值 #5 拒绝案例 2。
第三条规则决定所拨号码是否属于紧急号码。UE 会将该号码与存储在 SIM 或 USIM 以及 ME 中的紧急号码进行比对。网络可在 LOCATION UPDATING ACCEPT 的 Emergency Number List 信息元素中增加最多十个本地紧急号码。这些号码仅在相同国家的网络中有效,UE 会在关机或取出 USIM 时将其删除。
- Access Class 10 对普通 UE 起门控作用:它控制等级 0 到 9 以及无 IMSI 的 UE 的紧急呼叫。
- 网络可拒绝 IMEI 呼叫:是否支持案例 2 由网络自行决定。
- 本地紧急号码由网络提供:最多十个,通过 LOCATION UPDATING ACCEPT 下发,仅在一个国家内有效。 3GPP TS 24.008 v20.0.0 - 第 4.4.4.6、4.5.1.5、9.3.8、10.5.4.33 条以及 10.5.1.4 的移动标识规则
3GPP TS 25.331 v19.0.1 - RRC Connection Request 及 SIB3 的 Access Class Barred 列表
3GPP TS 22.011 v19.6.0 - 第 4.4 条,紧急呼叫与 Access Class 10