Tricky question about trunks with custom extension

Discussion in 'General' started by javapaul, Jan 16, 2010.

  1. javapaul

    Joined:
    Jul 1, 2009
    Messages:
    99
    Likes Received:
    0
    Hi, Bare with me plz :), i have multiple trunks for my mobile phones, and i have this under my extensions_custom
    Code:
    [custom-mobile]
    exten => _XXXXXXX,1,Macro(user-callerid,SKIPTTL,)
    exten => _XXXXXXX,2,Set(LIMIT_WARNING_FILE=beep)
    exten => _XXXXXXX,3,Set(TRUNK_OPTIONS=tTwWL(210000:60000))
    exten => _XXXXXXX,n,Set(_NODEST=)
    exten => _XXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
    exten => _XXXXXXX,n,Macro(dialout-trunk,6,${EXTEN},,)
    exten => _]XXXXXXX,n,Macro(dialout-trunk,7,${EXTEN},,)
    exten => _XXXXXXX,n,Macro(outisbusy,)
    
    the problem that i'm having its that if i individualize each trunk with something like

    Code:
    [custom-1]
    exten => _XXXXXXX,1,Macro(user-callerid,SKIPTTL,)
    exten => _XXXXXXX,2,Set(LIMIT_WARNING_FILE=beep)
    exten => _XXXXXXX,3,Set(TRUNK_OPTIONS=tTwWL(210000:60000))
    exten => _XXXXXXX,n,Set(_NODEST=)
    exten => _XXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
    exten => _XXXXXXX,n,Macro(dialout-trunk,6,${EXTEN},,)
    exten => _XXXXXXX,n,Macro(outisbusy,)
    
    [custom-2]
    exten => _XXXXXXX,1,Macro(user-callerid,SKIPTTL,)
    exten => _XXXXXXX,2,Set(LIMIT_WARNING_FILE=beep)
    exten => _XXXXXXX,3,Set(TRUNK_OPTIONS=tTwWL(210000:60000))
    exten => _XXXXXXX,n,Set(_NODEST=)
    exten => _XXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
    exten => _XXXXXXX,n,Macro(dialout-trunk,7,${EXTEN},,)
    exten => _XXXXXXX,n,Macro(outisbusy,)
    
    [custom-test]
    include =>custom-1
    include =>custom-2
    
    when using the context [custom-test]
    if the trunk 6 (custom-1) its busy, the call would hang up and it wont go to trunk 7 (custom-2),i try removing the line
    exten => _XXXXXXX,n,Macro(outisbusy,)
    or adding at the end of [custom-1]
    include =>custom-2

    but it wont work either, perhaps i have a misconception about how it works, any ideas? Thanks a lot!
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    have you tried in custom-1
    .
    .
    exten => _XXXXXXX,n,goto(custom-2,${EXTEN},1)

    after finding the trunk busy?

    But maybe it would be easier if your outbound route selected in order the trunks you want to use, a busy trunk should just be bypassed and the next one tried.

    p.s.

    is the "]" in

    exten => _]XXXXXXX,n,Macro(dialout-trunk,7,${EXTEN},,)

    a typo?
     
  3. javapaul

    Joined:
    Jul 1, 2009
    Messages:
    99
    Likes Received:
    0
    the "]" whats a typing mistake, sorry, but i will try the Goto cmd Thanks again Dicko
     

Share This Page