In this chapter, you will learn about OpenSIPS routing. In the first part of the chapter, we will present the OpenSIPS configuration file—its structure, the types of routes, and how these routes are related to the SIP traffic. Going inside the routing script, we will see how to use functions, variables, transformations, and statements in order to create the actual script. In the second part of the chapter, you will learn about basic SIP routing concepts—how to do proper routing for the SIP sessions/dialogs in terms of how to route initial and sequential requests. After this, we will understand how the record routing mechanism works in SIP.
By the end of this chapter, you will learn the following concepts:
How the OpenSIPS configuration file looks
What are the types of routes available in the routing script
How to use functions in the script
How to use variables, transformations, flags, and operators
How the scripting routes are triggered by the...