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

exten => 1001,1,Verbose(1|Extension 1000)
                   exten => 1001,n,Dial(IAX2/idefisk,30)
                   exten => 1001,n,Hangup()

                   [phones]
                   include => phones

               Connecting to an IAX Service Provider

               Some Internet Telephony Service Providers (ITSPs) provide the ability to originate and
               terminate calls via the IAX2 protocol. Beyond minimizing the number of ports required
               to be open on the firewall (IAX2 only requires a single port for both signaling and
               media), the protocol’s trunking feature is attractive to both ITSPs and their customers
               due to the savings in bandwidth that can be obtained when running many simultaneous
               calls between endpoints.
               If your ITSP is offering IAX2 termination, there is a strong chance it is running Asterisk;
               thus the configuration for connecting to these service providers is more than likely going
               to be similar to what we are providing here.
               The following configuration is a template for connecting to an IAX2 service provider:
                   [general]
                   autokill=yes
                   register => username:password@my.service-provider.tld
                   [my_unique_id]
                   type=user
                   secret=my_unique_password
                   context=incoming_calls
                   trunking=yes
                   disallow=all
                   allow=gsm
                   allow=ulaw
                   deny=0.0.0.0/0.0.0.0
                   permit=10.251.100.1/255.255.255.255

                   [my_unique_id]
                   type=peer
                   host=10.251.100.1
                   trunking=yes
                   disallow=all
                   allow=gsm
                   allow=ulaw
               To accept incoming calls from the Direct Inward Dialing (DID) number that your serv-
               ice provider assigned to you, we need to modify our extensions.conf file. Perhaps you
               want to send the call to an auto-attendant, or maybe simply to your desk phone. In
               either case, you can accept calls from your service provider and match on the incoming
               DID with the following bit of dialplan logic:



               110 | Chapter 4: Initial Configuration of Asterisk
   133   134   135   136   137   138   139   140   141   142   143