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

In  the  SIP  RFC  (http://www.faqs.org/rfcs/rfc3261.html),  section  19.1
                           calls this user token, “the identifier of a particular resource at the host
                           being addressed,” verbiage consistent with our usage of [1000] as the
                           set identifier in the sip.conf file of Asterisk.

               Instead,  you  will  want  to  look  for  fields  that  are  labeled  user name  auth name,
               authentication name, and so on. The thing to remember is that since you know that the
               Asterisk end of the equation is configured simply and correctly, you can experiment
               with the phone setting until you find a combination that works. This is much better
               than the usual suffering that new users go through, as they change settings in both
               places and have no luck getting a phone to register.


                           We’re gonna say it again: configure sip.conf in the simplest manner pos-
                           sible, and then don’t change your Asterisk configuration. Trust us; what
                           we have written here will work. Get your set working (i.e., where you
                           can make and receive calls), and you will be in a far better position to
                           begin experimenting with different settings. We have seen too much
                           suffering (including our own), and we want it to end.


                                          Simplifying sip.conf
                  The sip.conf file (which was copied to the /etc/asterisk directory by the make samples
                  command we ran in the previous chapter) contains a large number of options and
                  documentation inside it, but the file is actually very minimal if you remove all the
                  commented parameters. The default file really breaks down to just the following few
                  lines being uncommented by default:
                   [general]
                   context=default                 ; Default context for incoming calls
                   allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
                   bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
                                                   ; bindport is the local UDP port that Asterisk will
                                                   ; listen on
                   bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
                   srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
                                                   ; Note: Asterisk only uses the first host
                                                   ; in SRV records
                                                   ; Disabling DNS SRV lookups disables the
                                                   ; ability to place SIP calls based on domain
                                                   ; names to some other SIP users on the Internet
                   [authentication]
                  The [general] section contains the options that will apply to all SIP clients and trunks.
                  Some settings elsewhere are set only in the [general] section, and others can be set in
                  the [general] section as defaults for all conditionals unless overridden. These options
                  are  listed  under  the  two  columns  labeled  [users]  and  [peers]  below  the
                  [authentication] header.



               84 | Chapter 4: Initial Configuration of Asterisk
   107   108   109   110   111   112   113   114   115   116   117