Kamailio Debug

From open-voip.org

Jump to: navigation, search

Add the following to the kamailio.cfg file:

 debug=9
 log_stderror=no
 log_facility=LOG_LOCAL0

And use the following line to each place you want to debug:

 xlog("L_INFO", "*** mycomment [$rm] [$rr] [$rs] from [$fu] to [$tu]\n");

restart the service:

 kamctl restart  

then open the messges file and start the debug:

 tail -f /var/log/messages

The complete list of the psedo vars can be find here.

To debug your cfg file:

 kamailio -c

sniff the network with tethereal:

 tethereal udp port 5060.
 tethereal udp and ip host 10.10.10.10
 tethereal -w /opt/temp/debug.cap    to wirte to a file

use wireshark for online capturing install tethereal by

 yum install wireshark
Personal tools