Hi,
After wasting most of the day trying to make mi_datagram over UDP socket work. I eventually realize that it does asymmetric UDP communication, which creates a lot of trouble for writing a useful MI script using PERL or Python etc.
Anyhow, i go through the module code and was able to write a patch for symmetric UDP communication using mi_datagram.
I have tested the patch using both Kamailio 4.1 and trunk branches and it seems to compile and run flawlessly.
I am attaching here with this patch for Kamailio community. It would be great if Kamailio developers would review and commit this patch to source trunk.
Thank you.