Hi
When I make a call through two Sipp devices ,kamailio in between as sip server , the rtp traffic is flowing directly through the endpoints instead of flowing through kamailio .
Is this how it works? Else , am I committing any mistake?
Yes, this is how it works. Kamailio does SIP signalling, not RTP.
You could use rtpengine as an RTP proxy on the same or another machine and use the kamailio rtpengine module manipulate SDP so traffic flows via rtpengine and to tell rtpengine how to route rtp traffic.
https://github.com/sipwise/rtpengine https://www.kamailio.org/docs/modules/stable/modules/rtpengine.html