Hello,
let's keep the list on cc so other devs can participate and have idea of what is going on ...
On 8/11/11 9:26 AM, Tristan Bruns wrote:
Hello Daniel,
I tried using the message parser and textops to add the headers to the message but failed, probably because I did not manage to create a sip_msg struct that append_hf would update. (It worked when I used an existing sip_msg struct, [e.g. the one from sip_trace()] but not all trace-functions had access to a sip_msg [e.g. trace_sl_*])
Indeed, the functions for storing the message don't have the sip_msg struct available. I was referring to parsing of received messages (the mirrored traffic from other kamailios), where would be safer to use the parser -- if there will be another proxy in between mirroring proxy and storage proxy, it can add headers in between the X-Siptrace-..., breaking the read.
Anyhow, that is very unlikely -- for the I will go with your patches and update afterwards, when it is more time for it.
Cheers, Daniel
After that, I did not consider to use the message parser to extract the headers.
Regards, Tristan
Am 09.08.2011 16:26, schrieb Daniel-Constantin Mierla:
Hi Tristan,
I was looking at the patches and the only thing I want to discuss is related to the operations with headers.
You don't use the internal SIP parser, with it you can get the end of headers position as well as you can iterate through the list of headers and match by name, then take the body and fill local variables.
In the patches (3/5) you use sscanf(...). I would go for using the parser, since it is safer in long term. Do you had any special reason to go with own kind of parser for SIP and headers?
Cheers, Daniel
On 8/5/11 10:17 AM, Tristan Bruns wrote:
Hello OpenSER/Kamailio developers,
we implemented some additional features in siptrace. The main objective was to have multiple kamailios send duplicates of sent/received packets to one logging server (also running kamailio). We did not just set db_url to the logging server because of performance concerns.
The attached patches contain our commits. I hope that you find them useful.
Viele Grüße / Best regards, Tristan Bruns (DECOIT GmbH)
0001-modules_k-siptrace-separately-store-to-db-and-or-sen.patch modules_k/siptrace: separately store to db and/or send duplicate
0002-modules_k-siptrace-Add-trace_to_database-configurati.patch modules_k/siptrace: Add trace_to_database configuration parameter
Adding configuration parameter to disable writing to the
database. We can use this to only duplicate the SIP messages without storing them in our database.
0003-modules_k-siptrace-Add-x-headers-feature.patch modules_k/siptrace: Add "x-headers" feature
The "x-headers" feature stores the fromip, toip, method and direction in the message body (using X-* headers). This allows to transmit them using duplicate_uri from one kamailio to an other.
0004-modules_k-siptrace-Add-column-time_us.patch modules_k/siptrace: Add column time_us
0005-modules_k-siptrace-Add-time-to-x-headers.patch modules_k/siptrace: Add time to x-headers
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla --http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin:http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/miconda
Hello,
The idea is good, but I am not sure it's correct to modify the original SIP message, adding new SIP headers. As minimum you don't have any controlling, which headers are present or must be present.
Anyway, this solution can be used in some cases there is only Kamailo present.
Wbr, Alexandr
P.S. it doesn't interrupt Homer implementation, it's just another way of mirroring SIP traffic. :-)
P.P.S. http://homer.googlecode.com/files/Homerv2.pdf
8/12/2011 3:30 PM, Daniel-Constantin Mierla wrote:
Hello,
let's keep the list on cc so other devs can participate and have idea of what is going on ...
On 8/11/11 9:26 AM, Tristan Bruns wrote:
Hello Daniel,
I tried using the message parser and textops to add the headers to the message but failed, probably because I did not manage to create a sip_msg struct that append_hf would update. (It worked when I used an existing sip_msg struct, [e.g. the one from sip_trace()] but not all trace-functions had access to a sip_msg [e.g. trace_sl_*])
Indeed, the functions for storing the message don't have the sip_msg struct available. I was referring to parsing of received messages (the mirrored traffic from other kamailios), where would be safer to use the parser -- if there will be another proxy in between mirroring proxy and storage proxy, it can add headers in between the X-Siptrace-..., breaking the read.
Anyhow, that is very unlikely -- for the I will go with your patches and update afterwards, when it is more time for it.
Cheers, Daniel
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hello Alexandr,
indeed, this does not interfere with Homer project at all, just some adjustments to the existing siptrace: option to mirror traffic only (old version was always writing to db) and option to add extra headers when mirroring and read them when receiving mirroring traffic.
Cheers, Daniel
On 8/15/11 1:37 AM, Alexandr Dubovikov wrote:
Hello,
The idea is good, but I am not sure it's correct to modify the original SIP message, adding new SIP headers. As minimum you don't have any controlling, which headers are present or must be present.
Anyway, this solution can be used in some cases there is only Kamailo present.
Wbr, Alexandr
P.S. it doesn't interrupt Homer implementation, it's just another way of mirroring SIP traffic. :-)
P.P.S. http://homer.googlecode.com/files/Homerv2.pdf
8/12/2011 3:30 PM, Daniel-Constantin Mierla wrote:
Hello,
let's keep the list on cc so other devs can participate and have idea of what is going on ...
On 8/11/11 9:26 AM, Tristan Bruns wrote:
Hello Daniel,
I tried using the message parser and textops to add the headers to the message but failed, probably because I did not manage to create a sip_msg struct that append_hf would update. (It worked when I used an existing sip_msg struct, [e.g. the one from sip_trace()] but not all trace-functions had access to a sip_msg [e.g. trace_sl_*])
Indeed, the functions for storing the message don't have the sip_msg struct available. I was referring to parsing of received messages (the mirrored traffic from other kamailios), where would be safer to use the parser -- if there will be another proxy in between mirroring proxy and storage proxy, it can add headers in between the X-Siptrace-..., breaking the read.
Anyhow, that is very unlikely -- for the I will go with your patches and update afterwards, when it is more time for it.
Cheers, Daniel
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hello,
I applied the patches to GIT master branch. There were some changes I did, therefore test and let us know if something is not working. The changes: - use the internal pkg memory pool (pkg_malloc/pkg_free instead of system malloc/free) - some error handling that required to free a previously allocated buffer to avoid leaks at runtime - variables are declared at beginning of functions for better portability
Cheers, Daniel
On 8/12/11 3:30 PM, Daniel-Constantin Mierla wrote:
Hello,
let's keep the list on cc so other devs can participate and have idea of what is going on ...
On 8/11/11 9:26 AM, Tristan Bruns wrote:
Hello Daniel,
I tried using the message parser and textops to add the headers to the message but failed, probably because I did not manage to create a sip_msg struct that append_hf would update. (It worked when I used an existing sip_msg struct, [e.g. the one from sip_trace()] but not all trace-functions had access to a sip_msg [e.g. trace_sl_*])
Indeed, the functions for storing the message don't have the sip_msg struct available. I was referring to parsing of received messages (the mirrored traffic from other kamailios), where would be safer to use the parser -- if there will be another proxy in between mirroring proxy and storage proxy, it can add headers in between the X-Siptrace-..., breaking the read.
Anyhow, that is very unlikely -- for the I will go with your patches and update afterwards, when it is more time for it.
Cheers, Daniel
After that, I did not consider to use the message parser to extract the headers.
Regards, Tristan
Am 09.08.2011 16:26, schrieb Daniel-Constantin Mierla:
Hi Tristan,
I was looking at the patches and the only thing I want to discuss is related to the operations with headers.
You don't use the internal SIP parser, with it you can get the end of headers position as well as you can iterate through the list of headers and match by name, then take the body and fill local variables.
In the patches (3/5) you use sscanf(...). I would go for using the parser, since it is safer in long term. Do you had any special reason to go with own kind of parser for SIP and headers?
Cheers, Daniel
On 8/5/11 10:17 AM, Tristan Bruns wrote:
Hello OpenSER/Kamailio developers,
we implemented some additional features in siptrace. The main objective was to have multiple kamailios send duplicates of sent/received packets to one logging server (also running kamailio). We did not just set db_url to the logging server because of performance concerns.
The attached patches contain our commits. I hope that you find them useful.
Viele Grüße / Best regards, Tristan Bruns (DECOIT GmbH)
0001-modules_k-siptrace-separately-store-to-db-and-or-sen.patch modules_k/siptrace: separately store to db and/or send duplicate
0002-modules_k-siptrace-Add-trace_to_database-configurati.patch modules_k/siptrace: Add trace_to_database configuration parameter
Adding configuration parameter to disable writing to the
database. We can use this to only duplicate the SIP messages without storing them in our database.
0003-modules_k-siptrace-Add-x-headers-feature.patch modules_k/siptrace: Add "x-headers" feature
The "x-headers" feature stores the fromip, toip, method and direction in the message body (using X-* headers). This
allows to transmit them using duplicate_uri from one kamailio to an other.
0004-modules_k-siptrace-Add-column-time_us.patch modules_k/siptrace: Add column time_us
0005-modules_k-siptrace-Add-time-to-x-headers.patch modules_k/siptrace: Add time to x-headers
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla --http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin:http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/miconda
-- Daniel-Constantin Mierla --http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin:http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/miconda
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev