How to remove "-" from incoming numbers.

Status
Not open for further replies.

neilhooper

Free User
Joined
Jul 12, 2014
Messages
27
Reaction score
2
Hi All,

Is it possible to remove the "-" from incoming numbers?

EG. 01234-123456 > 01234123456

- Neil
 
Hi Neil,
What provider are you using?
Could you paste an INVITE of such incoming call from Server Activity Log in Verbose mode please?
(You can replace your own numbers by XXX)
 
Is this coming from the provider (as confirmed by the 3CX logs) , or is the phone itself inserting this? Some phone displays will "format" numbers (insert dashes or spaces based on the format in a specific country) automatically, to make them more legible.
 
leejor said:
Is this coming from the provider (as confirmed by the 3CX logs) , or is the phone itself inserting this? Some phone displays will "format" numbers (insert dashes or spaces based on the format in a specific country) automatically, to make them more legible.
pj3cx said:
Hi Neil,
What provider are you using?
Could you paste an INVITE of such incoming call from Server Activity Log in Verbose mode please?
(You can replace your own numbers by XXX)

Hi Both,

The provider is BT as we're in the UK.

Here is the first few lines of an incoming call through the PSTN Gateway which is a Patton 4112 FXO

- Neil

Code:
28-Jul-2014 18:08:29.743   IncomingCall: C:46 from <sip:08000-728270@'PSTN Gateway':5060> to <sip:10000@'3CX':5060>
28-Jul-2014 18:08:29.743   Added leg L:C:46.1[No endpoint yet]
28-Jul-2014 18:08:29.742   UasSession 147267 started
28-Jul-2014 18:08:29.742   Call from <sip:08000-728270@'PSTN Gateway':5060>;tag=8452b87401 to <sip:anonymous@'3CX':5060>;tag=c07e6b6f
 
This came up about four years ago... http://www.3cx.com/forums/removing-dash-from-uk-bt-caller-id-17785.html

At the time, no one came forward with a work around. Perhaps things have changed....
 
Perhaps it's your gateway adding this dash, check if any setting to not do so in its interface.
Otherwise I'm thinking of having a Caller ID formating on inbound calls, you could do that in Voip/PSTN Gateways / your gateway / your port(s) / Other Options / Incoming CID Formatting / Add New
Source CID Pattern : (.*)-(.*)
New Source CID Pattern : \1\2
Ok
Try a new call
 
pj3cx said:
Perhaps it's your gateway adding this dash, check if any setting to not do so in its interface.
Otherwise I'm thinking of having a Caller ID formating on inbound calls, you could do that in Voip/PSTN Gateways / your gateway / your port(s) / Other Options / Incoming CID Formatting / Add New
Source CID Pattern : (.*)-(.*)
New Source CID Pattern : \1\2
Ok
Try a new call

This didn't work. The number was displayed exactly the same. I think it's because you can only use (.*) once and it must be at the end. If used before the end all variables added after it are ignored as per http://www.3cx.com/blog/docs/cid-formatting/

What did work was this (.....)-(.*) > \1\2

However before I found this out I had a call from 0121-354 0949 I can't see how it's going to be possible to remove the - and space from this number and still be able to do the above.

- Neil
 
I see, well here its a workaround, you should rather investigate the source of the problem on the gateway side as I suspect it is where the dashes are added.
 
pj3cx said:
I see, well here its a workaround, you should rather investigate the source of the problem on the gateway side as I suspect it is where the dashes are added.


They are not added at the gateway. It is a well know fact that BT add them and the spaces. This may not happen in other countries but is does happen in the UK. If you plug in an analogue phone into the line before the gateway the dashes and spaces will show up.

The problem is, as far as I can tell, 3cx.

We have over 1200 contacts stored with no dashes or spaces in them. If we import them into the 3cx phonebook at the moment none of them get recognised as 3cx wants an exact match. I think it would be much easier if 3cx ignored any dashes, spaces etc or provided a simple function to remove these on incoming calls. Let's hope they're reading this !!!

- Neil
 
Hmm ok you could add this as a feature request on 3CX Ideas : http://www.3cx.com/ideas,
That being said, how about adding a second rule with with filters :
(....)-(...) (.*) > \1\2\3
 
I did think of that and it's the way I may have to go for now I just wasn't sure of how the rules would interact with each other if at all.

I'd not taken much notice before but I had two calls this morning on my mobile phone over the phone network and not VOIP; one from someone I know and one from someone I didn't. The interesting thing was that the one I didn't know had the dash in the number as expected, the one I did know was found in my phone contacts and displayed accordingly. I checked the contact and the number is stored without any dashes or spaces. Therefore I'm assuming that my phone strips out all non numeric characters except + to be able to match to a contact.

You would think that this behaviour would be incorporated into 3cx as standard and the use of reformatting for this situation wouldn't be needed.

- Neil
 
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,834
Messages
589,287
Members
164,663
Latest member
svdDGS