2 Replies Latest reply on Dec 8, 2015 8:27 AM by bflippen

    How to route to a differnt SIP trunk based upon DNIS

    bflippen New Member

      644

      Currently 4 SIP trunks coming in/out and 4 PRI interfaces in use.

      They want to add an outbound asterix dialer to the mix connected via a SIP trunk.

      This is a job I inherited. Still not up to speed. If there is a good doc to read for this please advise. I am a complete newb on this.

       

      So first a few questions about the current config below to better help me understand a few things:

       

      1) for the Voice grouped-trunk 911, it has:

           trunk T03

           TrunkT01

      Does it utilize the top down method for access? Meaning T03 first and if full/unavailable?

       

      2) We have 4 grouped trunks

      1 accepts any ($)

      1 accepts only 911

      1 accepts specific numbers

      1 facing the PBX that accepts any number.

      How is priority set on these? Does the unit look through each of the grouped trunks for a specific match then routes out accordingly? Or is there a mechanism I am not seeing?

       

      3) what is !deny ?  

       

       

      Since I don't want people to do  my job entirely, I was thinking that all I have to do is: If I am wring then could someone do my job entirely?

      *****************************************

      Add

      trunk 06 to PBX_Trunks

       

       

      voice trunk T06 type sip

        description "Dialer"

        sip-server primary 192.168.1.1 (The local IP address of the asterix dialer)

        codec-list SIPCodecs both

       

      Voice group-trunk SIP-Asterix

           Trunk T06

           accept 5555551111 cost 0

           permit list SIP_Trunks

           !deny all other trunks

           !deny all other ani

      ********************************************

       

       

      Here is the current config:

       

      interface t1 0/1

        description PRI1

        clock source line

        timing-domain 1

        system-timing primary

        fdl att

        tdm-group 1 timeslots 1-24 speed 64

        no shutdown

      !

      interface t1 0/2

        description PRI2

        clock source line

        timing-domain 1

        fdl att

        tdm-group 1 timeslots 1-24 speed 64

        no shutdown

      !

      interface t1 0/3

        description PRI3

        clock source line

        timing-domain 1

        fdl att

        tdm-group 1 timeslots 1-24 speed 64

        no shutdown

      !

      interface t1 0/4

        description PRI4

        clock source line

        timing-domain 1

        fdl att

        tdm-group 1 timeslots 1-24 speed 64

        no shutdown

      !

      !

      interface pri 1

        isdn name-delivery display

        connect t1 0/1 tdm-group 1

        role network b-channel-restarts enable

        no shutdown

      !

      interface pri 2

        isdn name-delivery display

        connect t1 0/2 tdm-group 1

        role network b-channel-restarts enable

        no shutdown

      !

      interface pri 3

        isdn name-delivery display

        connect t1 0/3 tdm-group 1

        role network b-channel-restarts enable

        no shutdown

      !

      interface pri 4

        isdn name-delivery display

        connect t1 0/4 tdm-group 1

        role network b-channel-restarts enable

        no shutdown

      !

      !

      isdn-group 1

        connect pri 1

        connect pri 2

        connect pri 3

        connect pri 4

      !

      voice codec-list SIPCodecs

        codec g729

        codec g711ulaw

      !

      voice codec-list G711Codec

        codec g711ulaw

      !

      !

      voice trunk-list PBX_Trunks

        trunk T05

      !

      voice trunk-list SIP_Trunks

        trunk T01

        trunk T02

        trunk T03

        trunk T04

      !

      !

      voice trunk T01 type sip

        description "Local TG with list of codecs"

        sip-server primary 67.14.XXX.XXX

        codec-list SIPCodecs both

      !

      voice trunk T02 type sip

        description "Locall TG with only G711 codec"

        sip-server primary 67.14.XXX.XXX

        codec-list G711Codec both

      !

      voice trunk T03 type sip

        description "USE TG with list of codecs"

        sip-server primary 67.14.XXX.YYY

        codec-list SIPCodecs both

      !

      voice trunk T04 type sip

        description "USE TG with only G711 codec"

        sip-server primary 67.14.XXX.YYY

        codec-list G711Codec both

      !

      voice trunk T05 type isdn

        description "PRIs"

        resource-selection linear ascending

        connect isdn-group 1

        no early-cut-through

        rtp delay-mode adaptive

      !

      voice grouped-trunk SIP-PBX

        trunk T03

        trunk T01

        accept $ cost 0

        permit list PBX_Trunks

        !deny all other trunks

        !deny all other ani

      !

      voice grouped-trunk 911

        trunk T02

        trunk T04

        accept 911 cost 0

        permit list PBX_Trunks

        !deny all other trunks

        !deny all other ani

      !

      !

      voice grouped-trunk MTG

        trunk T04

        trunk T02

        accept 2135551212 cost 0

        accept 4155551212 cost 0

        accept 3125551212 cost 0

        accept 2675551212 cost 0

        accept 6195551212 cost 0

        permit list PBX_Trunks

        !deny all other trunks

        !deny all other ani

      !

      !

      voice grouped-trunk PBX-PRIs

        trunk T05

        accept $ cost 0

        permit list SIP_Trunks

        !deny all other trunks

        !deny all other ani

        • Re: How to route to a differnt SIP trunk based upon DNIS
          jayh Hall_of_Fame

          First let's clarify terminology - DNIS is the number dialed, ANI is the calling number.

           

          The default behavior of the unit is to route based on the DNIS, dialed number.

           

          Most specific route wins, meaning if one grouped-trunk has "accept $" and another has "accept 213XXXXXXX" then all calls to numbers in the 213 area code will go out the second trunk. If a third grouped-trunk has "accept 2135551212" then calls to that specific number will go there.

           

          Your configuration has an added feature called SABR  for "Source ANI-Based Routing" where the origin of the call is also used to make routing decisions. This is where the trunks are defined into trunk-lists and each grouped-trunk specification matches both the destination DNIS and the source trunk-list.  The "!deny all other trunks" and "!deny all other ANI" are inserted automatically as comments to let you know that only the permitted trunk-list or ani-lists will use that route.

           

          Your example has "permit list SIP_Trunks" for the Asterisk. If your intent is to route calls originating from SIP to the Asterisk, you should be good to go other than possible registration/authentication between the Adtran and Asterisk to allow it to accept the calls.

           

          If your intent is to have the PBX calls flow to the Asterisk, then substitute "permit list PBX_Trunks" in the configuration for grouped-trunk SIP-Asterix.

           

          If you want to route all calls to 5555551111 to the Asterisk regardless of origin, then don't specify a trunk-list at all for that grouped-trunk.

            • Re: How to route to a differnt SIP trunk based upon DNIS
              bflippen New Member

              the config was existing SIP trunks connected to the PBX.They are planning on adding an additional dialer connected by SIP.

              The dialer was going to dial out on the existing SIP trunks and if a particular number was called inbound (DNIS) it would route to the DIaler instead of the PBX. Thanks for the SABR explanation as well.

               

              The clarification on the specific match confirmed what I was thinking.

              also thanks for the !deny explanation.