January 2016
Intermediate to advanced
384 pages
8h 6m
English
To better test and debug the routing script, we will use the xlog() function as a way to insert debugging and informational messages in our script:
loadmodule "xlog.so"
xlog("L_ERR","Marker 480 ruri=<$ru>");You can check the latest XLOG messages with the following command:
tail /var/log/syslog
The t_on_failure() function tells OpenSIPS to handle the SIP failure (negative/unsuccessful replies) conditions. Failure conditions in this context are error messages of codes, 4XX and 5XX. When you call t_on_failure() just before calling the t_relay() function, you will tell OpenSIPS to transfer the control to failure_route[missed_call] when a failure message is detected:
IMPORTANT: OpenSIPS does not execute the failure route ...
Read now
Unlock full access