[OpenSIPS-Users] ACC CDR

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Apr 5 12:22:02 CEST 2013


Hi Khaled,

All the time the ACC module writes into the ACC table (and not into CDRS 
table) - the record you get into ACC table actually reflects a CDR - it 
has duration, setuptime, everything.

So you get your CDR :)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 04/04/2013 05:17 PM, M.Khaled W Chehab wrote:
>
> Hi Bogdan,
>
> mysql> select * from acc limit 1 ;
>
> +----+--------+----------+-------------------+------------------+----------+------------+---------------------+--------+----------+------------+-----------+---------------------+----------------------------+----------------------------------+---------+-----+-----------------+--------------+-----------+---------+--------------+----------------+---------+-----------------------------------+-----+------+------+-------+-----------+------+--------------+-----------+-------------------+---------------------+---------------+
>
> | id | method | from_tag | to_tag            | callid           | 
> sip_code | sip_reason | time                | cdr_id | duration | 
> durationms | setuptime | created             | 
> from_uri                   | to_uri                           | 
> gateway | ani | dest            | source       | callsetup | leg_src | 
> leg_dst      | via            | timeout | 
> uaA                               | uaB | uuid | pdd  | rate  | 
> cusid     | cost | dstname      | dstprefix | trunkdialednumber | 
> timestamp           | failure_count |
>
> +----+--------+----------+-------------------+------------------+----------+------------+---------------------+--------+----------+------------+-----------+---------------------+----------------------------+----------------------------------+---------+-----+-----------------+--------------+-----------+---------+--------------+----------------+---------+-----------------------------------+-----+------+------+-------+-----------+------+--------------+-----------+-------------------+---------------------+---------------+
>
> |  1 | INVITE | 1a5a4937 | 3573387689-983960 | 1c11f97fbb29600c | 
> 200      | OK         | 2013-03-27 15:41:42 |      1 |       19 |      
> 18782 |        15 | 2013-03-27 15:41:27 | <sip:ew at 77.42.241.66:8036> | 
> sip:777201001168108 at 5.104.224.33 | Provider1  | ew  | 777201001168108 
> | 77.42.241.66 | NULL      |         | 201001168108 | 74.201.101.201 
> |         | eyeBeam release 3007n stamp 17816 |     | NULL |      | 
> 0.031 | 100000020 | NULL | Egypt-Mobile | 777201    | 
> 201001168108      | 2013-03-27 15:42:01 | 0             |
>
> +----+--------+----------+-------------------+------------------+----------+------------+---------------------+--------+----------+------------+-----------+---------------------+----------------------------+----------------------------------+---------+-----+-----------------+--------------+-----------+---------+--------------+----------------+---------+-----------------------------------+-----+------+------+-------+-----------+------+--------------+-----------+-------------------+---------------------+---------------+
>
> mysql> select * from cdrs  limit 1 ;
>
> +--------+---------------------+---------------------+----------+------------+------------------+--------------+-------------------+---------------------+-----+-----------------+--------------+----------------+----------+-----+---------+---------+------------+-----------+--------------+-----------+------------+---------------+---------+-------------+
>
> | cdr_id | call_start_time     | call_end_time       | duration | 
> durationms | sip_call_id      | sip_from_tag | sip_to_tag        | 
> created             | ani | dest            | source       | 
> via            | sip_code | pdd | bye_leg | rate    | cost       | 
> cusid     | dstname      | dstprefix | sip_reason | customer_name | 
> gateway | accduration |
>
> +--------+---------------------+---------------------+----------+------------+------------------+--------------+-------------------+---------------------+-----+-----------------+--------------+----------------+----------+-----+---------+---------+------------+-----------+--------------+-----------+------------+---------------+---------+-------------+
>
> There is a difference in field as I am not getting any error while 
> debugging using debug level 4 , moreover I was running store procedure 
> before to fill cdrs table  ,now I am trying to let opensips write cdr 
>  directly to cdrs table .
>
> Regards
>
> *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Thursday, April 04, 2013 4:11 PM
> *To:* M.Khaled W Chehab
> *Cc:* 'OpenSIPS users mailling list'
> *Subject:* Re: [OpenSIPS-Users] ACC CDR
>
> Could you post the record from DB ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 04/04/2013 03:36 PM, M.Khaled W Chehab wrote:
>
> Yes I can get the  records  in acc  table
>
> Regards
>
> *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Thursday, April 04, 2013 3:16 PM
> *To:* M.Khaled W Chehab
> *Cc:* 'OpenSIPS users mailling list'
> *Subject:* Re: [OpenSIPS-Users] ACC CDR
>
> And you get no record in the "ACC" table ?
>
> Regards,
>
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 04/04/2013 03:13 PM, M.Khaled W Chehab wrote:
>
> Hi Bogdan,
>
> Already  dialog module loaded ,
>
> $var(a) = "udp:"+$avp(termip)+":5060";
>
>                      $fs = $var(a) ;
>
> setflag(1); # do accounting
>
>                      setflag(2); #Missed calls
>
>                      #setflag(3); #transaction falis
>
>                      setflag(4); #CDR flag
>
>                      # create dialog with timeout
>
>                      if ( !create_dialog("B") ) {
>
>                             send_reply("500","Internal Server Error");
>
>                             exit;
>
>                      }
>
>                      $dlg_val("customerid") = $avp(Cusid);
>
>                      engage_media_proxy();
>
>                      topology_hiding();
>
> please advice
>
> regards
>
> *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Thursday, April 04, 2013 3:10 PM
> *To:* M.Khaled W Chehab
> *Cc:* 'OpenSIPS users mailling list'
> *Subject:* Re: [OpenSIPS-Users] ACC CDR
>
> Hi Khaled,
>
> Load the "dialog" module too and do "create_dialog()" for the initial 
> INVITEs.
>
> Regards,
>
>
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 04/03/2013 06:48 PM, M.Khaled W Chehab wrote:
>
> Hello,
>
> I already add  the below config to my script and no call can be found 
> in cdrs table
>
>        modparam("acc", "db_flag", 1)
>
>        modparam("acc", "db_missed_flag", 2)
>
>        modparam("acc", "log_missed_flag", 2)
>
>        modparam("acc", "failed_transaction_flag", 3)
>
>        modparam("acc", "cdr_flag", 4)
>
>        if (!has_totag() &&is_method("INVITE")) {
>
>                      setflag(1); # do accounting
>
>                      setflag(2); #Missed calls
>
>                      #setflag(3); #transaction falis
>
>                             setflag(4); #CDR flag
>
> whats missing ?
>
> Regards
>
> Khaled
>
> *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Wednesday, April 03, 2013 6:25 PM
> *To:* OpenSIPS users mailling list
> *Cc:* M.Khaled W Chehab
> *Subject:* Re: [OpenSIPS-Users] ACC CDR
>
> Hello,
>
> Use the ACC module together with DIALOG module and set the cdr_flag 
> option in ACC (see 
> http://www.opensips.org/html/docs/modules/1.9.x/acc.html#id294245) - 
> you need to set this flag at at INVITE time only (plus one of the acc 
> flags).
>
> Regards,
>
>
>
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 04/03/2013 04:55 PM, M.Khaled W Chehab wrote:
>
> Dears ,
>
> Is there a way to right directly to CDRS table in mysql  .
>
> Regards
>
>   
>   
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130405/2c5b33d5/attachment-0001.htm>


More information about the Users mailing list