how to debug udp daemon of asterisk

Home » Asterisk Users » how to debug udp daemon of asterisk
Asterisk Users No Comments


I’m using a packet interception module for modifying udp packets coming
to asterisk sip port. now my packet modification application
successfully forwards the packet but somehow there is no response from
asterisk. it may be that the modifications destroyed sanity of the sip
packet so asterisk is just ignoring it. or there may be problem inside
my modification rule that is sending to a wrong socket. I want single
out the problem. to do that i need to find the activity happening in the
udp daemon runs under the hood of asterisk. so far i’ve “straced” my
modification application which reports a successful sendmsg(). as its
udp datagram it cant say anything about destination. i’ve straced
asterisk using “strace asterisk -vvvvdddddd” . it waits in read()
syscall. i’ve tried putting garbage data by netcat(nc -uvv
7160, where 7160 is the sip port i’ve defined in sip.conf) on the listening port of asterisk. but the
read() does not returns. read() should return at whatever is available
in udp socket. because packet’s sanity check is left for upper layer

so how should i go about debugging it?
Thanks in advance.