How to remove "-" from incoming numbers.

Discussion in '3CX Phone System - General' started by neilhooper, Jul 28, 2014.

Thread Status:
Not open for further replies.
  1. neilhooper

    Joined:
    Jul 12, 2014
    Messages:
    16
    Likes Received:
    0
    Hi All,

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

    EG. 01234-123456 > 01234123456

    - Neil
     
  2. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    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)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,750
    Likes Received:
    285
    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.
     
  4. neilhooper

    Joined:
    Jul 12, 2014
    Messages:
    16
    Likes Received:
    0
    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
     
  5. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,750
    Likes Received:
    285
    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....
     
  6. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. neilhooper

    Joined:
    Jul 12, 2014
    Messages:
    16
    Likes Received:
    0
    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
     
  8. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. neilhooper

    Joined:
    Jul 12, 2014
    Messages:
    16
    Likes Received:
    0

    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
     
  10. pj3cx

    pj3cx Active Member

    Joined:
    Aug 1, 2013
    Messages:
    645
    Likes Received:
    1
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. neilhooper

    Joined:
    Jul 12, 2014
    Messages:
    16
    Likes Received:
    0
    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
     
Thread Status:
Not open for further replies.