Book Image

Building Telephony Systems with OpenSER

Book Image

Building Telephony Systems with OpenSER

Overview of this book

Table of Contents (18 chapters)
Building Telephony Systems with OpenSER
Credits
About the Author
About the Reviewers
Preface
6
Building the User Portal with SerMyAdmin
Index

Inspecting the Configuration File


Our script is becoming very hard to debug. Now let's introduce the XLOG module. It implements the XLOG() function. It is very similar to the LOG() function, but it allows you to use pseudo-variables such as the request URI ($ru) inside the message. Below, there is an example of the XLOG usage.

loadmodule "xlog.so"
xlog("L_ERR","Marker 480 ruri=<$ru>");

You can check the latest XLOG messages with the command:

tail /var/log/syslog

It is important to understand that on blind call forward, only the original INVITE message will be processed; we can safely change the request URI and the call to append_branch does not need to be invoked.

On the other hand, for call forward on busy and call forward for unanswered calls, after the original INVITE had failed, to fork the message at this point you will have to execute the append_branch() function.

t_on_failure("1");

The t_on_failure() function tells OpenSER to handle SIP failure conditions (negative/unsuccessful replies...