HTTPS 規格

HTTPS 是可用於將 ELS 資料從手機傳送至端點的其中一種格式。HTTPS 通訊協定非常標準,因此本文件不會深入探討通訊協定本身。端點應接收 POST 訊息,其中會在下列欄位中包含緊急位置資訊。

請注意,建議您盡可能在可用資料時填入最多欄位,尤其是下列欄位:timelocation_latitudelocation_longitudelocation_accuracy。沒有這類資料,ELS 訊息就沒有太大用處。不過,每個欄位都視為選填欄位。端點通常應能處理缺少/格式錯誤欄位的訊息,且不會發生錯誤。

端點在成功接收訊息時,應傳回 2XX 成功代碼。如果處理訊息時發生問題,或訊息因其他原因而必須遭到捨棄,端點仍應傳回 2XX 成功代碼。您可以使用不同的 2XX 成功代碼,追蹤端點對訊息的具體處理方式。

資料格式是以最新的 ETSI AML 規格為依據。以下是相關的章節:

內容

欄位規格

單位 示例
v 版本 - 1
emergency_number 已撥打緊急電話號碼 - 911
source 啟用來源 (來電、簡訊) - 致電
thunderbird_version Thunderbird 模組的版本號碼 - 2800
time 通話開始時間戳記 毫秒 (UNIX 時間) 1438101600123
location_latitude 緯度 度數 37.4217845
location_longitude 經度 度數 -122.0847413
location_time 位置修正時間戳記 毫秒 (unix 時間) 1438102600123
location_altitude 海拔高度 (WGS84) 公尺 4
location_altitude_msl 海拔高度 (平均海平面) 公尺 4
location_floor 樓層標籤 (例如電梯按鈕的樓層標籤,可能不是數字) - 2
location_source 位置來源 (GPS、Wi-Fi、行動網路、不明) - gps
location_accuracy 準確率 公尺 20
location_vertical_accuracy 垂直精確度 公尺 2.5
location_vertical_accuracy_msl 垂直精確度 (平均海平面) 公尺 2.5
location_confidence 對定位精確度有信心 百分比 (0-1) 0.6827
location_bearing 方位 度數 156.7
location_speed 速度 公尺/秒 1.2
device_number 裝置電話號碼 (盡可能以 E.164 格式輸入) - +1438101600
device_model 裝置型號 (通常為裝置製造商名稱後接裝置型號名稱) - Motorola Nexus 6
device_imsi IMSI - 310260579377451
device_imei IMEI - 355458061005220
device_iccid ICCID - 89148000001466362977
cell_home_mcc 我的客戶中心 (MCC) - 310
cell_home_mnc 住家 MNC - 260
cell_network_mcc 聯播網 MCC - 310
cell_network_mnc 網路 MNC - 260
hmac 訊息驗證碼 -

空值位置

裝置號碼

在某些情況下,系統不一定會指定 device_number 欄位。ELS 會嘗試從各種來源取得電話號碼,但可能無法取得。建議您在收到 HTTPS 訊息時,一併傳送簡訊,並根據 IMEI 和時間 (通話開始的時間戳記) 比對,推斷裝置號碼,或是與 MNO 合作,使用 IMEI/IMSI 擷取電話號碼。

我們會盡可能以 E.164 格式設定電話號碼,並加上加號和國家/地區撥號代碼前置字元,接著是訂閱者號碼,不含空格或方括號 +1438101600。如果我們無法推斷國家/地區代碼,因此無法設定號碼格式,我們會傳送來源提供的原始號碼。

海拔高度 (Z 軸)

ELS 會在所有傳送至 ELS 端點的 ELS HTTPS 位置訊息中,回報 z 軸位置。高度以兩個公尺為單位表示高度,代表海拔 (MSL):location_altitude_mslWGS84 參考橢圓球體上方的公尺和公尺:location_altitude (WGS 是 GPS 使用的世界大地測量系統)。

ELS 也會以公尺為單位,為兩種高度測量值報告垂直準確度:location_vertical_accuracylocation_vertical_accuracy_msl。垂直精確度的定義與位置精確度相同,而合作夥伴會設定置信百分比。預設設定的可信度為 68%。如需更多資訊,請參閱 Android 說明文件,瞭解 getVerticalAccuracyMeters()getMslAltitudeAccuracyMeters()

