[SR-Users] acc flag before droping the call

Daniel-Constantin Mierla miconda at gmail.com
Sun Jan 22 21:57:55 CET 2012


Hello,

On 1/22/12 9:41 AM, Uri Shacked wrote:
> Hi,
> I am doing an internal chaek right after the following:
> "
> ...........
> # account only INVITEs
>  if (is_method("INVITE"))
>  {
>
>  setflag(FLT_ACC); # do accounting
> .............
> "
> sometimes this check does not find the conditions needed and creates a 
> sl_reply (404).
> the scenario works OK. now, i need the acc tabale record.... should 
> probably be "INVITE".....""....... ""..... "404" .... "not found"....
> well, there is no record there.
> i tried the ACCFAILED flag as well, still does not work.
> i guess it has something to do with the transaction stage....
> so, any idea on how to get ACC record with the ACC module there?
instead of sl_send_reply("404", "...") use:

t_newtran();
t_reply("404", "...");

or before sl_send_reply() do an acc_db_request("404 Not found", "acc").

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list