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="sip:"+$tU+"@"+$(du{s.select,1,:} vs append_branch("sip:$tU@ $(du{s.select,1,:})")
This is full algo of my reqest the first is I check at location table num of endpoints for this peer and then at the "while" do this
sql_pvquery("ca", "select received from location where contact='$dbr(ra=>[$var(i),0])'","$var(recieved)"); $du=$var(recieved); xlog("L_INFO","SQL query return recieved {$var(recieved)} for {$tU}. Destination is {$du}\n"); # if only one client used it means that I use $ru if ($dbr(ra=>rows)==1) { xlog("L_INFO","Single ANGENT"); xlog("L_INFO","WS Branch is {$du)} for {$tU}\n"); rtpengine_manage("force trust-address replace-origin replace-session-connection ICE=force RTP/SAVPF"); t_on_reply("REPLY_FROM_WS"); $ru="sip:"+$tU+"@"+$(du{s.select,1,:}); route("FINAL_RELAY"); } else { append_branch("sip:$tU@$(du{s.select,1,:})","0.7"); }
#after while ended if more that one endpoint used
t_on_branch("1"); return;
branch_route[1]{
if($du=~"transport=ws"){ xlog("L_INFO","Websocket Branch is {$du} for {$tU}\n"); rtpengine_manage("force trust-address replace-origin replace-session-connection ICE=force RTP/SAVPF"); t_on_reply("REPLY_FROM_WS"); } else{ xlog("L_INFO","UDP Branch is {$du)} for {$tU}\n"); rtpengine_manage("replace-origin replace-session-connection ICE=remove RTP/AVP"); t_on_reply("MANAGE_CLASSIC_REPLY"); } }
route[FINAL_RELAY] {
if (!t_relay()) { sl_reply_error(); } return; }
2015-03-16 15:46 GMT+03:00 Yuriy Gorlichenko ovoshlook@gmail.com:
request_route
2015-03-16 15:43 GMT+03:00 Daniel-Constantin Mierla miconda@gmail.com:
Is this used in request_route or in failure_route or other routing block?
Cheers, Daniel
On 16/03/15 12:44, Yuriy Gorlichenko wrote:
If I use
$ru="sip:"+$tU+"@"+$(du{s.select,1,:});
if (!t_relay()) { sl_reply_error(); }
I see
t_forward_nonack(): ERROR: t_forward_nonack: no branches for forwarding 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)
if I use append_branch() for single client - thats is ok but 2 invites going to client. So client may pickup call and it successfully established.
2015-03-16 13:24 GMT+03:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
instead of seturi use:
$ru = "sip:" + $tU + "@" + $(du{s.select,1,:});
Cheers, Daniel
On 16/03/15 05:44, Yuriy Gorlichenko wrote:
Now. when I use
seturi("sip:$tU@$(du{s.select,1,:})");
I see error at my log
ERROR: tm [t_lookup.c:1264]: new_t(): ERROR: new_t: uri invalid ERROR: tm [t_lookup.c:1411]: t_newtran(): ERROR: t_newtran: new_t failed ERROR: tm [t_lookup.c:1264]: new_t(): ERROR: new_t: uri invalid ERROR: tm [t_lookup.c:1411]: t_newtran(): ERROR: t_newtran: new_t failed 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) 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)
As i see error generate twice maby because I ure t_on branch() route
2015-03-16 7:18 GMT+03:00 Yuriy Gorlichenko ovoshlook@gmail.com:
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. As I understand it is original request and the next one is branch. I used seturi() before for sending original reqest to destination, but I can not see this function at kamailio 4.3. Kamailio 4.3 uses send() dunnction? but it works at stateless mode. I need analog of it or seturi that works at statefull mode.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users