<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
is it for a 200ok reply or >=300?<br>
<br>
In the code, the r-uri from the branch that is used for relaying the
reply should be used.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 14/12/13 12:15, Kelvin Chua wrote:<br>
</div>
<blockquote
cite="mid:CAMF97-cBL9wTAvNQPE2tBSGzfhPzhdASWdTeS3ZiXjkyv7mxCw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>this is the 2nd branch, the first branch is sent to
100.200.30.40</div>
<div>$rd is set properly according to xlog (10.20.30.40).
tcpdump proves packets are sent to 10.20.30.40</div>
<div>however, after failing, ACC logs dst_domain as the
previous branch's $rd (100.200.30.40), not the current
one.</div>
<div>is this the expected behavior? seems incorrect.</div>
<div><br>
</div>
<div>modparam("acc",
"db_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;callrate=$avp(callrate)")</div>
</div>
<div><br>
</div>
<div>
<div>failure_route[SERIAL] {</div>
<div> if (is_method("INVITE|SUBSCRIBE")) {</div>
<div> t_on_branch("MANAGE_BRANCH");</div>
<div> t_on_reply("MANAGE_REPLY");</div>
<div> }</div>
<div> if ( isbflagset(FLB_CANCEL) ) {</div>
<div> xlog("cancel bflag set!\n");</div>
<div> exit;</div>
<div> } else if ( !t_next_contacts() ) {</div>
<div>
xlog("serial fork done!\n");</div>
<div> t_reply("404", "Not here or busy");</div>
<div> exit;</div>
<div> } else {</div>
<div> setflag(FLT_ACC);</div>
<div> setflag(FLT_ACCMISSED);</div>
<div> xlog("failure_route new branch -
$ru\n");</div>
<div> t_on_failure("SERIAL");</div>
<div> $avp(callrate) = "";</div>
<div> if ( $sel(ruri.params["rtmr"]) != $null
) {</div>
<div>
t_set_fr($sel(ruri.params["rtmr"])*1000,$sel(ruri.params["dtmr"])*1000);</div>
<div> $avp(ABSOLUTE) =
$sel(ruri.params["tmr"]);</div>
<div> }</div>
<div> if ( $sel(ruri.params["callrate"]) !=
$null )</div>
<div> $avp(callrate) =
$sel(ruri.params["callrate"]);</div>
<div> xlog("failure_route sending INVITE to
$rd\n");</div>
<div> t_relay();</div>
<div> }</div>
<div>}</div>
</div>
<div><br>
</div>
<div>ERROR: <script>: failure_route sending INVITE to
10.20.30.40</div>
<div>DEBUG: <script>: new branch [1] to
<a class="moz-txt-link-freetext" href="sip:14X88X72X2X@10.20.30.40:5060;dtmr=1;rtmr=20;tmr=60;callrate=0.007600000000">sip:14X88X72X2X@10.20.30.40:5060;dtmr=1;rtmr=20;tmr=60;callrate=0.007600000000</a></div>
<div>DEBUG: siputils [checks.c:103]: has_totag(): no totag</div>
<div>DEBUG: rtpproxy [rtpproxy_funcs.c:148]:
check_content_type(): type <application/sdp> found
valid</div>
<div>DEBUG: <core> [parser/sdp/sdp_helpr_funcs.c:565]:
extract_mediaip(): located IP address [192.168.5.191] in
`o=' field</div>
<div>DEBUG: <core> [parser/sdp/sdp_helpr_funcs.c:565]:
extract_mediaip(): located IP address [192.168.5.191] in
`c=' field</div>
<div>DEBUG: rtpproxy [rtpproxy.c:2630]: force_rtp_proxy():
proxy reply: 10370 2X8.1X1.3X.2X#012</div>
<div>DEBUG: siputils [checks.c:103]: has_totag(): no totag</div>
<div>DEBUG: <core> [msg_translator.c:461]:
clen_builder(): clen_builder: content-length: 172 (172)</div>
<div>DEBUG: <core> [msg_translator.c:206]:
check_via_address(): check_via_address(1X5.2X2.1X7.1X0,
192.168.5.191, 0)</div>
<div>DEBUG: <core> [parser/sdp/sdp.c:793]: free_sdp():
_sdp = 0x7f53c9a5e580</div>
<div>DEBUG: <core> [parser/sdp/sdp.c:795]: free_sdp():
sdp = 0x7f53cb87d3e0</div>
<div>DEBUG: <core> [parser/sdp/sdp.c:797]: free_sdp():
session = 0x7f53cb87d480</div>
<div>DEBUG: tm [t_reply.c:1710]: relay_reply(): DEBUG:
relay_reply: branch=0, save=0, relay=-1</div>
<div>DEBUG: tm [t_reply.c:1211]: t_should_relay_response():
->>>>>>>>> T_code=100,
new_code=408</div>
<div>DEBUG: tm [t_hooks.c:288]:
run_trans_callbacks_internal(): DBG: trans=0x7f53c1511148,
callback type 128, id 0 entered</div>
<div>DEBUG: acc [acc_logic.c:539]: tmcb_func(): acc callback
called for t(0x7f53c1511148) event type 128, reply code 408</div>
<div>NOTICE: acc [acc.c:279]: acc_log_request(): ACC: call
missed:
timestamp=1387019197;method=INVITE;from_tag=wyudf;to_tag=;call_id=cjfbdfydrjielti@X340saucy;code=408;reason=Request
Timeout;src_user=kelvin;src_domain=2X8.1X1.3X.2X;src_ip=1X5.2X2.1X7.1X0;dst_ouser=14X88X72X2X;dst_user=14X88X72X2X;dst_domain=100.200.30.40;callrate=0.007600000000</div>
</div>
<div><br>
</div>
<br clear="all">
<div>Kelvin Chua</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>