Is there a way?

Discussion in 'General' started by cowboy47, Aug 24, 2007.

  1. cowboy47

    Joined:
    Jun 14, 2007
    Messages:
    276
    Likes Received:
    0
    I am curious as to whether someone knows if this is possible? I have 6 local lines, 8 Sip lines and various extensions. I would like to set up the system so that when a group of extensions (for example 6700-6799) want to make local calls and they dial 9, that they are routed out to a specific line. If another group of extensions (lets say 6600-6699) wants to dial out for a local call, when they hit 9, they will be routed out another specific line. Same would apply to international calls.

    Does anyone know?

    Thx,

    C
     
  2. rejil.rajan

    Joined:
    Apr 8, 2007
    Messages:
    154
    Likes Received:
    0
    Hi

    This can be done by using two different contexts for the extension group. Once you have done that configure the line u would like to use in the first context and the next line should be done in the second context. This cannot be done from the front end, it can only be done in the backend by editing the extensions_custom.conf file.
     
  3. cowboy47

    Joined:
    Jun 14, 2007
    Messages:
    276
    Likes Received:
    0
    If I create the different contexts, do I need to copy anything from the default context?
     
  4. rejil.rajan

    Joined:
    Apr 8, 2007
    Messages:
    154
    Likes Received:
    0
    [from-internal]
    include => parkedcalls
    include => from-internal-custom
    include => speeddial_custom
    include => ext-fax
    include => from-internal-additional
    include => ext-local-confirm
    include => bad-number
    exten => s,1,Macro(hangupcall)
    exten => h,1,Macro(hangupcall)


    Copy the above and rename it into two different contexts.

    After the contexts have been created, include the outbound routes individually. Ensure that the outbound routes if created via the freepbx interface should be removed, else it will become applicable to both the contexts automatically.

    e.g of the extensions_custom.conf file.

    First create two trunks for each line

    [outrt-038-Line1]
    include => outrt-038-Line1-custom
    exten => _0ZX.,1,Macro(dialout-trunk,1,${EXTEN:1},,)
    exten => _0ZX.,n,Macro(outisbusy,)


    [outrt-038-Line2]
    include => outrt-038-Line2-custom
    exten => _0ZX.,1,Macro(dialout-trunk,2,${EXTEN:1},,)
    exten => _0ZX.,n,Macro(outisbusy,)


    [from-Line1]
    include => parkedcalls
    include => from-internal-custom
    include => speeddial_custom
    include => ext-fax
    include => from-internal-additional
    include => ext-local-confirm
    include => bad-number
    include => outrt-038-Line1
    exten => s,1,Macro(hangupcall)
    exten => h,1,Macro(hangupcall)

    [from-Line2]
    include => parkedcalls
    include => from-internal-custom
    include => speeddial_custom
    include => ext-fax
    include => from-internal-additional
    include => ext-local-confirm
    include => bad-number
    include => outrt-038-Line2
    exten => s,1,Macro(hangupcall)
    exten => h,1,Macro(hangupcall)

    After this for the extension, provide from-Line1 or from-Line2 based on the line that the extension has to use
     
  5. cowboy47

    Joined:
    Jun 14, 2007
    Messages:
    276
    Likes Received:
    0
    Just a question. Would it be possible to make some sort of a script that would generate these contexts? My thoughts are that if this were possible, then you could offer this as a feature where you could specifically specify outgoing ports or trunks. This would include local & international definitions.
     

Share This Page