有了高於平均海拔高度 (MSL) 的使用者高度,現在可以使用伺服器端 API 取得地形高度 MSL,進而推斷使用者高於地面的高度。

其他緊急救援資訊

ELS 支援的位置以外的欄位,統稱為額外緊急救援資訊 (AEI)。根據預設,這些欄位不會傳遞,並且分為三個類別,每個類別都需要合作夥伴明確選擇加入:

  • 一般 (裝置語言、緊急情況類型、緊急電話觸發事件資訊,包括車禍和跌倒偵測時間戳記)
  • 醫療資訊
  • 緊急聯絡人

建立設定變更要求來啟用這些欄位,如有任何問題,請與 ELS 團隊聯絡

限制和注意事項

這些資料可能不一定是最新的或準確的。醫療資訊和緊急聯絡人資訊來自使用者裝置上的緊急應用程式。這個應用程式是由手機製造商提供,他們會決定支援哪些資訊,以及提供格式化或自由格式的資訊。此外,這類資料是由使用者直接輸入。一般來說,這類資料必須經過清理。

對於自由格式的「字串」欄位,ELS 會直接傳遞資料,不做任何修改,因此無法保證格式或有效性。對於結構化欄位,ELS 會以特定格式傳送值,但不會保證這項資料的有效性。範例:

  • 時間戳記:安全字串為數字,且預期包含自 UNIX 紀元時間戳記開始之後的毫秒數,適用於符合該規格的實作。對於不符合規格的實作項目,必須能夠妥善處理無效的值 (例如 -1)。
  • 日期:請務必採用 ISO 8601 YYYY-MM-DD 格式。在實作不符合規格時,必須能妥善處理無效日期 (例如 2020-22-22)。

一般

單位 示例
adr_carcrash_time 車禍時間戳記 毫秒 (UNIX 時間) 1438101600123
device_languages BCP 47 語言標記 (以半形逗號分隔),依優先順序由高至低排列 - en-US、fr-FR
emergency_type 輔助緊急撥號期間,使用者選取的緊急狀況類型 醫療/消防局/警察局之一 射擊
fall_detection_time 偵測到跌倒的時間戳記 毫秒 (UNIX 時間) 1438101600124
loss_of_pulse_time 偵測到無脈搏事件的時間戳記 毫秒 (UNIX 時間) 1438101600125

緊急聯絡人

單位 示例
econtact_[0-12]_name [0-12]號緊急聯絡人的姓名 - 王大強
econtact_[0-12]_phone_number 第 [0-12]位緊急聯絡人的電話號碼 不保證是有效的電話號碼 +123 456789
econtact_[0-12]_relationship 使用者與第 [0-12]位緊急聯絡人的關係 - 姊妹

醫療資訊

單位 示例
med_info_last_updated_time 上次更新醫療資訊的時間戳記 ms (unix 時間,不保證有效) 1438101600124
med_info_name 使用者名稱 - Alex Smith
med_info_date_of_birth_gregorian 出生日期 ISO 8601 格式 YYYY-MM-DD (不保證為有效日期,例如 2020-22-22) 1990-01-03
med_info_date_of_birth_other 出生日期 (自由格式) - 2000 年的第一天
med_info_height 高度 - 180 公分
med_info_weight 重量 - 10 個英石
med_info_sex 生物性別 (預先定義) 以下其中之一 / 人員 / 女人 / 私人 / 其他 INTERSEX
med_info_sex_extra 生物性別 (自由格式,可用於補充 med_info_sex) - 從「FEMALE」改為「MALE」
med_info_gender 性別 - 非二元
med_info_home_address 住家地址 - 123 Halifax Avenue、
Alexandria 12345
med_info_blood_type_abo 血型 (預先定義) 下列其中之一:UNKNOWN/O_NEGATIVE / O_NEGATIVE / A_POSITIVE / A_NEGATIVE / A_UNKNOWN/B_POSITIVE/B_NEGATIVE / B_UNKNOWN / AB_POSITIVE / AB_NEGATIVE / AB_UNKNOWN / H_H_ B_NEGATIVE
med_info_blood_type_other 血型 (自由格式) - Le(a-b-)
med_info_allergies 過敏 - 乳膠
med_info_medications 藥物 - 阿斯匹靈
med_info_conditions_history 健康狀況病史 - 高血壓
med_info_devices_mobility_requirements 醫療器材或行動需求 - Pacemaker
med_info_pregnancy_status 懷孕狀態 值為 UNKNOWN、PREGNANT 或 NOT_PREGNANT 之一 懷孕
med_info_pregnancy_due_date 預產期 ISO 8601 格式 YYYY-MM-DD (不保證為有效日期,例如 2020-22-22) 2022-10-10
med_info_pregnancy_info 懷孕資訊 可能會補充 med_info_pregnancy_statusmed_info_pregnancy_due_date 預定的剖腹產
med_info_organ_donor 器官捐贈者 (預先定義) 下列欄位:不明 / 否 / 是
med_info_organ_donor_extra 器官捐贈者 (不限格式) 可能會補充 med_info_organ_donor 僅限心臟和肺部
med_info_advanced_directives 進階指令 - DNS
med_info_physician_info 主要醫師資訊 - 王大強,彩虹街 34 號,+123 456789
med_info_other 其他醫療資訊 - 私人保險,保險 ID 為 123-ABC-987

