<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Are you calling t_relay() from branch_route?<br>
<br>
Maybe you should load debugger module and enable cfgtrace to see
what actions from kamailio.cfg are executed.<br>
<br>
Just changing the $ru and relaying should work when used in
request_route.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 16/03/15 14:14, Yuriy Gorlichenko
wrote:<br>
</div>
<blockquote
cite="mid:CABSP_Vc6eS+kiqCgcdnhzoX2FBW0OD9PdtDnjU0gLJ+ec6D-7A@mail.gmail.com"
type="cite">
<div dir="ltr">I mean that algorithm of creating new headers of
creating INVOTE message is the same for branch_branch route and
single client. Only one difference i that I use $ru=<span
style="font-size:12.8000001907349px">"sip:"+$tU+"@"+$(du{s.</span><span
style="font-size:12.8000001907349px">select,1,:}</span> vs
append_branch(<span style="font-size:12.8000001907349px">"<a class="moz-txt-link-freetext" href="sip:$tU@$(du">sip:$tU@$(du</a>{s.</span><span
style="font-size:12.8000001907349px">select,1,:}</span>)")<br>
<br>
This is full algo of my reqest<br>
the first is I check at location table num of endpoints for this
peer and then at the "while" do this<br>
<br>
<div>
sql_pvquery("ca", "select received from location where
contact='$dbr(ra=>[$var(i),0])'","$var(recieved)");</div>
<div><span class="" style="white-space:pre"> </span>$du=$var(recieved);</div>
<div><span class="" style="white-space:pre"> </span>xlog("L_INFO","SQL
query return recieved {$var(recieved)} for {$tU}. Destination
is {$du}\n");</div>
<div><span class="" style="white-space:pre"> # if only one
client used it means that I use $ru
</span></div>
<div><span class="" style="white-space:pre"> </span>if
($dbr(ra=>rows)==1)</div>
<div><span class="" style="white-space:pre"> </span>{</div>
<div><span class="" style="white-space:pre"> </span><span
class="" style="white-space:pre"> </span>xlog("L_INFO","Single
ANGENT");</div>
<div><span class="" style="white-space:pre"> </span><span
class="" style="white-space:pre"> </span>xlog("L_INFO","WS
Branch is {$du)} for {$tU}\n");</div>
<div><span class="" style="white-space:pre"> </span><span
class="" style="white-space:pre"> </span>rtpengine_manage("force
trust-address replace-origin replace-session-connection
ICE=force RTP/SAVPF");</div>
<div><span class="" style="white-space:pre"> </span><span
class="" style="white-space:pre"> </span>t_on_reply("REPLY_FROM_WS");</div>
<div><span class="" style="white-space:pre"> </span><span
class="" style="white-space:pre"> </span>$ru="sip:"+$tU+"@"+$(du{s.select,1,:});</div>
<div><span class="" style="white-space:pre"> </span><span
class="" style="white-space:pre"> </span>route("FINAL_RELAY");</div>
<div><span class="" style="white-space:pre"> </span>}</div>
<div><span class="" style="white-space:pre"> </span>else</div>
<div><span class="" style="white-space:pre"> </span>{</div>
<div><span class="" style="white-space:pre"> </span>append_branch(<a class="moz-txt-link-rfc2396E" href="sip:$tU@$(du{s.select,1,:})">"sip:$tU@$(du{s.select,1,:})"</a>,"0.7");</div>
<div><span class="" style="white-space:pre"> </span>}<br>
<br>
<div>#after while ended if more that one endpoint used <br>
<br>
t_on_branch("1");<br>
return;</div>
<br>
<div>branch_route[1]{</div>
<div><br>
</div>
<div><span class="" style="white-space:pre"> </span>if($du=~"transport=ws"){</div>
<div><span class="" style="white-space:pre"> </span>xlog("L_INFO","Websocket
Branch is {$du} for {$tU}\n");</div>
<div><span class="" style="white-space:pre"> </span>rtpengine_manage("force
trust-address replace-origin replace-session-connection
ICE=force RTP/SAVPF");</div>
<div><span class="" style="white-space:pre"> </span>t_on_reply("REPLY_FROM_WS");</div>
<div><span class="" style="white-space:pre"> </span></div>
<div><span class="" style="white-space:pre"> </span>}</div>
<div><span class="" style="white-space:pre"> </span>else{</div>
<div><span class="" style="white-space:pre"> </span>xlog("L_INFO","UDP
Branch is {$du)} for {$tU}\n");</div>
<div><span class="" style="white-space:pre"> </span>rtpengine_manage("replace-origin
replace-session-connection ICE=remove RTP/AVP");</div>
<div><span class="" style="white-space:pre"> </span>t_on_reply("MANAGE_CLASSIC_REPLY");</div>
<div><span class="" style="white-space:pre"> </span>}</div>
<div>}<br>
<br>
<div>route[FINAL_RELAY]</div>
<div>{</div>
<div> </div>
<div><span class="" style="white-space:pre"> </span>if
(!t_relay()) {</div>
<div><span class="" style="white-space:pre"> </span>sl_reply_error();</div>
<div><span class="" style="white-space:pre"> </span>}</div>
<div>return;<span class="" style="white-space:pre"> </span></div>
<div>}</div>
</div>
</div>
<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-03-16 15:46 GMT+03:00 Yuriy
Gorlichenko <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">request_route</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-03-16 15:43 GMT+03:00
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Is this used in request_route or in
failure_route or other routing block?<br>
<br>
Cheers,<br>
Daniel
<div>
<div><br>
<br>
On 16/03/15 12:44, Yuriy Gorlichenko
wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">If I use <br>
<div><br>
$ru="sip:"+$tU+"@"+$(du{s.select,1,:});<br>
<div><br>
</div>
<div>if (!t_relay()) {</div>
<div><span
style="white-space:pre-wrap"> </span>sl_reply_error();</div>
}</div>
<div><br>
</div>
<div>I see <br>
<br>
t_forward_nonack(): ERROR:
t_forward_nonack: no branches for
forwarding</div>
<div>Mar 16 11:36:04 Kamailio
kamailio[4335]: ERROR: sl
[sl_funcs.c:363]: sl_reply_error():
ERROR: sl_reply_error used: I'm
terribly sorry, server error occurred
(6/SL)</div>
<div><br>
</div>
if I use append_branch()<br>
for single client - thats is ok but 2
invites going to client.<br>
So client may pickup call and it
successfully established. </div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-03-16
13:24 GMT+03:00 Daniel-Constantin
Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com"
target="_blank">miconda@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF"
text="#000000"> Hello,<br>
<br>
instead of seturi use:<br>
<br>
$ru = "sip:" + $tU + "@" +
$(du{s.select,1,:});<br>
<br>
Cheers,<br>
Daniel
<div>
<div><br>
<br>
<div>On 16/03/15 05:44, Yuriy
Gorlichenko wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Now. when I
use <br>
<br>
seturi(<a
moz-do-not-send="true">"sip:$tU@$(du{s.select,1,:})"</a>);<br>
<br>
I see error at my log<br>
<br>
<div> ERROR: tm
[t_lookup.c:1264]:
new_t(): ERROR: new_t:
uri invalid</div>
<div> ERROR: tm
[t_lookup.c:1411]:
t_newtran(): ERROR:
t_newtran: new_t failed</div>
<div> ERROR: tm
[t_lookup.c:1264]:
new_t(): ERROR: new_t:
uri invalid</div>
<div> ERROR: tm
[t_lookup.c:1411]:
t_newtran(): ERROR:
t_newtran: new_t failed</div>
<div> ERROR: sl
[sl_funcs.c:363]:
sl_reply_error(): ERROR:
sl_reply_error used:
Regretfully, we were not
able to process the URI
(479/SL)</div>
<div> ERROR: sl
[sl_funcs.c:363]:
sl_reply_error(): ERROR:
sl_reply_error used:
Regretfully, we were not
able to process the URI
(479/SL)</div>
<div><br>
As i see error generate
twice maby because I ure
t_on branch() route</div>
<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-03-16
7:18 GMT+03:00 Yuriy
Gorlichenko <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span>:<br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div dir="ltr">Hello.
I try to call
multi[ple endpoints
from my server using
append_branch. It
works fine but when
I have only one
endpoint - kamailio
generate 2 INVITE
requests to it.<br>
As I understand it
is original request
and the next one is
branch. <br>
I used seturi()
before for sending
original reqest to
destination, but I
can not see this
function at kamailio
4.3.<br>
Kamailio 4.3 uses
send() dunnction?
but it works at
stateless mode. I
need analog of it or
seturi that works at
statefull mode.<br>
<br>
<br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
</font></span></div>
<br>
_______________________________________________<br>
SIP Express Router (SER) and
Kamailio (OpenSER) - sr-users
mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
</div>
</div>
</div>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<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>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
</body>
</html>