[ previous ] [ next ] [ threads ]
 To :  Monica Tepelus <monica@v...>
 From :  Gamaliel Bedolla <gbf@t...>
 Subject :  Re: [yate] Question about CDRs
 Date :  Mon, 15 Jul 2013 11:38:57 -0600
Hello Monica,
Let me make a try and let you know.
Thanks!


2013/7/15 Monica Tepelus 

> Hi Gamaliel,
>
> Did you modify the number when handling call.route?
>
> You can also add custom parameters to the cdr:
> http://docs.yate.ro/wiki/How_**to_add_custom_parameters_in_**
> CDR_from_routing
>
> Regards,
> Monica Tepelus
>
>
> Gamaliel Bedolla wrote:
>
>> Dear All,
>>
>> I'm trying to determine to where are the calls going, using an identifier
>> in the IAM of the call to reach each of those carriers. For example, if I
>> dial 0446561071345, the IAM appends a prefix an the called number is
>> 1881170446561071345 where 188 is the prefix to reach that carrier. However,
>> in the Mysql CDR only is recorded the original number. I tried to use
>> another field in the cdr, named 'calledfull' but this is not showing
>> nothing.
>> If i see the yatelog (tail -f /var/log/yate) I see the complete number:
>>
>> 20130712122638.268421  Outgoing call from=6562571137
>> to=1881170446561071345. trunk=local_out sigcall=0x9c40fb8 [0x9bfc8d0]
>>
>> But in the cdr, I do not see that:
>>
>> mysql> select * from cdrs where called like '%1071345' and direction like
>> 'outgoing' order by id desc limit 1000;
>> +---------+------------+------**------------+-----------------**
>> --+------------+--------------**-+------------+---------------**
>> +------------+----------+-----**-----+----------+-----------+-**
>> -------+--------------------+-**------+
>> | id      | instance   | time             | billid            | chan
>>   | address       | caller     | called        | calledfull | billtime |
>> ringtime | duration | direction | status | reason             | ended |
>> +---------+------------+------**------------+-----------------**
>> --+------------+--------------**-+------------+---------------**
>> +------------+----------+-----**-----+----------+-----------+-**
>> -------+--------------------+-**------+
>> | 1328694 | TTYATEMX01 | 1373631998.26800 | 1373602023-8959   | sig/8617
>>   | local_out/99  | 6562571137 | 0446561071345 |            |        3 |
>>      3 |       10 | outgoing  | hangup | normal-clearing    |     1 |
>>
>> This is the configuration of register.conf:
>> [general]
>> call.cdr=yes
>>
>> [call.cdr]
>>
>> account=cdrs
>>
>> critical=no
>>
>> initquery=UPDATE cdrs SET ended=1 WHERE ended IS NULL OR ended=0
>>
>> cdr_initialize=INSERT INTO cdrs VALUES(NULL, 'TTYATEMX01', ${time},
>> '${billid}', '${chan}', '${address}', '${caller}', '${called}',
>> '${calledfull}', '${billtime}', '${ringtime}', '${duration}',
>> '${direction}', '${status}', '${reason}', 0)
>> cdr_update=UPDATE cdrs SET address='${address}',
>> direction='${direction}', billid='${billid}', caller='${caller}',
>> called='${called}', calledfull='${calledfull}', duration='${duration}',
>> billtime='${billtime}', ringtime='${ringtime}', status='${status}',
>> reason='${reason}' WHERE chan = '${chan}' AND time = ${time}
>> cdr_finalize=UPDATE cdrs SET address='${address}',
>> direction='${direction}', billid='${billid}', caller='${caller}',
>> called='${called}', calledfull='${calledfull}', duration='${duration}',
>> billtime='${billtime}', ringtime='${ringtime}', status='${status}',
>> reason='${reason}', ended=1 WHERE chan='${chan}' AND time=${time}
>>
>>
>> Is there a way to record the complete number with prefix, instead of the
>> number only?
>> Please let me know if more info is requierd to solve this issue.
>>
>> Thanks!
>>
>
>



Hello Monica,
Let me make a try and let you know.
Thanks!


2013/7/15 Monica Tepelus <monica@v...>
Hi Gamaliel,

Did you modify the number when handling call.route?

You can also add custom parameters to the cdr:
http://docs.yate.ro/wiki/How_to_add_custom_parameters_in_CDR_from_routing

Regards,
Monica Tepelus


Gamaliel Bedolla wrote:
Dear All,

I'm trying to determine to where are the calls going, using an identifier in the IAM of the call to reach each of those carriers. For example, if I dial 0446561071345, the IAM appends a prefix an the called number is 1881170446561071345 where 188 is the prefix to reach that carrier. However, in the Mysql CDR only is recorded the original number. I tried to use another field in the cdr, named 'calledfull' but this is not showing nothing.
If i see the yatelog (tail -f /var/log/yate) I see the complete number:

20130712122638.268421 <sig/8617:CALL> Outgoing call from=6562571137 to=1881170446561071345. trunk=local_out sigcall=0x9c40fb8 [0x9bfc8d0]

But in the cdr, I do not see that:

mysql> select * from cdrs where called like '%1071345' and direction like 'outgoing' order by id desc limit 1000;
+---------+------------+------------------+-------------------+------------+---------------+------------+---------------+------------+----------+----------+----------+-----------+--------+--------------------+-------+
| id      | instance   | time             | billid            | chan       | address       | caller     | called        | calledfull | billtime | ringtime | duration | direction | status | reason             | ended |
+---------+------------+------------------+-------------------+------------+---------------+------------+---------------+------------+----------+----------+----------+-----------+--------+--------------------+-------+
| 1328694 | TTYATEMX01 | 1373631998.26800 | 1373602023-8959   | sig/8617   | local_out/99  | 6562571137 | 0446561071345 |            |        3 |        3 |       10 | outgoing  | hangup | normal-clearing    |     1 |

This is the configuration of register.conf:
[general]
call.cdr=yes

[call.cdr]

account=cdrs

critical=no

initquery=UPDATE cdrs SET ended=1 WHERE ended IS NULL OR ended=0

cdr_initialize=INSERT INTO cdrs VALUES(NULL, 'TTYATEMX01', ${time}, '${billid}', '${chan}', '${address}', '${caller}', '${called}', '${calledfull}', '${billtime}', '${ringtime}', '${duration}', '${direction}', '${status}', '${reason}', 0)
cdr_update=UPDATE cdrs SET address='${address}', direction='${direction}', billid='${billid}', caller='${caller}', called='${called}', calledfull='${calledfull}', duration='${duration}', billtime='${billtime}', ringtime='${ringtime}', status='${status}', reason='${reason}' WHERE chan = '${chan}' AND time = ${time}
cdr_finalize=UPDATE cdrs SET address='${address}', direction='${direction}', billid='${billid}', caller='${caller}', called='${called}', calledfull='${calledfull}', duration='${duration}', billtime='${billtime}', ringtime='${ringtime}', status='${status}', reason='${reason}', ended=1 WHERE chan='${chan}' AND time=${time}


Is there a way to record the complete number with prefix, instead of the number only?
Please let me know if more info is requierd to solve this issue.

Thanks!