Can't use second channel of a BRI (CHANUNAVAIL)

Discussion in 'General' started by amine00, Nov 10, 2010.

  1. amine00

    Joined:
    Nov 3, 2010
    Messages:
    2
    Likes Received:
    0
    Hello,

    I'm quite new to Elastix and Asterisk. I've managed to get the following architecture working:

    |VoIP LAN|====|Elastix|====|Patton|===0===|ISDN BRI|

    I have a SIP trunk between Elastix and the Patton and a BRI connection from the PSTN plugged to the Patton. I can make and receive calls but when I try to make or receive a second call simultanously I get the line is busy message with the following error on the logs:
    Code:
    "TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 17) - failing through to other trunks") in new stack
    It seems to me that creating a second teunk would help solving this but I've read that a single trunk can be used with multiple channels and this is what I'me trying to achieve.

    Below are the relevant versions and configs. Please tell me if you need something else to help me resolve this problem, thanks in advance for your assistance.

    Elastix 1.6-12 - IP: 192.168.2.254
    Patton sn4638 R5.2 - IP: 192.168.2.253

    Peer details of the trunk:
    Code:
    username=10000
    type=friend
    secret=somepass
    insecure=very
    host=192.168.2.253
    disallow=all
    context=from-pstn
    canreinvite=no
    allow=alaw&ulaw&g729
    dtmfmode=auto
    port=5060
    qualify=yes
    
    Patton conf:
    Code:
    #----------------------------------------------------------------#
    #                                                                #
    # SN4638/5BIS                                                    #
    # R5.2 2009-01-14 H323 SIP BRI                                   #
    # 1970-01-01T00:18:46                                            #
    # SN/00A0BA05DA12                                                #
    # Generated configuration file                                   #
    #                                                                #
    #----------------------------------------------------------------#
    
    cli version 3.20
    no terminal ssh
    administrator root password somepass encrypted
    webserver port 80 language en
    
    system
    
      ic voice 0
    
    system
      clock-source 1 bri 0 0
      clock-source 2 bri 0 1
      clock-source 3 bri 0 2
      clock-source 4 bri 0 3
      clock-source 5 bri 0 4
    
    profile ppp default
    
    profile call-progress-tone defaultDialtone
      play 1 1000 440 0
    
    profile call-progress-tone defaultAlertingtone
      play 1 1500 440 -7
      pause 2 3500
    
    profile call-progress-tone defaultBusytone
      play 1 500 440 -7
      pause 2 500
    
    profile tone-set default
    
    profile voip default
      codec 1 g711alaw64k rx-length 20 tx-length 20
      codec 2 g711ulaw64k rx-length 20 tx-length 20
      fax transmission 1 relay t38-udp
    
    profile pstn default
    
    profile sip default
    
    profile aaa default
      method 1 local
      method 2 none
    
    context ip router
    
      interface IF_IP_WAN
        ipaddress dhcp
        tcp adjust-mss rx mtu
        tcp adjust-mss tx mtu
    
      interface IF_IP_LAN
        ipaddress 192.168.2.253 255.255.255.0
        tcp adjust-mss rx mtu
        tcp adjust-mss tx mtu
    
    context cs switch
    
      routing-table called-e164 RT_ISDN_TO_SIP_0
        route T2 dest-interface IF_SIP_0 MAPPING_INCOMING_CALLS
    
      routing-table called-e164 RT_ISDN_TO_SIP_1
        route T2 dest-interface IF_SIP_1 MAPPING_INCOMING_CALLS
    
      routing-table called-e164 RT_ISDN_TO_SIP_2
        route T2 dest-interface IF_SIP_2 MAPPING_INCOMING_CALLS
    
      routing-table called-e164 RT_ISDN_TO_SIP_3
        route T2 dest-interface IF_SIP_3 MAPPING_INCOMING_CALLS
    
      routing-table calling-e164 RT_SIP_TO_ISDN_0
        route default dest-interface IF_ISDN_0 MAPPING_OUTGOING_CALLS
    
      routing-table calling-e164 RT_SIP_TO_ISDN_1
        route default dest-interface IF_ISDN_1 MAPPING_OUTGOING_CALLS
    
      mapping-table calling-pi to calling-e164 MAP_REMOVE_BLANK_CALLERID
        map restricted to ""
    
      mapping-table calling-e164 to calling-e164 MAP_LEADING_ZERO
        map (.%)-(.%)-(.%)-(.%)-(.%) to \1\2\3\4\5
        map (.%)-(.%)-(.%)-(.%) to \1\2\3\4
        map (.%)-(.%)-(.%) to \1\2\3
        map (.%)-(.%) to \1\2
    
      mapping-table calling-e164 to calling-name MAP_CID_TO_CNAME
        map (.%) to \1
    
      mapping-table calling-e164 to calling-e164 MAP_REMOVE_CALLERID
        map default to ""
    
      complex-function MAPPING_INCOMING_CALLS
        execute 1 MAP_REMOVE_BLANK_CALLERID
        execute 2 MAP_LEADING_ZERO
    
      complex-function MAPPING_OUTGOING_CALLS
        execute 1 MAP_REMOVE_CALLERID
    
      interface isdn IF_ISDN_0
        route call dest-table RT_ISDN_TO_SIP_0
        call-hold disable
        caller-name
    
      interface isdn IF_ISDN_1
        route call dest-table RT_ISDN_TO_SIP_1
        call-hold disable
        caller-name
    
      interface sip IF_SIP_0
        bind context sip-gateway GW_SIP_0
        route call dest-table RT_SIP_TO_ISDN_0
        remote 192.168.2.254 5060
        address-translation outgoing-call request-uri user-part fix 10000 host-part to-header target-param none
    
      interface sip IF_SIP_1
        bind context sip-gateway GW_SIP_1
        route call dest-table RT_SIP_TO_ISDN_1
        remote 192.168.2.254 5060
        address-translation outgoing-call request-uri user-part fix 10000 host-part to-header target-param none
    
    context cs switch
      no shutdown
    
    authentication-service AS_ALL_LINES
      realm 1 Elastix
      username 10000 password somepass encrypted
    
    location-service LS_10000
      domain 1 192.168.2.254
    
      identity-group default
    
        authentication outbound
          authenticate 1 authentication-service AS_ALL_LINES username 10000
    
      identity 10000
    
        authentication outbound
          authenticate 1 authentication-service AS_ALL_LINES
    
        registration outbound
          registrar 192.168.2.254 5060
          lifetime 300
          register auto
    
    context sip-gateway GW_SIP_0
    
      interface LAN
        bind interface IF_IP_LAN context router port 5060
    
    context sip-gateway GW_SIP_0
      bind location-service LS_10000
      no shutdown
    
    context sip-gateway GW_SIP_1
    
      interface LAN
        bind interface IF_IP_LAN context router port 5062
    
    context sip-gateway GW_SIP_1
      no shutdown
    
    context sip-gateway GW_SIP_2
    
      interface LAN
        bind interface IF_IP_LAN context router port 5064
    
    context sip-gateway GW_SIP_2
      no shutdown
    
    context sip-gateway GW_SIP_3
    
      interface LAN
        bind interface IF_IP_LAN context router port 5066
    
    context sip-gateway GW_SIP_3
      no shutdown
    
    port ethernet 0 0
      medium auto
      encapsulation ip
      bind interface IF_IP_WAN router
      no shutdown
    
    port ethernet 0 1
      medium auto
      encapsulation ip
      bind interface IF_IP_LAN router
      no shutdown
    
    port bri 0 0
      clock auto
      encapsulation q921
    
      q921
        protocol pp
        uni-side auto
        encapsulation q931
    
        q931
          protocol dss1
          uni-side user
          bchan-number-order ascending
          encapsulation cc-isdn
          bind interface IF_ISDN_0 switch
    
    port bri 0 0
      no shutdown
    
    port bri 0 1
      clock auto
      encapsulation q921
    
      q921
        protocol pp
        uni-side auto
        encapsulation q931
    
        q931
          protocol dss1
          uni-side user
          bchan-number-order ascending
          encapsulation cc-isdn
          bind interface IF_ISDN_1 switch
    
    port bri 0 1
      no shutdown
    
    port bri 0 2
      clock auto
      encapsulation q921
    
      q921
        protocol pp
        uni-side auto
        encapsulation q931
    
        q931
          protocol dss1
          uni-side user
          bchan-number-order ascending
          encapsulation cc-isdn
    
    port bri 0 2
      no shutdown
    
    port bri 0 3
      clock auto
      encapsulation q921
    
      q921
        protocol pp
        uni-side auto
        encapsulation q931
    
        q931
          protocol dss1
          uni-side user
          bchan-number-order ascending
          encapsulation cc-isdn
    
    port bri 0 3
      no shutdown
    
    port bri 0 4
      clock auto
      encapsulation q921
    
      q921
        uni-side auto
        encapsulation q931
    
        q931
          protocol dss1
          uni-side net
          bchan-number-order ascending
    
    port bri 0 4
      shutdown
    
    
     
  2. amine00

    Joined:
    Nov 3, 2010
    Messages:
    2
    Likes Received:
    0
    I solved the problem by rebuilding the patton conf from scratch and adding the line below to peer details in Elastix:

    call-limit=10

    To avoide this error:

    Call from peer '10000' rejected due to usage limit of 1
     

Share This Page