Ticket #2085 (new defect)

Opened 10 years ago

Last modified 2 years ago

Combining SIM telephone numers in single contact and improved import and export

Reported by: pander Owned by: openmoko-devel
Priority: normal Milestone:
Component: unknown Version: Om2008.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible: always


The key of a telephone number on a SIM is maximum 16 characters and has only one value, which is a telephone number. Sony Ericsson and other phone manufactures use the following naming convention for storing different telephone numbers for a single contact.

The key is in this format:


When this string is longer than 16 characters, firstly the LastName? will trunkated, secondly then the FirstName? will be truncated. The colon will alwyas be there, even if the LastName? is truncated all together. The numbers 1, 2, 3, 4 indicate the type of telephone number, being:
1 mobile
2 home
3 work
4 other

In order to correctly work with this naming scheme the following use cases are identified:

1) listing SIM contacts

SIM contacts of which its telephone number is not in any contacts in address book, should be listed as a SIM contact with a different icon as a address book contact

2) importing new SIM contacts to address book contacts

This should be asked at start up of the telephone. Only SIM contacts of which the telephone number is not in any of the address book contacts should be taken into consideration.

Both a batch mode and an interactive mode should be presented. In the interactive mode it is possible to:

  • skip a SIM contact
  • delete a SIM contact
  • import a SIM contact

Note that the import will combine telephone numbers according to the above naming convention. All different numbers should be shown for a combined SIM contact when the user chooses one of the three options as stated above.

This would be useful when you use your telephone for the first time with a SIM that has contacts. To be able to decline the request made at start up is convenient when, on a one time occasion, someone else's SIM is being used in your telephone. A default warning should be shown that importing contacts is not desired in the latter situation since the telephone is not really associated with this SIM on a long term bases.

3) exporting address book contacts to SIM contacts

This should overwrite all the contacts on the SIM, as in delete all the contacts and only write address book contacts to the SIM. Here the naming convention mentioned above should be used. Before the export is being made, a check should be made if all the contacts will fit on the SIM. If this is not the case, the maximum number of telephone numbers that will fit on this SIM should be listed, as well as the number of telephone numbers in the address book contacts. Now the user can cancel this operation to perhaps do some cleaning up in the address book to be sure that all will be copied to the SIM.

Perhaps the address book should have an indicator saying how much telephon numbers can be added to avoid overflow of the SIM. E.g. 100/250 with 100 in green, being the number of telephone numbers and 250 being the maximum a SIM can hold. And e.g. 260/250 with 260 in red, indicating that there are more numbers in the address book than the SIM can store.


types.png (2.9 KB) - added by pander 10 years ago.

Change History

Changed 10 years ago by pander

comment:1 Changed 10 years ago by pander

A small correction:

The numbers 1, 2, 3, 4 indicate the type of telephone number, being:
1 Mobile (icon of a mobile)
2 Home (icon of a house)
3 Work (icon of an office building with multiple floors)
4 Fax (icon of a fax with a paper sticking out)
5 Other (some default icon of a sheet of paper with folded corner)

See also attached screen shot types.png.

comment:2 Changed 10 years ago by pander

Also special characters like è, é, etcetera will be removed from FirstName? and LastName? before the truncation process.

comment:3 Changed 10 years ago by pander

Small correction on the latetest comment:

Special characters like è, é, etcetera are at the moment supported and need not to be removed.

comment:4 Changed 10 years ago by pander

The presence of the ';' and the '[1-4]' can be used to detect contacts that are created with this convention. Than these need to be merged into *virtual SIM contacts* where the different numbers are combined into one contact. All other contacts can be shown as normal SIM contacts like now.

In the future, (semi)automated import of normal and combined virtual SIM contacts into address book should be possible. Also the export according to this format of the address book to SIM. When the SIM will be used in another telephone (like e.g. Sony Ericsson) the contacts can be combined and imported correctly.

comment:5 Changed 10 years ago by pander

comment:6 in reply to: ↑ description Changed 10 years ago by h.koenig

Replying to pander:

The key is in this format:


When this string is longer than 16 characters, firstly the LastName? will trunkated, secondly then the FirstName? will be truncated. The colon will alwyas be there, even if the LastName? is truncated all together. The numbers 1, 2, 3, 4 indicate the type of telephone number, being:
1 mobile
2 home
3 work
4 other

from Nokia phones (e.g. E50/E51) I'm used to distinuish between mobile-private and mobil-work. the E51 offer the following entries for numbers (don't ask me for their internal key encoding though). so please think *big* ;)

Mobile (home)
Mobile (business)
Tel. (home)
Tel. (business)
Car phone
Fax (home)
Fax (business)
Video call
Video call (home)
Video call (business)
Internet telephone
Internet telephone (home)
Internet telephone (bus.)
Assistant's number

comment:7 Changed 10 years ago by pander

h.koenig, could you insert such a SIM in a FreeRunner? and try to reverse engineer the naming scheme?

comment:8 Changed 10 years ago by pander

When no semi column is present, then only the first name is provided, see


should be


comment:9 Changed 10 years ago by dos

After looking on opimd code, it looks like it should be easy to implement it in FSO. I will play with it in future.

comment:10 Changed 10 years ago by pander

