<br><br><div class="gmail_quote"> <br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Daniel,<br><br>This is my ACC configuration:<br><br>
# ----- acc params -----<br>/* what sepcial events should be accounted ? */<br>modparam("acc", "early_media", 1)<br>modparam("acc", "report_ack", 1)<br>
modparam("acc", "report_cancels", 1)<br>/* by default ww do not adjust the direct of the sequential requests.<br> if you enable this parameter, be sure the enable "append_fromtag"<br> in "rr" module */<br>
modparam("acc", "detect_direction", 0)<br>/* account triggers (flags) */<br><b>modparam("acc", "failed_transaction_flag", 3)</b><br>modparam("acc", "log_flag", 1)<br>
modparam("acc", "log_missed_flag", 2)<br>modparam("acc", "log_extra",<br> "src_user=$fU;src_domain=$fd;dst_to_user=$tU;dst_user=$rU;dst_domain=$rd;diversion_uri=$di;destination_uri=$du;display_name=$fn;orig_src_domain=$od;orig_req_uri=$ou;orig_username=$oU;prefered_identity=$pd;display_name_pref_ident=$pn;proxy_ip=$Ri;proxy_port=$Rp;src_ip=$si;dst_dom_uri=$td;user_agent=$ua")<br>
/* uncomment the following lines to enable DB accounting also */<br>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_missed_flag", 2)<br>modparam("acc", "db_url",<br>
"mysql://openser:openserrw@localhost/openser10")<br>modparam("acc", "db_extra",<br> "src_user=$fU;src_domain=$fd;dst_to_user=$tU;dst_user=$rU;dst_domain=$rd;diversion_uri=$di;destination_uri=$du;display_name=$fn;orig_src_domain=$od;orig_req_uri=$ou;orig_username=$oU;prefered_identity=$pd;display_name_pref_ident=$pn;proxy_ip=$Ri;proxy_port=$Rp;src_ip=$si;dst_dom_uri=$td;user_agent=$ua")<br>
<br>I run kamailio-1.5.3 no TLS<br><br>What exactly is iirc?<br><br>When i call from an user to an other and the call is passing in case of failure from failure route1 then I get an extra cdr from the failure route1 BUT when I call pstn and the call goes to Failure route2 then I don't get the extra CDRs. One important diference between Failure route1 and 2 is that in the Failure route2 I have an extra <b>append_branch();</b><br>
<br> Failure Route 1 (default)<br><br>failure_route[1] {<br> xlog("alx ------- Failure Route 1 -------");<br>#n# if (is_method("INVITE")<br>#n# && (isbflagset(6) || isflagset(5))) {<br>
#n# unforce_rtp_proxy();<br>#n# }<br><br> if (t_was_cancelled()) {<br> exit;<br> }<br><br> # uncomment the following lines if you want to block client<br> # redirect based on 3xx replies.<br>
##if (t_check_status("3[0-9][0-9]")) {<br> ##t_reply("404","Not found");<br> ## exit;<br> ##}<br><br> # uncomment the following lines if you want to redirect the failed<br>
# calls to a different new destination<br> ##if (t_check_status("486|408")) {<br> ## sethostport("<a href="http://192.168.2.100:5060">192.168.2.100:5060</a>");<br> ## append_branch();<br>
## # do not set the missed call flag again<br> ## t_relay();<br> ##}<br>}<br><br>Failure Route2 <br><br><br>failure_route[2] {<br> <br> if(t_was_cancelled()) {<br> exit;<br> }<br>
<br> if(t_check_status("4[0-9][0-9]|5[0-9][0-9]"))<br> {<br><br> #xlog("ACCOUNTING: src_user=$fU;src_domain=$fd;dst_to_user=$tU;dst_user=$rU;dst_domain=$rd;diversion_uri=$di;destination_uri=$du;display_name=$fn;orig_src_domain=$od;orig_req_uri=$ou;orig_username=$oU;prefered_identity=$pd;display_name_pref_ident=$pn;proxy_ip=$Ri;proxy_port=$Rp;src_ip=$si;dst_dom_uri=$td;user_agent=$ua;sip_replay_reson=$rr;sip_replay_status=$T_reply_code");<br>
<br> if(ds_next_domain())<br> {<br> xlog("alx ------------------------------------- The final RU is $rU and the cust_prefix:$avp(s:cust_prefix) --------");<br> xlog("alx ------- [ FAILURE ROUTE 2 ] First part of failure with rd = $rd and prefix = $(ru{uri.param,prefix}) ---");<br>
# more destinations from same dispatcher group<br><br> # add prefix if set and remove the param from R-URI<br> if($(ru{uri.param,prefix})!=null)<br> {<br> $ru = "sip:" + $avp(s:cust_prefix) + $(ru{uri.param,prefix}) + $avp(s:user) + "@" + $rd;<br>
} else {<br> $ru = "sip:" + $avp(s:cust_prefix) + $avp(s:user) + "@" + $rd;<br> }<br> #rewriteport(5065);<br> #setport("5065");<br>
t_on_failure("2");<br> <b>append_branch();</b> ##################################################################### This is different !!!!!!!!!!!!!!!!!!<br> t_relay();<br> exit;<br>
} else {<br> # go to next dispatcher group<br> xlog("alx ------- This is the next DST group = $avp(s:dstgrp) -------");<br> <br> <br> if($avp(s:dstgrp)!=null)<br>
{<br> # select destination<br> if(ds_select_domain("$avp(s:dstgrp)", "4"))<br> {<br> xlog("alx ------- [ FAILURE ROUTE 2 ] Second part of failure with rd = $rd and prefix = $(ru{uri.param,prefix}) ---");<br>
xlog("alx ------------------------------------- The final RU is $rU and the cust_prefix:$avp(s:cust_prefix) --------");<br> # add prefix if set and remove the param from R-URI<br>
if($(ru{uri.param,prefix})!=null)<br> {<br> $ru = "sip:" + $avp(s:cust_prefix) + $(ru{uri.param,prefix}) + $avp(s:user) + "@" + $rd;<br>
} else {<br> $ru = "sip:" + $avp(s:cust_prefix) + $avp(s:user) + "@" + $rd;<br> }<br> $avp(s:dstgrp) = null;<br> xlog("alx ------- This is the next DST group after NULL = $avp(s:dstgrp) -------");<br>
xlog("alx ------- The final RURI is $ru ------- ");<br> t_on_failure("2");<br> <b>append_branch();</b>##################################################################### This is different !!!!!!!!!!!!!!!!!!<br>
t_relay();<br> exit;<br> }<br> } else {<br> t_reply("444", "No more tries for you!");<br> }<br> }<br>}<br>
<br><br><br>Thanks<br><font color="#888888">Alex</font><div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Mon, Jan 25, 2010 at 12:39 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Hi Alex,<div><br>
<br>
On 1/25/10 11:03 AM, alex pappas wrote:
<blockquote type="cite">Hi Daniel,<br>
<br>
We make a call and the call tries from the Failure Route 5 times new
gateway (with dispatcher) but WITHOUT success in termination. In every
try we get back 503 Congestion. In this case how many CDRs we should
see in our LOG.<br>
<br>
We have the modparam("acc", "failed_transaction_flag", 6) and we
setflag(6) for every INVITE.<br>
</blockquote></div>
iirc, at some point was an option to get all failed legs accounted. I
don't remember using it so I have to check the sources (you are on
1.5.x, right?).<br>
<br>
For next version I plan to make acc functions available on rest of the
routes, should be few updates to take sip method from cseq header and
ignore r-uri if it is a reply processed, in failure route should work
by default, I see no reasons now what could be the problem.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote type="cite"><div><br>
<div class="gmail_quote">On Fri, Jan 22, 2010 at 3:33 PM,
Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,
<div>
<div><br>
<br>
On 1/22/10 1:08 PM, alex pappas wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Friends,<br>
<br>
In case of a call failure I'm trying from failure route to send the
call through other gateways with Dispatcher module.<br>
I would like to have ACC for all failures that a call can possibly
pass. If the call fails in the 3 first gateways I want them also in my
mysql ACC table. I tried that with AVPs in the syslog and it works fine
BUT is there any way that I can simply setflag(1) for accounting and I
can have ACC for every try?<br>
<br>
I tryied to add in failure route :<br>
<br>
setflag(1); # do accounting ...<br>
setflag(3); # ... even if the transaction fails<br>
<br>
but I'm getting ACC only the last try.<br>
<br>
</blockquote>
</div>
</div>
last failed try? Or what you mean by "the last try"? IIRC, failed
transaction flag should be set for each leg if you want all failures.<br>
<br>
Cheers,<br>
Daniel<br>
<font color="#888888"><br>
-- <br>
Daniel-Constantin Mierla<br>
* <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a><br>
<br>
</font></blockquote>
</div>
<br>
</div><pre><fieldset></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<div><a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a></div></pre>
</blockquote>
<br><div>
<pre cols="72">--
Daniel-Constantin Mierla
* <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>
</pre>
</div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>