[OpenSIPS-Users] Help with "t_relay"
Bogdan-Andrei Iancu
bogdan at opensips.org
Fri Nov 23 10:10:56 CET 2012
Hi Spandy,
What you have is one URI (A) that you want to send to 2 destinations (X
an Y). So you need to create a new branch with the same uri (A) but to
point to a different destination:
$ru = "sip:user at domain"; # set initial URI
append_branch(); # clone it as a new branch with the same URI
$du = "sip:ip_pbx1:5060"; # set destination for initial URI
$(branch(duri)[0]) = "sip:ip_pbx2:5068;transport=tcp"; # set destination
for new branch
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 11/23/2012 01:36 AM, spady wrote:
> Hi list, i need some hints by you experts to get working my idea.
>
> What I am trying to do is parallel forking toward 2 different IP PBXs whose
> have different carateristics. Let me explain:
>
> IP PBX #1: accept UDP connections on port 5060
> IP PBX #2: accept TCP connections on port 5068
>
> What i tried to do is as follow:
>
> if (src_ip == IP_MEDIANT || (method=="INVITE")) {
> rewritehostport("FQDN_IP_PBX_2:PORT_IP_PBX_2");
> route(10);
> exit;
> }
>
> .........
>
> route[10] {
> append_branch();
>
> t_relay("tcp:IP_PBX_2:PORT_IP_PBX_2");
> exit;
> }
>
> So now I am stuck because i have some dubts that i can't answer:
>
> 1- How Can I forward the original request and the new BRANCH created to
> different "t_relays" ( which they have to have different features (UDP, TCp
> etc.. ) ) ?
>
> I tried with
>
> $(branch(uri)[0]) = "sip:???@IP_PBX_1:PORT_IP_PBX_1";
>
> But seems not working. In this last snippet of code, Can I use pseudo
> variables like $rU??
> $(branch(uri)[0]) = "sip:$rU at IP_PBX_1:PORT_IP_PBX_1"; ( ????? )
>
> Hope someone can point me in a right way.
>
> Regards
>
> I did not found into documentation something about protocol for Branches
> sections. In my case i also need to change it to UDP.
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Help-with-t-relay-tp7583170.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list