SIP Router Project
FS#387 - MI datagram replies with wrong udp-port
Opened by Per Carlen (peca) - Wednesday, 15 January 2014, 13:53 GMT
Last edited by Daniel-Constantin Mierla (miconda) - Friday, 21 February 2014, 14:55 GMT
When a udp-packet is sent to the address and port specified in kamailio.cfg, the response contains wrong source-port. The result is that external functions will be able to get responses.
In the following trace, mi_datagram listens on 127.0.0.1:9998. A perl-script sent a command to this port and never got the response back, since the portnumber had changed.
127.0.0.1.45047 > 127.0.0.1.9998
I had a brief look in the source-code, and it looks like a new socket is created for responses. Shouldn’t the “server socket” be used for sending responses?