[OpenSIPS-Users] appending a ws branch

Răzvan Crainea razvan at opensips.org
Mon Nov 9 18:55:58 CET 2015


Hi, Tito!

So basically you need two branches, one should go over WS and one over 
TCP or UDP? You can use the append_branch() function[1] to do that.
Note that you will need a WS listener that also has WS client support, 
and that's only available in OpenSIPS 2.2.

[1] http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc3

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 11/04/2015 08:35 PM, Tito Cumpen wrote:
> group,
>
>
> I am attempting to append a branch that will route to another opensips
> server that listens for websockets. Is this possible in opensips 2.1.1?
> Here is how I am attempting to append the branch.
>
>   avp_subst("$avp(myloc[$var(i)])", "/(.+)/\sip:\0:8080;transport=WS/");
>
> avp_pushto("$du","$avp(myloc[$var(i)])");
>
>
> which results in the branch looking like this on debug
>
> <sip:myuser.blah at mydomain.org
> <mailto:sip%3Amyuser.blah at mydomain.org>,othersip:server.ip:8080;transport=WS,,1380,4>
>
>
> I chose to create the branch this way because the rest of them look like
>
> <sip:ih1l72tk at 192.0.2.183
> <mailto:sip%3Aih1l72tk at 192.0.2.183>;transport=ws,sip:realip:64899;transport=WS,,1380,3>
>
> My intention is to keep the topmost via branch as a WS so that the
> remote opensips server can process it accordingly as if it had received
> a ws call from client's registered to it.
>
> As of now opensips isn't routing this branch at all and I can't find a
> thing in the debug to explain. Please advise.
>
> Thanks,
>
> Tito
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list