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

context=incoming       ; Incoming calls go to [incoming] in extensions.conf
                   signalling=fxs_ks       ; Use FXS signalling for an FXO channel
                   channel => 2           ; PSTN attached to port 2

               Dialplan Configuration

               We will make use of our minimal dialplan we configured earlier in the chapter to test
               our FXS port with the use of the Echo() application. The relevant section, which should
               already exist in your dialplan, looks like this:
                   [internal]
                   exten => 500,1,Verbose(1|Echo test application)
                   exten => 500,n,Echo()
                   exten => 500,n,Hangup()
                   [phones]
                   include => internal
               Whatever you say, the Echo() application will relay back to you.


               Configuring SIP Telephones

                                               ‡
               The Session Initiation Protocol (SIP),  commonly used in VoIP phones (either hard
               phones, or softphones), takes care of the setup and teardown of calls, along with any
               changes during a call such as call transfers. The purpose of SIP is to help two endpoints
               talk to each other (if possible, directly to each other). The SIP protocol is simply a
               signaling protocol, which means that its purpose is only to get the two endpoints talking
               to each other, and not to deal with the media of the call (your voice). Rather, your voice
               is carried using another protocol called the Real-Time Transport Protocol (RTP; RFC
               3550) to transfer media directly between the two endpoints.


                           We use the term media to refer to the data transferred between endpoints
                           and used to reconstruct your voice at the other end. It may also refer to
                           music or prompts from the PBX.


               In the world of SIP, we call our endpoints user agents, of which there are two types:
               client and server. The client is the endpoint that generates the request, and the server
               processes the request and generates a response. When an endpoint wishes to place a
               call to another endpoint (such as our softphone calling another softphone), we generate
                                                §
               our request and send this to a SIP proxy.  A proxy server will take the request, determine


               ‡ RFC 3261 is available at http://www.ietf.org/rfc/rfc3261.txt. While the document is fairly large, we strongly
                 encourage anyone who wishes to become an Asterisk professional to read at least the first 100 or so pages of
                 this document and to understand how calls are set up, as this knowledge will be imperative when you’re
                 looking at a SIP trace (sip debug from the Asterisk console) trying to determine why your calls are not getting
                 set up correctly.

                                                                   Configuring SIP Telephones | 81
   104   105   106   107   108   109   110   111   112   113   114