EmergencyNumbers not correctly filled for brazilian operators

Bug #1334860 reported by Gustavo Pichorim Boiko
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
telephony-service (Ubuntu)
Fix Released
High
Tiago Salem Herrmann

Bug Description

Using a SIM card from VIVO, I get the following list of emergency numbers:

    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 08 000 999 110 112 911 118 119

And on a SIM card from OI, the same list is returned:

    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 08 000 999 110 112 911 118 119

But those are not the emergency numbers for Brazil, they should be similar to the numbers listed in ServiceNumbers:

    [ org.ofono.SimManager ]
        ServiceNumbers = [Ambulancia] = '192' [Defesa Civil] = '199' [Policia] = '190' [Bombeiros] = '193'

Tags: emergency

Related branches

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: New → Confirmed
Tony Espy (awe)
Changed in ofono (Ubuntu):
assignee: nobody → Martti Piirainen (piiramar)
importance: Undecided → High
Revision history for this message
Martti Piirainen (piiramar) wrote :

I'm not convinced yet that this is a valid bug.

I think that these Brazilian "public service" numbers (as listed e.g. in [1]) are not emergency numbers in the 3GPP cellular networking sense (as defined in [2]). They would not, for example, work without prior network registration or without a SIM card (see [3] for some special properties of these "real" emergency calls).

That's why the operators (Vivo and OI) have programmed their SIM cards according to [4]: The "real" emergency numbers are a combination of the phone's default list and of the ECC file on SIM, and presented as org.ofono.VoiceCallManager.EmergencyNumbers. The "public service numbers" are from the SDN file, presented as org.ofono.SimManager.ServiceNumbers.

When I dial the fire department (193), I would /expect/ a normal call set-up instead of an emergency call set-up (and, vice versa, would expect a failure e.g. without a SIM, with a locked SIM, with an expired SIM, etc.). Gustavo, can you double-check this (either by testing with existing devices, or by checking some local regulation documents)?

We certainly have one problem: The service numbers are not visible anywhere, I just reported bug 1337189 for that.

[1] http://www.telefonica.net.br/sp/utilidadepublica/emergencia.htm
[2] 3GPP TS 22.101 "Service principles", section 10 "Emergency Calls"
[3] 3GPP TS 24.008 "Mobile radio interface Layer 3 specification; Core network protocols", section 4.5.1.5 "MM connection establishment for emergency calls"
[4] 3GPP TS 31.102 "Characteristics of the Universal Subscriber Identity Module (USIM) application", sections 4.2.21 "EF_ECC (Emergency Call Codes)" and 4.2.29 "EF_SDN (Service Dialling Numbers)"

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: Confirmed → Incomplete
assignee: Martti Piirainen (piiramar) → Gustavo Pichorim Boiko (boiko)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

I can confirm that I can call 190 from my android without any sim card.

For example if I try to call "555" it shows the message "not network" but If I try "'190" it shows the calling screen. (I disconnect before it finish the call to avoid problems :D )

Revision history for this message
Tony Espy (awe) wrote :

So it would appear the AOSP may in fact not be reading the official emergency numbers from the RILD, and an instead is using it's own database to determine whether a number is an emergency number or not.

Note, however that if a SIM isn't inserted in a phone, the modem will do some checking as well, and just because AOSP thinks a number is an emergency number, if the modem doesn't, then the call won't be allowed.

We should check whether libphonenumber actually provides country-specific metadata and functions to properly vet emergency numbers.

Revision history for this message
Tony Espy (awe) wrote :

Note, one other use case that was question was what happens when a user is roaming in another country where the emergency numbers differ from those reported on the SIM. If/when we decide to leverage the emergency numbers from libphonenumber, perhaps the query uses the current MobileCountryCode ( at least in the cases where an unlocked SIM is available ).

tags: added: emergency
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@Gustavo or @Renato, could you please attach to the bug the output of "getprop" command in your Android phones?

affects: ofono (Ubuntu) → telephony-service (Ubuntu)
Changed in telephony-service (Ubuntu):
assignee: Gustavo Pichorim Boiko (boiko) → Tiago Salem Herrmann (tiagosh)
status: Incomplete → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package telephony-service - 0.1+15.10.20150810.1-0ubuntu1

---------------
telephony-service (0.1+15.10.20150810.1-0ubuntu1) wily; urgency=medium

  [ Tiago Salem Herrmann ]
  * Check contact results on the client side. Phone comparison in the
    server side is not reliable. (LP: #1476833)
  * Use libphonenumber for phone number validation, normalization and
    comparison. (LP: #1471545, #1444883, #1334860)

 -- CI Train Bot <email address hidden> Mon, 10 Aug 2015 22:45:07 +0000

Changed in telephony-service (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.