<div dir="ltr">Hi,<div><br></div><div>The "case PROTO_WS:" should go within the "#ifdef USE_TCP" conditional and the "case PROTO_WSS:" should go within the "#ifdef USE_TLS" conditional.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 27 June 2013 13:03, Andreas Granig <span dir="ltr"><<a href="mailto:agranig@sipwise.com" target="_blank">agranig@sipwise.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div class="im"><br>
<br>
On 06/27/2013 12:54 PM, Andreas Granig wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$du = $null;<br>
$fs = $null;<br>
forward();<br>
<br>
What I get is this error message:<br>
<br>
Jun 27 12:30:53 spce lb[12104]: ERROR: <core> [action.c:437]:<br>
do_action(): ERROR: do action: forward: bad uri transport 5<br>
<br>
Is there anything special I need to do? Does forward() maybe just not<br>
understand WS transport?<br>
</blockquote>
<br>
<br></div>
Alright, I think I found it. It seems like there is an issue in action.c where PROTO_WS and PROTO_WSS are not handled. This patch solves it for me, however it's just a proof of concept as I don't know enough of the core and WS implementation to understand the implications:<br>

<br>
#+<br>
diff --git a/action.c b/action.c<br>
index e64cf81..58024a7 100644<br>
--- a/action.c<br>
+++ b/action.c<br>
@@ -421,6 +421,8 @@ int do_action(struct run_act_ctx* h, struct action* a, struct sip_msg* msg)<br>
                                                        /* no proto, try to get it from the dns */<br>
                                                        break;<br>
                                                case PROTO_UDP:<br>
+                                               case PROTO_WS:<br>
+                                               case PROTO_WSS:<br>
 #ifdef USE_TCP<br>
                                                case PROTO_TCP:<br>
 #endif<br>
#-<br>
<br>
With that patch in place, I can set $fs to my local tcp socket, like<br>
<br>
        $fs="tcp:<a href="http://192.168.51.133:5060" target="_blank">192.168.51.133:5060</a>";<br>
<br>
and let $du point to the right destination, like<br>
<br>
        $du="ws:<a href="http://192.168.51.1:1234" target="_blank">192.168.51.1:1234</a>";<br>
<br>
and the request is forwarded correctly.<br>
<br>
Any feedback on this?<div class="HOEnZb"><div class="h5"><br>
<br>
Andreas<br>
<br>
______________________________<u></u>_________________<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/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div>
<div><font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</div>