Project

General

Profile

Actions

Support #47

closed

remove all spaces phone number LDAP

Added by Sébastien COURATIN over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/10/2021
Due date:
% Done:

100%

Estimated time:
2:00 h

Description

I have à VCAR "+33 6 87 49 53 88"

whit default config
country = "FR"
int = 33 # Your international dial code. 1 = US, 49 = Germany, ...
area = 80 # Your local area code (without a leading 0)
areaPrefix = "0" # Dial prefix for national calls (has to be written as "string")
maxarealength = 7

I have "06 87 49 52 88"

But I want "0687495288"

which variable should I add in the config file?

Regards


Files

l2cpbg_0.9.3beta6_amd64.deb (9.91 MB) l2cpbg_0.9.3beta6_amd64.deb Jörg Ebeling, 09/15/2021 08:53 PM
Actions #1

Updated by Sébastien COURATIN over 2 years ago

it's not a bug sorry

Actions #2

Updated by Jörg Ebeling over 2 years ago

  • Tracker changed from Bug to Support

Hi Sébastien.

Thanks a lot asking for support.

Unfortunately it isn't supported at the moment. But please read on...

The phone numbers get formatted currently by a powerful Google phone number library.
So, the resulting "06 87 49 52 88" phone number, from your "+33 6 87 49 53 88" VCard input, is the "pretty" version of what Google's library means how a French number get commonly displayed.
I just googled a little bit about the French telephone number plan, and it look okay for me.

You can disable this "pretty" number formatting within L2CPBG with config option:

[location]
prettifyNums = false

but then you'll receive it in the same format as it was in your VCard number "+33 6 87 49 53 88".

Could you please explain what's the reason why you want it without the spaces?
May be I find an easy implementable option within the library for your support request.

Actions #3

Updated by Sébastien COURATIN over 2 years ago

Thank you for your answer !
I have a limited asterisk operator that does not support space in phonenumbers.
For now I have modified my carddav code to remove spaces before they are sycronized on L2CPBG.

It works but I would prefer it to be handled by L2CPBG.

Regards,

Actions #4

Updated by Jörg Ebeling over 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
  • Estimated time set to 2:00 h

Will implement a

[location]
  prettifyRemoveSpaces = true|false

config option

Actions #5

Updated by Jörg Ebeling over 2 years ago

Hi Sébastien!

Within the attached 0.9.3beta6 there's a new config option

[location]
  prettifyRemoveSpaces = false|true

It is false (off) by default, so you need to add

[location]
  prettifyRemoveSpaces = true

to your config.

As I'm not aware of your special use case, there's another #48 config option location.prettifyNoAreaInSameArea which is true (on) by default. This will skip dialing the local area code if you're in the same local area. You probably need to disable it if you don't like it.

Lastly, when reading https://en.wikipedia.org/wiki/Telephone_numbers_in_France, I've the opinion that your location.area should be 8 instead of 80!!

Your resulting location settings should look like this:

[location]
country = "FR"
int = 33 # Your international dial code. 1 = US, 49 = Germany, ...
area = 8 # Your local area code (without a leading 0)
areaPrefix = "0" # Dial prefix for national calls (has to be written as "string")
prettifyRemoveSpaces = true
maxarealength = 7

Looking forward to your response/result.

Actions #6

Updated by Jörg Ebeling over 2 years ago

Hi Sébastien!

or did you forgot to adapt the area code in your location settings?
Because, when checking your mails signature, then your're in area = 1

Actions #7

Updated by Jörg Ebeling over 2 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Go to top