Simple display fix:

semicolon = name.find(';')
type = name.find('/')
if semicolon != -1 and type != -1 and len(name) == type + 2:
	name = name[semicolon+1:type] + ' ' + name[:type]

comment:11 Changed 10 years ago by joerg

I suggest to augment this with the following rules:
1) if both names are not truncated, then pad <lastname> with a space char
last ;first/1
2) if lastname is truncated but firstname is not, then pad firstname with space char
las;first /1
3) we are aware there might be cases when name actually isn't truncated, but due to length limit we can not add any space padding. Any compare algorithm or display formating should handle this cases gracefully.

comment:12 Changed 2 years ago by Chassmetly

Cephalexin And Yeast Infections <a href=http://zol1.xyz/can-i-buy-zoloft-online.php>Can I Buy Zoloft Online</a> Cheapest Way To Buy Viagra Kamagra Us <a href=http://cial5mg.xyz/cheap-generic-cialis.php>Cheap Generic Cialis</a> Diferencia Viagra Y Cialis Free Shipping Stendra <a href=http://viag1.xyz/buy-viagra-online-usa.php>Buy Viagra Online Usa</a> Buy Viagra In Ontario Buy Generic Levitra <a href=http://kama1.xyz/kamagra-pill.php>Kamagra Pill</a> Pay With Check By Phone Com <a href=http://kama1.xyz/generic-kamagra-online.php>Generic Kamagra Online</a> Toradol Online Without Prescription Us Cvs Propecia Hair Growth <a href=http://cial1.xyz/get-cheap-cialis-online.php>Get Cheap Cialis Online</a> Cialis Generico Venta Amoxicillin For Diverticulosis <a href=http://cial5mg.xyz/brand-cialis.php>Brand Cialis</a> Cialis Puo Non Funzionare Provera Internet Low Price <a href=http://cial1.xyz/fast-delivery-cialis.php>Fast Delivery Cialis</a> Body Mass Propecia Vitamin Deficiencies <a href=http://viag1.xyz/cheap-generic-viagra.php>Cheap Generic Viagra</a> Achat Cialis Paiement Cheque Voltaren Retard <a href=http://kama1.xyz/order-kamagra-gel.php>Order Kamagra Gel</a> Order Cialis Online In Usa Fastest Place Online To Order Clomid <a href=http://zol1.xyz/zoloft-online-no.php>Zoloft Online No</a> Stendra Can I Purchase Levitra 20 Mg Prospecto <a href=http://zol1.xyz/zoloft-free-trial.php>Zoloft Free Trial</a> Cialis 20 Mg Duree Kamagra Oral Jelly Youtube <a href=http://zol1.xyz/cheap-zoloft-20mg.php>Cheap Zoloft 20mg</a> Results Generic Propecia Viagra Comprar Espana <a href=http://zol1.xyz/sertralina-generic.php>Sertralina Generic</a> Amoxicillin And Abnormal Menstual Cycles Tretinoin Cream 0.1 For Sale <a href=http://zol1.xyz/zoloft-online-buy.php>Zoloft Online Buy</a> Priligy Sin Receta Andorra Keflex 750mg Dosage <a href=http://zol1.xyz/buy-zoloft-online-usa.php>Buy Zoloft Online Usa</a> Cialis Resultats Sildenafil Precio <a href=http://cial5mg.xyz/cialis-online-usa.php>Cialis Online Usa</a> Buy Misoprostol Tablets Online Cialis 20 Mg De <a href=http://cial5mg.xyz/generic-for-cialis.php>Generic For Cialis</a> Cialis Immagini Purchase Cialis For Daily Use Online <a href=http://zol1.xyz/zoloft-pills.php>Zoloft Pills</a> Propecia Experience Male Pattern Baldness Women'S Viagra For Sale <a href=http://cial5mg.xyz/order-cialis.php>Order Cialis</a> Need Zentel Delivered On Saturday In Internet Overseas Propecia Generica Online <a href=http://nolvadex.ccrpdc.com/best-place-to-buy-nolvadex.php>Best Place To Buy Nolvadex</a> Generic Macrobid On Sale Canada Mastercard Acceptedglucophage Finpecia Uk <a href=http://prednisone.ccrpdc.com/ordering-deltasone-online.php>Ordering Deltasone Online</a> Acheter Du Clomid En Bus Amoxicillin Low Cost <a href=http://cial1.xyz/buy-generic-cialis.php>Buy Generic Cialis</a> Cialis Brand 10mg Online Kaufen When Does An Amoxicillin Capsule Expire <a href=http://cial1.xyz/cialis-free-offer.php>Cialis Free Offer</a> Comprar Cialis Por Internet Foro Viagra Urgente <a href=http://zol1.xyz/buy-zoloft-on-line.php>Buy Zoloft On Line</a> Viagra Farmacia Comprar 100 Mg Brand Viagra And Cialis <a href=http://cial5mg.xyz/best-cialis-online.php>Best Cialis Online</a> Achat Baclofene En Ligne Precio Cialis 5 Mg <a href=http://cial1.xyz/buying-cialis-online.php>Buying Cialis Online</a> Is Alli Back On The Market Yet 2014

Note: See TracTickets for help on using tickets.