|
|
|
|
@ -328,17 +328,13 @@ static int cdr_parse_srcleg(char *srcleg, cdr_entry_t *cdr)
|
|
|
|
|
tmp1 = strchr(tmp2, MED_SEP);
|
|
|
|
|
if(tmp1 == NULL)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
syslog(LOG_WARNING, "Call-Id '%s' has no separated source gpp, skipping those fields", cdr->call_id);
|
|
|
|
|
cdr->init_time = g_strtod(tmp2, NULL);
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
syslog(LOG_WARNING, "Call-Id '%s' has no separated source init time, '%s'", cdr->call_id, tmp2);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
*tmp1 = '\0';
|
|
|
|
|
cdr->init_time = g_strtod(tmp2, NULL);
|
|
|
|
|
tmp2 = ++tmp1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
for(i = 0; i < 10; ++i)
|
|
|
|
|
{
|
|
|
|
|
@ -353,6 +349,16 @@ static int cdr_parse_srcleg(char *srcleg, cdr_entry_t *cdr)
|
|
|
|
|
tmp2 = ++tmp1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tmp1 = strchr(tmp2, MED_SEP);
|
|
|
|
|
if(tmp1 == NULL)
|
|
|
|
|
{
|
|
|
|
|
syslog(LOG_WARNING, "Call-Id '%s' has no separated source lnp prefix, '%s'", cdr->call_id, tmp2);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
*tmp1 = '\0';
|
|
|
|
|
g_strlcpy(cdr->source_lnp_prefix, tmp2, sizeof(cdr->source_lnp_prefix));
|
|
|
|
|
tmp2 = ++tmp1;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -467,9 +473,8 @@ static int cdr_parse_dstleg(char *dstleg, cdr_entry_t *cdr)
|
|
|
|
|
tmp1 = strchr(tmp2, MED_SEP);
|
|
|
|
|
if(tmp1 == NULL)
|
|
|
|
|
{
|
|
|
|
|
syslog(LOG_WARNING, "Call-Id '%s' has no separated destination gpp, skipping those fields", cdr->call_id);
|
|
|
|
|
cdr->destination_lcr_id = atoll(tmp2);
|
|
|
|
|
return 0;
|
|
|
|
|
syslog(LOG_WARNING, "Call-Id '%s' has no separated destination lcr id, '%s'", cdr->call_id, tmp2);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
*tmp1 = '\0';
|
|
|
|
|
cdr->destination_lcr_id = atoll(tmp2);
|
|
|
|
|
@ -489,6 +494,16 @@ static int cdr_parse_dstleg(char *dstleg, cdr_entry_t *cdr)
|
|
|
|
|
tmp2 = ++tmp1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tmp1 = strchr(tmp2, MED_SEP);
|
|
|
|
|
if(tmp1 == NULL)
|
|
|
|
|
{
|
|
|
|
|
syslog(LOG_WARNING, "Call-Id '%s' has no separated destination lnp prefix, '%s'", cdr->call_id, tmp2);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
*tmp1 = '\0';
|
|
|
|
|
g_strlcpy(cdr->destination_lnp_prefix, tmp2, sizeof(cdr->destination_lnp_prefix));
|
|
|
|
|
tmp2 = ++tmp1;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|