Page 141 - Asterisk™: The Future of Telephony
P. 141

In the introduction to this section, we mentioned the possible bandwidth savings when
               utilizing IAX2 trunking. It’s simple to enable this functionality in Asterisk, as we just
               need to add trunk=yes to our friend definition. As long as a timing interface is installed
               and running (i.e., dummy), then we can take advantage of IAX2 trunking.

               The secret is straightforward: it’s our authentication password. We’re defining the
               [incoming_osaka] context as the place we will process incoming calls for this friend in
               the extensions.conf file. Finally, we block all IP addresses with the deny option from
               being allowed to authenticate, and explicitly permit 192.168.1.107.
               The iax.conf configuration for Osaka is nearly identical, except for the changes in IP
               address and names:
                   [general]
                   autokill=yes

                   register => osaka:welcome@192.168.1.104
                   [toronto]
                   type=friend
                   host=dynamic
                   trunk=yes
                   secret=welcome
                   context=incoming_toronto
                   deny=0.0.0.0/0.0.0.0
                   permit=192.168.1.104/255.255.255.255

               IAX Phone Configuration

               In the “Configure the Softphone” section, we configured our first IAX2 softphone using
               idefisk.  The  configuration  we’ll  be  using  here  is  nearly  identical  except  for  minor
               changes in order to cause the peers to be unique. If you’ve already configured a SIP
               softphone, then you can also utilize that on one (or both) of the peers. Remember that
               Asterisk is a multiprotocol application, and you can send a call from a SIP phone to
               Asterisk, across an IAX2 trunk, and then down to another SIP phone (or H.323, MGCP,
               etc.).

               On Osaka:
                   [1001]
                   type=friend
                   host=dynamic
                   context=phones
               On Toronto:

                   [2001]
                   type=friend
                   host=dynamic
                   context=phones





                                                      Connecting Two Asterisk Boxes Together via IAX | 113
   136   137   138   139   140   141   142   143   144   145   146