Ticket #463 (closed enhancement: fixed)
retrieve prefix codes automatically from SIM
| Reported by: | spaetz | Owned by: | mrmoku |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | libphone-ui | Version: | SHR-unstable |
| Keywords: | Cc: |
Description
Given Ainulindale's announcement that we handle international number resolution in dialer and messages now:
/etc/frameworkd-phonegui.conf: [local] international_prefix = 00 national_prefix = 0 country_code = 33 home_prefix =
Can we leave the default commented out and scrape it from the SIM card? We have the home phone number on it, so it should be possible.
Change History
comment:1 Changed 4 years ago by spaetz
- Owner changed from quickdev to ainulindale
- Status changed from new to assigned
comment:2 follow-up: ↓ 10 Changed 4 years ago by dos
- Component changed from libframeworkd-phonegui-efl to libframeworkd-phonegui
root@om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.Network.GetCountryCode?
('+48', 'Poland')
root@om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SIM.GetHomeZones?
[]
That methods can be usable ;)
comment:3 Changed 4 years ago by mrmoku
ok, so the only thing we get from frameworkd is the country code. We don't get international_prefix and we don't get national_prefix. And apart from home_prefix not being used right now, we don't get that neither.
So I would suggest to just get the country_code from frameworkd and leave the other three as is. 00 and 0 for international/national prefix is a quite common thing I think.
comment:4 Changed 4 years ago by spaetz
Agreed. Defaulting international/national to 00 and 0 sounds sensible. I don't know any situation where it would be different, so I think defaulting to that is a safe bet for now.
comment:5 Changed 4 years ago by dos
mrmoku: I don't have home zones here, that's why reply is []. Can you check that method?
comment:6 Changed 4 years ago by spaetz
I don't have hoe zones either and it's also empty for me. sorry I can't help more with that. But leaving it empty by default for now seems ok to me.
comment:7 Changed 4 years ago by ThomasW
For me, the method returns the following values:
root@om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SIM.GetHomeZones
[('home', 350748, 540117, 55225)]
How should this information be interpreted? Is it about my O2 Homezone?
comment:9 Changed 4 years ago by spaetz
thanks for the home zone information. Does anyone know how it is constructed? Cell IDs or something?
comment:10 in reply to: ↑ 2 Changed 4 years ago by TAsn
Replying to dos:
root@om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.Network.GetCountryCode?
('+48', 'Poland')
root@om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SIM.GetHomeZones?
[]
That methods can be usable ;)
No these won't since you chose the wrong one for Country code :)
We want the country code info of our HOME country, not the current country, therefore we should use
mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SIM.GetSimInfo?
{ 'country': 'Israel', 'dial_prefix': '+972', 'imsi': 'XXXXX'}
which returns the correct values as registered in your sim card, not the network, this is a much better behavior, and you can for instance go abroad without worrying it might change the prefix... :) we should btw re-get these values on boot, since we can for instance, switch sims for instance...
comment:12 Changed 4 years ago by spaetz
- Milestone changed from MS1 to MS2
Fixing this would be nice indeed. But it's not going to hold up Milestone 1.
comment:13 Changed 3 years ago by Heinervdm
- Component changed from libframeworkd-phonegui to libphone-ui
comment:14 Changed 3 years ago by TAsn
- Status changed from assigned to closed
- Resolution set to fixed
Aleardy retrieved automatically (if sim is available) in shr-wizard, and we'll also add choosing a country using a combo box.