範例

沒有位置資訊,但有裝置號碼 (例如164 格式):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643650654147&location_latitude=%2B00.00000&location_longitude=%2B000.00000&location_time=1643650654147&location_altitude=0&location_accuracy=0&location_confidence=0&location_source=unknown&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

沒有位置資訊和裝置號碼:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643650654147&location_latitude=%2B00.00000&location_longitude=%2B000.00000&location_time=1643650654147&location_altitude=0&location_accuracy=0&location_confidence=0&location_source=unknown&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

計算位置資訊,並附上裝置編號 (E. 164 格式):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

已計算位置資訊,並顯示裝置編號 (非 E. 164 格式):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=01234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

已計算位置,但沒有裝置編號:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

已計算出位置資訊,並提供一般額外的緊急救援資訊:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&adr_carcrash_time=1643648829100&fall_detection_time=1643648829200&loss_of_pulse_time=1643648829201&emergency_type=MEDICAL

計算位置資訊、醫療資訊和緊急聯絡人 (假設緊急應用程式運作良好,且提供結構化資料):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&med_info_name=Alex+Smith&med_info_date_of_birth_gregorian=1990-01-03&med_info_height=6+ft&med_info_weight=100+kg&med_info_home_address=Test+Street+5%2C+80636+Munich&med_info_blood_type_abo=H_H&med_info_allergies=Peanuts&med_info_medications=Zestril&med_info_pregnancy_status=PREGNANT&med_info_pregnancy_due_date=2023-10-31&med_info_organ_donor=YES&med_info_other=Insurance+id%3A+12345

位置計算結果,包括醫療資訊和緊急聯絡人 (假設緊急應用程式運作正常,提供非結構化資料並設定所有可能的欄位):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&med_info_last_updated_time=1438101600000&med_info_name=Alex+Smith&med_info_date_of_birth_other=On+the+first+day+of+year+2000&med_info_height=180+cm&med_info_weight=10+stones&med_info_sex=INTERSEX&med_info_sex_extra=Transitioning+from+FEMALE+to+MALE&med_info_gender=non-binary&med_info_home_address=123+Halifax+Avenue%2C+Alexandria+12345&med_info_blood_type_other=Le%28a-b-%29&med_info_allergies=Latex&med_info_medications=Aspirin&med_info_conditions_history=ADHD&med_info_devices_mobility_requirements=Pacemaker&med_info_pregnancy_status=PREGNANT&med_info_pregnancy_due_date=2022-10-10&med_info_pregnancy_info=Planned+c-section&med_info_organ_donor=YES&med_info_organ_donor_extra=Only+heart+and+lungs&med_info_advanced_directives=DNS&med_info_physician_info=John+Doe%2C+34+Rainbow+street%2C+%2B123+456789&med_info_other=Privately+insured%2C+insurance+ID+123-ABC-987&econtact_0_name=John+Doe&econtact_0_phone_number=000+000&econtact_0_relationship=Father&econtact_1_name=Jane+Doe&econtact_1_phone_number=111+111&econtact_1_relationship=Mother&econtact_2_name=Alice+Smith&econtact_2_phone_number=222+222&econtact_2_relationship=Sister&econtact_3_name=Bob+Smith&econtact_3_phone_number=333+333&econtact_3_relationship=Brother&econtact_4_name=Charlie+Smith&econtact_4_phone_number=444+444&econtact_4_relationship=Brother&econtact_5_name=Dan+Smith&econtact_5_phone_number=555+555&econtact_5_relationship=Cousin&econtact_6_name=Eve+Smith&econtact_6_phone_number=666+666&econtact_6_relationship=Grandmother&econtact_7_name=Mallory+Smith&econtact_7_phone_number=777+777&econtact_7_relationship=Aunt&econtact_8_name=Trent+Smith&econtact_8_phone_number=888+888&econtact_8_relationship=Uncle&econtact_9_name=Xenia+Smith&econtact_9_phone_number=999+999&econtact_9_relationship=Sister&econtact_10_name=Yara+Smith&econtact_10_phone_number=10+10+10&econtact_10_relationship=Cousin&econtact_11_name=Zane+Smith&econtact_11_phone_number=11+11+11&econtact_11_relationship=Cousin&econtact_12_name=%28truncated%29

