Hello,


I'm interested in retrieving the reception time, in the UDP buffer, of the SIP 
packets handled by Kamailio.
I see there is a "struct timeval tval" in "struct sip_msg", but this is the 
timestamp of reading the packet by Kamailio, so not what I'm looking for.

According to the kernel documentation, this could be achieved using 
SO_TIMESTAMPNS on the socket:

https://www.kernel.org/doc/Documentation/networking/timestamping.txt


Do you think adding this feature to Kamailio could be useful ?

To implement this we would need, I think:
- Only buid this if SO_TIMESTAMPNS is supported (Linux >= 2.6.22)
- Add a configuration to enable / disable this feature
- Set the SO_TIMESTAMPNS flag when creating the socket
- Add a field in "struct sip_msg" to store the new timestamp
- When receiving a packet, read the ancillary data, extract the SO_TIMESTAMPNS 
information and store the timestamp in "struct sip_msg"
- Provide a new PV to make this accessible from Kamailio script


What do you think ?


Regards,
Nicolas.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to