[OpenSIPS-Users] AVP on local route

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Jun 12 18:48:42 CEST 2013


Hello Khaled,

Yes, the ACC will generate the cdr record after the local route triggering.

But if you want to push some additional info to the CDR, I advice you to
use the extra_db accounting (see
http://www.opensips.org/html/docs/modules/1.9.x/acc.html#ACC-extra-id)
for the PDD value.

Best regards,

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


On 06/12/2013 06:26 PM, M.Khaled W Chehab wrote:
>
> Hello Bogdan,
>
>  
>
> I am using cdr flag and I think that what is causing this problem,
> since the  update is done before the acc module insert the record.
>
> And I don't want to use acc start/stop ,is there a way to set a delay
> timer  after acc_db_request("200 Dialog Timeout", "acc");
>
> Or let the acc module insert the invite when call is connected ( 200 ok )
>
>  
>
>  
>
> Regards
>
>  
>
>  
>
> *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Wednesday, June 12, 2013 1:19 PM
> *To:* OpenSIPS users mailling list
> *Cc:* M.Khaled W Chehab
> *Subject:* Re: [OpenSIPS-Users] AVP on local route
>
>  
>
> Hello Khaled,
>
> What kind of accounting are you using in script ? Based on CDR flag ?
> Based on ACC flag (start/stop) ? or manual accounting (with functions) ?
>
> Maybe the record you are trying to update in local route does not
> exist in ACC table yet (depending on the accounting method you are using).
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 06/03/2013 02:27 PM, M.Khaled W Chehab wrote:
>
> Hi,
>
>  
>
> The   execution for the avp_db_query is not working fine  in local
> route after the  acc_db_request  ,
>
>  
>
> As I print the query using xlog(" and   insert t it to myql ,the query
> executed normally which means I have no problem in the mysql query  .
>
>  
>
> My question: how can update the record in the acc table  after
> acc_db_request("200 Dialog Timeout", "
>
>  
>
>  
>
> local_route {
>
>             if (is_method("BYE")  && $DLG_dir=="UPSTREAM") {
>
>                          xlog("L_INFO", "--Debug Customer
> ID:$avp(Cusid)/IP:$si---------Reply:
> $T_reply_code------Source:$rd\nDialed:$fU\n:");
>
>  
>
>                         acc_db_request("200 Dialog Timeout", "acc");
>
>  
>
> avp_db_query("UPDATE `opensips`.`acc` SET `pdd`='$var(pdd)' WHERE
> `CALLID` ='$ci' and `method`='INVITE'" );
>
>  
>
>  
>
> BTW: I cant find the acc record for the call unless  the call  ended
> ,and in my case I set the  acc_db_request("200 Dialog Timeout  then
> call avp_db_query(   is  that should insert the call in the acc to
> update it later
>
>  
>
> 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/20130612/11428902/attachment.htm>


More information about the Users mailing list