the docs are here: https://github.com/sipcapture/homer/wiki<br>
<br>
since H5 we generate table name depends on message type and datestamp:<br>
<br>
I have pointed you already to the new kamailio's config:<br>
<br>
https://github.com/sipcapture/homer-api/blob/master/examples/sipcapture/sipcapture.kamailio#L814<br>
<br>
https://github.com/sipcapture/homer-api/blob/master/examples/sipcapture/sipcapture.kamailio#L849<br>
<br>
https://github.com/sipcapture/homer-api/blob/master/examples/sipcapture/sipcapture.kamailio#L855<br>
<br>
at the end (L855) you push the generated table name to sip_capture function<br>
and a message will be inserted to the table.<br>
<br>
modparam "table_name" is only for H3<br>
<br>
Wbr,<br>
Alexandr<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 15 April 2016 at 09:52, Seudin Kasumovic <notifications@github.com><br>
wrote:<br>
<br>
> Hi,<br>
><br>
> I'm testing on 4.4.<br>
><br>
> The 'new design' isn't documented, so I can't figure out how the name will<br>
> be generated.<br>
> When use simple config:<br>
><br>
> modparam("sipcapture", "db_url", DBURL)<br>
> modparam("sipcapture", "capture_on", 1)<br>
> modparam("sipcapture", "hep_capture_on", 1)<br>
> modparam("sipcapture", "raw_ipip_capture_on", 0)<br>
> modparam("sipcapture", "table_name", "sip_capture")<br>
><br>
> sipcapture uses given table name as format string, but the final result was<br>
> 'sip_capture.....A'. So no any timestamp in the name. The reason for this<br>
> could be next two lines:<br>
><br>
> ntab.len = strftime(strftime_buf, sizeof(strftime_buf), table->s,  &capt_ts);<br>
> ntab.s = strftime_buf;<br>
><br>
> The table->s not necessary ends with '\0', because it's part of Kamailio<br>
> internal str structure.<br>
> Avoid non zero terminated string will work in this case.<br>
><br>
> Parsing loop in parse_table_names function doesn't add '\0' at the end of<br>
> table name.<br>
> Suggested patch is here.<br>
><br>
> diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c<br>
> index 41d153e..2bdb4b4 100644<br>
> --- a/modules/sipcapture/sipcapture.c<br>
> +++ b/modules/sipcapture/sipcapture.c<br>
> @@ -436,8 +436,9 @@ int parse_table_names (str table_name, str ** table_names){<br>
>         {<br>
>                 LM_INFO ("INFO: table name:%s\n",p);<br>
>                 names[i].len = strlen (p);<br>
> -               names[i].s =  (char *)pkg_malloc(sizeof(char) *names[i].len);<br>
> +               names[i].s =  (char *)pkg_malloc(sizeof(char) *(names[i].len + 1));<br>
>                 memcpy(names[i].s, p, names[i].len);<br>
> +               names[i].s[names[i].len] = '\0';<br>
>                 i++;<br>
>                 p = strtok (NULL, "| \t");<br>
>         }<br>
><br>
> BTW, can you explain what 'table->s' will contain (format string required<br>
> by strftime) using provided example config ?<br>
><br>
> Thanks,<br>
> Seudin<br>
><br>
> —<br>
> You are receiving this because you commented.<br>
> Reply to this email directly or view it on GitHub<br>
> <https://github.com/kamailio/kamailio/issues/566#issuecomment-210343805><br>
><br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/566#issuecomment-210346518">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZVnbgohFoGcirKkiNzhQUUnoOsIbks5p30ZwgaJpZM4IHaoa.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/566#issuecomment-210346518"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>