位置計算結果,含醫療資訊 (假設緊急應用程式提供無效、無邊界和非結構化資料的極端情況):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&med_info_last_updated_time=-1000&med_info_date_of_birth_gregorian=0000-00-00&med_info_sex_extra=Transitioning+from+FEMALE+to+MALE&med_info_blood_type_other=Le%28a-b-%29&med_info_pregnancy_due_date=3000-22-22&med_info_organ_donor_extra=Only+heart+and+lungs&med_info_other=Lorem+ipsum+dolor+sit+amet%2C+consetetur+sadipscing+elitr%2C+sed+diam+nonumy+eirmod+tempor+invidunt+ut+labore+et+dolore+magna+aliquyam+erat%2C+sed+diam+voluptua.+At+vero+eos+et+accusam+et+justo+duo+dolores+et+ea+rebum.+Stet+clita+kasd+gubergren%2C+no+sea+takimata+sanctus+est+Lorem+ipsum+dolor+sit+amet.+Lorem+ipsum+dolor+sit+amet%2C+consetetur+sadipscing+elitr%2C+sed+diam+nonumy+eirmod+tempor+invidunt+ut+labore+et+dolore+magna+aliquyam+erat%2C+sed+diam+voluptua.+At+vero+eos+et+accusam+et+justo+duo+dolores+et+ea+rebum.+Stet+clita+kasd+gubergren%2C+no+sea+takimata+sanctus+est+Lorem+ipsum+dolor+sit+amet.+Lorem+ipsum+dolor+sit+amet%2C+consetetur+sadipscing+elitr%2C+sed+diam+nonumy+eirmod+tempor+invidunt+ut+labore+et+dolore+magna+aliquyam+erat%2C+sed+diam+voluptua.+At+vero+eos+et+accusam+et+justo+duo+dolores+et+ea+rebum.+Stet+clita+kasd+gubergren%2C+no+sea+takimata+sanctus+est+Lorem+ipsum+dolor+sit+amet.+%0A%0ADuis+autem+vel+eum+iriure+dolor+in+hendrerit+in+vulputate+velit+esse+molestie+consequat%2C+vel+illum+dolore+eu+feugiat+nulla+facilisis+at+vero+eros+et+accumsan+et+iusto+odio+dignissim+qui+blandit+praesent+luptatum+zzril+delenit+augue+duis+dolore+te+feugait+nulla+facilisi.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit%2C+sed+diam+nonummy+nibh+euismod+tincidunt+ut+laoreet+dolore+magna+aliquam+erat+volutpat.+%0A%0AUt+wisi+enim+ad+minim+veniam%2C+quis+nostrud+exerci+tation+ullamcorper+suscipit+lobortis+nisl+ut+aliquip+ex+ea+commodo+consequat.+Duis+autem+vel+eum+iriure+dolor+in+hendrerit+in+vulputate+velit+esse+molestie+consequat%2C+vel+illum+dolore+eu+feugiat+nulla+facilisis+at+vero+eros+et+accumsan+et+iusto+odio+dignissim+qui+blandit+praesent+luptatum+zzril+delenit+augue+duis+dolore+te+feugait+nulla+facilisi.+%0A%0ANam+liber+tempor+cum+soluta+nobis+eleifend+option+congue+nihil+imperdiet+doming+id+quod+mazim+placerat+facer+possim+assum.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit%2C+sed+diam+nonummy+nibh+euismod+tincidunt+ut+laoreet+dolore+magna+aliquam+erat+volutpat.+Ut+wisi+enim+ad+minim+v%28truncated%29