Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Create special dial codes for particular trunk to use?

Discussion in '3CX Phone System - General' started by pacpac, Feb 4, 2012.

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

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    Hi, I have 3 VoIP providers set in 3CX. Is there a way I could create a dial code preceding dialing a number indicating winch trunk (VoIP provider) that particular number should be routed on a call-by-call basis?
     
  2. jpillow

    jpillow Well-Known Member

    Joined:
    Jun 20, 2011
    Messages:
    1,342
    Likes Received:
    0
    You can to go outbound rules and set for certain extensions making the call, or extension groups making a call to use certain VoIP provider. Or configure for the VoIP provider to be decided upon by indicating what "calls to numbers with a length" (area code, prefix, etc) is dialed for that particular call. Hope this helps
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    Thanks, helpful.
     
  4. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Just to add to what jpillow said.

    In your outbound routes you can select which voip provider to use...so it would be simple to set up 3 outbound routes each with their own prefix and then choose which provider to use.

    Such as for a 10 digit call with 2 digit prefix

    Calls to numbers starting with Prefix: 97
    Calls from extension: optional
    calls with numbers of length: 12
    extension group:eek:ptional

    route 1 "voip provider 1"
    strip digits 2


    Then just repeat with another prefix like "98".
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    Hi, thanks. I tried as you suggested. However, when dialing the prefix (e.g. 97) before the number I just get a fast busy tone and the call does not go through. This is my dial plan in PAP2T:

    (00x.|<0:0044>[1-357-9]xxxxxxxx|<0:0044>[1-357-9]xxxxxxxxxS0|*xxx|*xx|*x|[1-9]xxS0)

    Do I need to make changes in the dial plan?

    Thanks.
     
  6. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    I prefer to have that particular dial plan in place since it enables calls to the UK to be dialed as 020 7xx, 020 8xx etc. I set a 'default' outbound rule using the primary VoIP provider enabling UK dialing as above and other countries as 00 + country code etc. I then created 3 different outbound rules for 3 VoIP providers with prefixes 001, 002 and 003. When using a VoIP provider on demand I dial 001 (or 002 or 003) then 00 + country code etc. I have also created two additional outbound rules pertaining to 2 specific numbers to be automatically routed to one specific VoIP provider.

    This set-up works fine after some testing and meets my requirements. Many thanks to jpillow and netswork.
     
  7. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,071
    Likes Received:
    323
    You could add |<960:960044>[1-357-9]xxxxxxxxxS0|,to the PAP2T dialplan that would allow a 96 prefix to a number that matches an existing string, in the ATA. You could use a single digit access code too.

    So you'd dial 960137123456789, 3CX would strip off the 96 (on the outbound rule you create for this) and send out on the trunk you choose. Other prefixes could be set up the same way
     
  8. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    OK, so the complete dial plan will look like this?

    (00x.|<0:0044>[1-357-9]xxxxxxxx|<0:0044>[1-357-9]xxxxxxxxxS0|<960:960044>[1-357-9]xxxxxxxxxS0|*xxx|*xx|*x|[1-9]xxS0)

    If I then set an outbound rule with 96 prefix and dial 960207xxx (London number) I will use VoIP provider 2 and if I dial 0207xxx I will use the 'default' outbound rule? The 'default' outbound rule has no prefix set in 3CX.
     
  9. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,071
    Likes Received:
    323
    That should work for you, as long as your outbound rules are set up properly. As I said, you don't need to use two digits to differentiate trunk groups. People usually resort to two because they use "9" as an outside access code. Because you don't, you could just use 9 for one group and 8 for another.

    I'm not certain why you have this entry. Other than digit length it is a duplicate of the next rule without the "send now". I was under the impression that all UK numbers totalled to the same length.
     
  10. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    You are right, I have simplified the basic dial plan to, which works perfectly OK dialing 0207xxx etc. for the UK:

    (00x.|<0:0044>[1-357-9]xxxxxxxxxS0|*xxx|*xx|*x|[1-9]xxS0)

    However, I have tried most 1 and 2 digit as the prefix for the trunk extension, does not work; only fast busy signal. The only thing I can get to work is a 3-digit combination, i.e. 001, 002. Also, if I insert as follows having a 001 trunk extension prefix and dial 0207xxx, again; fast busy signal:

    (00x.|<0:0044>[1-357-9]xxxxxxxxxS0|<0010:0010044>[1-357-9]xxxxxxxxxS0|*xxx|*xx|*x|[1-9]xxS0)

    It looks like the only way I can get it to work is to use the basic dial plan as above and dial the following 001 (for the trunk prefix) then 00 and country code etc.

    Note that I need to Prepend 0011101 and strip 2 digits for 1 VoIP provider in order to get that provider to work.

    Any ideas?
     
  11. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,071
    Likes Received:
    323
    So if you put in |<90:90044>[1-357-9]xxxxxxxxxS0| AND you create an outbound rule, in 3CX, that accepts 90044 ,prefix 15 digit numbers, strips 1 (the 9) that then sends out on a trunk (0044xxxxxxxxxx), that won't work?

    You might need to modify your 3 digit rule to be a bit more specific (eliminate zero as a second digit) |[1-9][1-9]xS0|
     
  12. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    Hi, I have amended the outbound rule to prefix 90044, strip 1 digit, 15 numbers and set this dial plan in PAP2T:

    (00x.|<0:0044>[1-357-9]xxxxxxxxxS0|<90:90044>[1-357-9]xxxxxxxxxS0|*xxx|*xx|*x|[1-9][1-9]xS0)

    When I now dial 90207xxx it goes through the trunk intended and when I dial 0207xxx it goes through the default trunk. However, I am not able to dial international calls, i.e. 00 then country code etc. Do I need to further amend the dial plan?
     
  13. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,071
    Likes Received:
    323
    Yes, you currently have it limited to calls for the UK, country code 44. you could replace the "44" with xx or other qualifiers, allowing specific country codes only. Then you have to consider the "area" code restrictions that you have set up for UK numbers. If you want to leave all that in place you can add something like |<0:00[1-35-9][0-35-9>xxxxxxxxxxS0|

    The problem you may run into is digit length. Not all international numbers are the same length (two digit country code plus 10 digits). You might have to replace the S0 at the end, with a period. In fact some countries (Canada & US) only require a single digit, you you'd have to accommodate that too.
     
  14. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    Understand, it might not be possible. I am back to my initial dial plan (replacing '44' with 'xx' does not work, I see from Trunk Status when calling that 3CX actually tries to call 'xx' in the Destination field):

    (00x.|<0:0044>[1-357-9]xxxxxxxxxS0|*xxx|*xx|*x|[1-9]xxS0)

    For Outbound Rules I have configured prefix 001 for Trunk 1 and prefix 002 for Trunk 2 (strip 3 digits and nothing in number length field), no prefix for default trunk (strip 0 digits and nothing in number length field). This way, I can dial as follows:

    To use default trunk:
    UK numbers: 0207xxx
    International: 00 country code, etc.
    To use Trunk 1:
    UK numbers: 001 00 44 0207xxx
    International: 001 00 country code etc.
    To use Trunk 2:
    UK numbers: 002 00 44 0207xxx
    International: 002 00 country code etc.

    Ideally, I would like it to be (9 for Trunk 1 and 8 for Trunk 2, or any other single digits):
    To use default trunk:
    UK numbers: 0207xxx
    International: 00 country code, etc.
    To use Trunk 1:
    UK numbers: 9 0207xxx
    International: 9 00 country code etc.
    To use Trunk 2:
    UK numbers: 8 0207xxx
    International: 8 00 country code etc.

    Possible?
     
  15. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,071
    Likes Received:
    323
    If you do some searches on the net you will find a lot of sites that go into varying degrees of detail on how to set up Linksys/Cisco dialplans, some better than others. These are some examples.

    http://www.solidfluid.co.uk/sfsite.php/00000223
    http://www.toao.net/108-linksys-dial-plan-tips
    http://www.netphonedirectory.com/pap2_dialplan.htm
    http://www.scribd.com/doc/238209/LinksysSipura-Dial-Plan-tutorial

    You can get dialplans (in the set/ATA), and 3CX outbound rules, to do just about anything you want, but it can require some patience, perseverance, and, trial and error, to get it working the way you want. There are a number of simple plans that will accept the digits, but require you wait, until a time-out, before sending the digits to the PBX, or require the use of # as a "dial now" signal.

    It becomes a lot more complicated when you are trying to manipulate international numbers as opposed to local, given the varying number of the digits.

    Don't forget that you've overcomplicated things (a bit) by trying to simplify your UK dialling by eliminating the need to dial 0044 as if the call were national. You will have to dial all other international calls with 00 and add the country code yourself.
     
  16. pacpac

    Joined:
    Jan 12, 2012
    Messages:
    58
    Likes Received:
    1
    Hi, thank you for the site references, still a bit alien to me. Could you recommend a three outbound rules and one dial plan, which will enable the following, including 3CX's star (*) codes, 1,2 and 3 digits for extensions, voicemail, echo test etc.:

    To use default trunk:
    All numbers: 00 country code, etc.
    To use Trunk 1:
    All numbers: 9 00 country code, etc.
    To use Trunk 2:
    All numbers: 8 00 country code, etc.

    Greatly appreciated, thanks in advance.
     
Thread Status:
Not open for further replies.