[sr-dev] Patches for siptrace
Daniel-Constantin Mierla
miconda at gmail.com
Fri Aug 12 15:30:04 CEST 2011
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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110812/3f778795/attachment.htm>
More information about the sr-dev
mailing list