SER - Getting Started

ONsip.org

Paul Hazlett

Greger V. Teigre

Version 5.21

Disclaimer :-

The authors of this document do not warrant or assume any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed. Any consequences or results achieved directly or indirectly by this documents configuration files or information are entirely your responsibility.

Revision History
Revision Draft 521February 13, 2006

Added new chapter "About This Issue"

Revision Draft 52019th December, 2005

Finalized conversion to docbook

Reverted revision history to have latest changes on top

Revision Draft 51326th Aug, 2005

Final changes before going to Issue status :-

A few typos

CPL Appendix

Removed sections 10 14 that were place holders for future releases.

Added brief comments about how to debug.

Revision Draft 51218th Aug

Removed unecessary ruri save/restore. Removed appendix 14, the complete config as this config has not been kept in sync and can be confusing.

Revision Draft 5112nd Aug, 2005

Added a comment on OpenSER vs SER and DB format

Revision Draft 51031st July, 2005

Brush-up: Added a sentence in the disclaimer ; Changed references to 0.9.0 to 0.9.3

Added new chapter 2:History of SER ; SER development ;SER vs OpenSER ; Reorganized the old chapter 1 into 1 and 3

Added comment on mediaproxy source package in the mediaproxy chapter

Elaborated in the introduction section of nathelper/mediaproxy

Added comment on serctl fifo trusted_reload command

Reviewed and elaborated text on call features

Updated and elaborated on the source code, installation, and scripts appendix

Revision Draft 50420th July, 2005

Added note that specifies that mediaproxy requires a public IP address

Revision Draft 5039th July, 2005

Hello World cfg : Removed the if (uri==myself) test in the main route block

MySQL cfg: Removed the if (uri==myself) test in the main route block

Mediaproxy cfg:Removed the if (uri==myself) test in the main route block

Rtpproxy.cfg:Removed the if (uri==myself) test in the main route block

PSTN.cfg

  • Removed the if (uri==myself) test in the main route block

  • Removed ACK handler

  • Replaced test if (uri!=myself) with code to close an open relay

Revision Draft 50224th June, 2005

Added call forwarding cfg file. Minor cleanup of previous cfg files as follows:

MySQL cfg: added analysis for lines 149 through 152

Mediaproxy cfg:

  • added loadmodule for domain.so

  • fixed NATed peer dialing audio

  • removed CANCEL message handler

  • route CANCEL messages to route[1]

  • modified regex for "Contact: *" in the REGISTER handler

  • modified regex for "Content-Length: 0" in the reply_route

  • moved proxy_authorize() check to beginning of INVITE handler

  • created route(4) mediaproxy convience route block

Rtpproxy.cfg

  • route CANCEL messages to route[1]

  • modified regex for "Contact: *" in the REGISTER message hander

  • modified regex for "Content-Length: 0" in the reply_route

  • rearranged structure to be closer to that of mediaproxy.cfg

  • create route(4) rtpproxy convience block

PSTN.cfg

  • swapped route[4] and route[5] to mirror previous cfg files

  • removed CANCEL message handler

  • modified regex for "Content-Length: 0" in the reply_route

  • route CANCEL messages to route[1]

  • moved proxy_authorize() check to beginning of INVITE handler

Revision Draft 50124th June, 2005

Added disclaimer. Changed version to 5.01 to reflect that we have already released 4.0 and should be now working on version 5

Revision Draft 30714th May, 2005

Fixed the following errors: Added missing route(5) calls to the INVITE handler (ie, route[3]) In route[3], moved the international dialing test so that it is after the call to lookup(aliases) Added missing ACK handler route[6]

Revision Draft 30627th April, 2005

Added PSTN picture and added section 13.4 ready for the install mediaproxy description. Based document for Issue 04

Revision Draft 30518th April, 2005

Added PSTN GW analysis. Added lookup(aliases) to INVITE handler in the Auth-DB example ser.cfg Added lookup(aliases) to main route block of the MediaProxy ser.cfg example. Added lookup(aliases) to main route block of the RTPproxy ser.cfg example.

Revision Draft 30410th April, 2005

Incorporated changed and/or bug fixed based on testing against the onsip.org test SIP router. Notable Changes:

  • Added more directives to the Hello World ser.cfg file to consolidate their introduction

  • Added lookup(aliases) to all examples

  • Corrected search() function checks to accommodate white space in header fields

  • Added bookmark references to line-by-line analysis sections

  • Added rtpproxy init.d script

  • Changed all IP references to comply with RFC3330

  • Added PSTN ser.cfg highlights and line numbers

Revision Draft 3035th April, 2005

Added PSTN gateway connectivity section

Revision Draft 30230th March, 2005

Made the configs work !

Revision Draft 30130th March, 2005

Mediaproxy and rtpproxy section clean up.

Revision Draft 06929th March, 2005

Added RTPProxy section Added comment about the gettingstarted@onsip.org email Added ONsip address in footer Added ref to tar ball in section 12 Prepared for Issue 03

Revision Draft 06826th March, 2005

Uri_db bug fixes reported by Norm

Revision Draft 06725th March, 2005

Fixed NAT traversal per Jan Janaks comments

Revision Draft 06621st March, 2005

NAT traversal updates based on AVPOPS

Revision Draft 06521st March, 2005

Minor changes based upon comments about Issue 02 by Paul

Revision Draft 06418th March, 2005

Replaced ser with SER where appropriate

Revision Draft 06317th March, 2005

Incorporated comments by Samuel Osorio Calvo

Revision Draft 06215th March, 2005

Additional NAT Comments

Revision Draft 06114th March, 2005

Paul added NAT Section

Revision Draft 0612th March, 2005

Updated all comments and prepare for Issue 1

Revision Draft 059th March, 2005

Corrected ser.cfg for hello world and auth_db

Revision Draft 047th March, 2005

Revised section 1 + reviewed work in draft 02+03

Revision Draft 022nd March, 2005

Several Additions

Revision Draft 0121st Feb, 2005

Initial Version

Abstract

The guide that tells you all about getting SER to work.Based upon real life examples, this guide leads you through the steps necessary to build a fully working SIP environment. A Step by Step approach is taken to help the reader understand the intricacies of SER.


Table of Contents

1. About This Issue
2. About This Document
3. SER or OpenSER - A Brief Comparison
History of SER
OpenSER
SER and OpenSER development
Understanding naming of versions
Compatibility now and in the future
Choosing between SER and OpenSER
ONsip.org Getting Started and SER vs OpenSER
4. Getting Started What is SIP and how does it work?
SER Architecture and ser.cfg
Core and Modules
ser.cfgs Seven Sections
Transactions, Dialogs, and Sessions
Understanding Message Processing in ser.cfg
Stateful vs. stateless
Understanding SIP and RTP
Back-end applications and B2BUA
NAT, STUN, and RTP proxy
Registration behind NAT
INVITEs behind NAT
STUN
Other non-ser NAT traversal techniques
URI, R-URI, and Branches
5. Reference Design
6. Hello World ser.cfg
ser.cfg Listing
Hello World ser.cfg Analysis
Using The Hello World ser.cfg Configuration
7. SER - Adding Authentication and MySQL
MySQL ser.cfg Listing
Authenticating ser.cfg Analysis
Using the Authenticating ser.cfg Proxy
8. Handling of NAT
Handling of NAT using Mediaproxy
Mediaproxy Transparent NAT Traversal ser.cfg Analysis
Using the Mediaproxy Transparent NAT Traversal ser.cfg
Handling of NAT using RTPproxy
RTPproxy Transparent NAT Traversal ser.cfg Analysis
9. PSTN Gateway Connectivity
PSTN Gateway Connectivity ser.cfg Analysis
Using the PSTN Gateway Connectivity ser.cfg Example
10. Call Forwarding ser.cfg
Call Forwarding ser.cfg Analysis
Using the Call Forwarding ser.cfg Example
11. Appendix - How to download and configure the latest version of SER
Downloading the Latest SER Source Code
Making the SER Binaries and installing
Installing MediaProxy
Configuring the system
Init.d/ser
Init.d/mediaproxy
Supporting MySQL
Debugging Tips
Capture of SIP Messages
Generate Debug Information
12. Appendix The Call Processing Language (CPL)

List of Figures

5.1. Complete Reference Design
5.2. 'Hello World' Reference Design
7.1. Reference Design Plus MySQL
8.1. Reference Design Plus NAT
9.1. Reference Design - PSTN