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

The Functions check_to() and check_from()


When operating a SIP proxy, you should guarantee that a valid account won't be used by non-authenticated users. The check_to() and check_from() functions are used to map the SIP users with the authentication user. The SIP user is in the FROM and TO header fields and the auth user is only used for authentication (Authorize header field) and it has its own password. In the current example, the function checks that a SIP user and the auth user are the same. This is to prevent a user form using the authentication of another user. These functions are enabled by the URI_DB module.