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

Start by creating a new account on the softphone by clicking the New button and filling
               out the relevant information. The Host should point to the IP address or domain name
               of your Asterisk system, with the username matching that of the value located between
               the square brackets [ ] in your iax.conf file. Leave the password field blank, as we did
               not configure a secret in iax.conf, and the Caller ID and Number can be set to whatever
               you wish. If you want idefisk to register this account on startup, select the “Register on
               startup” checkbox. When done, click the OK button to save the new account.
               If you clicked the “Register on startup checkbox,” then the phone will attempt to reg-
               ister to Asterisk. On the Asterisk console you will see output telling you that the phone
               has registered:

                   -- Registered IAX2 'idefisk' (UNAUTHENTICATED) at 127.0.0.1:32771
               You can verify your registration with the iax2 show peers command at the Asterisk
               console:
                   localhost*CLI> iax2 show peers
                   Name/Username    Host                 Mask             Port          Status
                   idefisk          127.0.0.1       (D)  255.255.255.255  32771         Unmonitored
                   1 iax2 peers [0 online, 0 offline, 1 unmonitored]

               Configuring the Dialplan for Testing
               One final thing to do is confirm dialing through our phone by configuring a simple
               dialplan in extensions.conf. You can simply test that you have audio in both directions
               by calling extension 500, or you can modify the dialplan we created in the “Setting Up
               the Dialplan for Some Test Calls” section of this chapter to place some test calls. If you
               also configured a SIP phone at extension 1000 in the previous sections, then the fol-
               lowing  will  not  overlap  with  that,  as  we’ll  be  using  extension  1001  (unless  you
               configured multiple SIP extensions, in which case just configure a unique extension
               number for your IAX2 softphone):

                   [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]
                   [internal]
                   exten => 500,1,Verbose(1|Echo test application)
                   exten => 500,n,Echo()
                   exten => 500,n,Hangup()



                                                                 Configuring an IAX Softphone | 109
   132   133   134   135   136   137   138   139   140   141   142