<div dir="ltr">Hello <div><br><div>Just modify RURI, t_relay(), and a new branch
will automatically be created<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 8:58 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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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<div><div class="h5"><br>
<br>
<div>On 16/03/15 14:14, Yuriy Gorlichenko
wrote:<br>
</div>
<blockquote 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>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 style="white-space:pre-wrap"> </span>$du=$var(recieved);</div>
<div><span style="white-space:pre-wrap"> </span>xlog("L_INFO","SQL
query return recieved {$var(recieved)} for {$tU}. Destination
is {$du}\n");</div>
<div><span style="white-space:pre-wrap"> # if only one
client used it means that I use $ru
</span></div>
<div><span style="white-space:pre-wrap"> </span>if
($dbr(ra=>rows)==1)</div>
<div><span style="white-space:pre-wrap"> </span>{</div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>xlog("L_INFO","Single
ANGENT");</div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>xlog("L_INFO","WS
Branch is {$du)} for {$tU}\n");</div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>rtpengine_manage("force
trust-address replace-origin replace-session-connection
ICE=force RTP/SAVPF");</div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>t_on_reply("REPLY_FROM_WS");</div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>$ru="sip:"+$tU+"@"+$(du{s.select,1,:});</div>
<div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>route("FINAL_RELAY");</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>else</div>
<div><span style="white-space:pre-wrap"> </span>{</div>
<div><span style="white-space:pre-wrap"> </span>append_branch(<a>"sip:$tU@$(du{s.select,1,:})"</a>,"0.7");</div>
<div><span style="white-space:pre-wrap"> </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 style="white-space:pre-wrap"> </span>if($du=~"transport=ws"){</div>
<div><span style="white-space:pre-wrap"> </span>xlog("L_INFO","Websocket
Branch is {$du} for {$tU}\n");</div>
<div><span style="white-space:pre-wrap"> </span>rtpengine_manage("force
trust-address replace-origin replace-session-connection
ICE=force RTP/SAVPF");</div>
<div><span style="white-space:pre-wrap"> </span>t_on_reply("REPLY_FROM_WS");</div>
<div><span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>else{</div>
<div><span style="white-space:pre-wrap"> </span>xlog("L_INFO","UDP
Branch is {$du)} for {$tU}\n");</div>
<div><span style="white-space:pre-wrap"> </span>rtpengine_manage("replace-origin
replace-session-connection ICE=remove RTP/AVP");</div>
<div><span style="white-space:pre-wrap"> </span>t_on_reply("MANAGE_CLASSIC_REPLY");</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div>}<br>
<br>
<div>route[FINAL_RELAY]</div>
<div>{</div>
<div> </div>
<div><span style="white-space:pre-wrap"> </span>if
(!t_relay()) {</div>
<div><span style="white-space:pre-wrap"> </span>sl_reply_error();</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div>return;<span style="white-space:pre-wrap"> </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 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>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-03-16 15:43 GMT+03:00
Daniel-Constantin Mierla <span dir="ltr"><<a 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 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>"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 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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a 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 href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a 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 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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a 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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a 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 href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a 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 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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a 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 cols="72">--
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a 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 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 href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a 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>