Problem with outbound rules

Discussion in '3CX Phone System - General' started by stangri, Oct 10, 2017.

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

    Joined:
    Oct 10, 2017
    Messages:
    28
    Likes Received:
    0
    I've done some preliminary testing trying to see if I can replace an ageing asterisk-based system with 3cx. Sure UI looks nicer and documentation is great and walks you thru basic setup.

    However once I've got trunks and clients added I ran into a problem. The PBX is used by customers and different countries (almost exclusively from smart phones, with the odd ATA device here and there) and the old dial plan relied on use of the '+' as the de-facto standard. I cannot go with US-default 011 nor with the EU-default 00, as:
    1. Either will be confusing to customers on another continent
    2. Everyone has the phone numbers starting with '+' stored in their address books, it will be a major disruption for users.

    From my limited testing, Android 3cx app also strips the '+' from the outgoing call, but also strips the whole '+1' sequence making it impossible to differentiate the 10-digit US-based calling from some international calls (where the total number length is 10). It's either apps stripping it or the server doing that.

    I'm wondering if there's a setting I missed or how can I make outbound rules which rely on use of '+' work with both Android and iOS 3cx apps.

    Thanks!
     
  2. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    You must activate E.164 processing (enabled by default).

    In E.164 processing setting you must define obligatory international dial code like 00 for Europe or 011 for USA. Optionally you can remove it, if dialing the same country, which could mean adding national prefix like 0 in most countries in Europe or 1 in USA.

    For dialing numbers starting with '+' sign, which is also the default format for storing in phone-books, etc., you must create an additional outbound rule for numbers starting with digit 1-9 and length typically of 11-32 digits to add prefix 00 or 011.

    You can't strip the '+' sign in outbound rules anymore (like in older versions), simply if a number starts with '+' -- it is omitted before outbound rules are processed, so if you try to dial number like +1 123 456 7890 in a soft-phone, the following number 11234567890 has to be processed by outbound rules.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    accentlogic likes this.
  3. stangri

    Joined:
    Oct 10, 2017
    Messages:
    28
    Likes Received:
    0
    Wherever you call it the '+' being omitted or stripped, it's the same bug. I need to get the number in Outgoing Rules exactly as it was dialed. Otherwise, there's no way to tell wherever the user has dialed 210-xxx-xxxx or +21-0-xxx-xxx for example.

    Why? In order to do what?

    How is it used by 3cx then?
     
  4. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    In this specific case you can differentiate only by number length, international numbers are usually at least 11 digits long, with few exceptions like Vienna, Austria -- +43 1 234 5678, which are 10 digits long. May be you can dial US national numbers with digit 1 in front of a 10-digit numbers, i.e. you dial 11 digits.

    Otherwise you can't handle the '+' sign.

    It is obligatory to be defined in 3CX E.164 settings, in earlier versions it was not, as far as I recall.

    I suggest you make some tests and observe activity log which outbound rule is used and how dialed number is modified. Test with active E.164 and with disabled, also test how home and other countries +international numbers are processed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,754
    Likes Received:
    285
    Yes, because in E.164, you replace the + with (for example), 00 (or a prefix your VoIP provider is expecting), so +21-0-xxx-xxx becomes 0021-0-xxx-xxx and can be processed differently in the outbound rules than 210-xxx-xxxx
     
  6. stangri

    Joined:
    Oct 10, 2017
    Messages:
    28
    Likes Received:
    0
    In the specific case I posted -- you can't because the numbers are the same length. There are different number length regulations around the world, that's why I need the '+' in the outbound rules.

    So if I disable "Process E164 numbers" -- will I get the + in the outbound rules if that's how it's dialed?

    If I enable "Process E164 numbers" and set the "International Dial Code" to "00", would I get the 00xxxxxxxxx when the user dials +xxxxxxxxx?

    Thanks!
     
  7. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,754
    Likes Received:
    285
    Yes, it should work that way. Most providers want numbers only, and some users store phone numbers in a directory with + as a leading character. the E164 "options" on 3CX allow this to work, as + must be converted to different international prefixes depending on location.
     
    stangri likes this.
  8. stangri

    Joined:
    Oct 10, 2017
    Messages:
    28
    Likes Received:
    0
    I've enabled E164 on the 3cx server and set the intl dialing code as '00'. So is the conversion (from + to 00) happening on the client or the server? If I'd want to use the non-3cx (generic sip) clients in the future, could I dial + from those now?
     
  9. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,754
    Likes Received:
    285
    Any "conversion" would happen within 3CX based on characters received from devices placing the calls. E164 is to overcome a issue where a number is stored, on a device, in a universal format (a + in place of an international prefix), such as on a mobile phone. That number might be taken from the directory to be used directly on the mobile network, or with the 3CX App.
     
  10. narkumas

    narkumas New Member

    Joined:
    Nov 28, 2016
    Messages:
    227
    Likes Received:
    29
    No, the Android client does not strip the +

    I do the whole processing of the phonenumber in the outbound rules without E164 processing..
    I guess You have a problem with Your outbound rules. PM me if You like. We could compare the settings.

    cheers
    Marius
     
  11. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,754
    Likes Received:
    285
    Going back to your original post. If you store all numbers, in a directory, with a + prefix, then you won't have 10 digit north American numbers, they will be 11 digits ...+1 XXX-XXX-XXXX as it is assumed that a country code will follow the + so that the number is recognised no matter where (in the world) you are. Locally, the 1 can be stripped, if required, after E164 processing.
     
  12. stangri

    Joined:
    Oct 10, 2017
    Messages:
    28
    Likes Received:
    0
    Marius,

    Do I understand you correctly that you have E164 disabled and then you can process the + in the outbound rules?
     
  13. narkumas

    narkumas New Member

    Joined:
    Nov 28, 2016
    Messages:
    227
    Likes Received:
    29
    Yes!
    You strip 1 Digit and prepend 00
     
Thread Status:
Not open for further replies.