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

register => username:secret@my.service_provider.tld
               Now we just need to configure a simple dialplan to handle our incoming calls and to
               send calls via the service provider. We’re going to modify the simple dialplan we started
               building in the “Setting Up the Dialplan for Some Test Calls” section of this chapter.
               The italicized sections are the new parts that we’re adding to the dialplan, with every-
               thing else existing previously. †
                   [globals]

                   [general]
                   [default]
                   exten => s,1,Verbose(1|Unrouted call handler)
                   exten => s,n,Answer()
                   exten => s,n,Wait(1)
                   exten => s,n,Playback(tt-weasels)
                   exten => s,n,Hangup()
                   [incoming_calls]
                   exten => _X.,1.NoOp()
                   exten => _X.,n,Dial(SIP/1000)
                   [outgoing_calls]
                   exten => _X.,1,NoOp()
                   exten => _X.,n,Dial(SIP/my_service_provider/${EXTEN})
                   [internal]
                   exten => 1000,1,Verbose(1|Extension 1000)
                   exten => 1000,n,Dial(SIP/1000,30)
                   exten => 1000,n,Hangup()
                   exten => 500,1,Verbose(1|Echo test application)
                   exten => 500,n,Echo()
                   exten => 500,n,Hangup()

                   [phones]
                   include => internal
                   include => outgoing_calls



               Connecting Two Asterisk Boxes Together via SIP

               There may come a time when you have a pair of Asterisk boxes, and you’d like to pass
               calls between them. Luckily this isn’t very difficult, although it does have some oddities
               that we need to deal with, but from the configuration viewpoint it isn’t really all that
               difficult.





               † We also assume you have configured at least one SIP extension from the previous section.

                                                      Connecting Two Asterisk Boxes Together via SIP | 101
   124   125   126   127   128   129   130   131   132   133   134