Hi,

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.

Regards,

Peter


On 27 June 2013 13:03, Andreas Granig <agranig@sipwise.com> wrote:
Hi,


On 06/27/2013 12:54 PM, Andreas Granig wrote:
$du = $null;
$fs = $null;
forward();

What I get is this error message:

Jun 27 12:30:53 spce lb[12104]: ERROR: <core> [action.c:437]:
do_action(): ERROR: do action: forward: bad uri transport 5

Is there anything special I need to do? Does forward() maybe just not
understand WS transport?


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:

#+
diff --git a/action.c b/action.c
index e64cf81..58024a7 100644
--- a/action.c
+++ b/action.c
@@ -421,6 +421,8 @@ int do_action(struct run_act_ctx* h, struct action* a, struct sip_msg* msg)
                                                        /* no proto, try to get it from the dns */
                                                        break;
                                                case PROTO_UDP:
+                                               case PROTO_WS:
+                                               case PROTO_WSS:
 #ifdef USE_TCP
                                                case PROTO_TCP:
 #endif
#-

With that patch in place, I can set $fs to my local tcp socket, like

        $fs="tcp:192.168.51.133:5060";

and let $du point to the right destination, like

        $du="ws:192.168.51.1:1234";

and the request is forwarded correctly.

Any feedback on this?


Andreas

_______________________________________________
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



--
Peter Dunkley
Technical Director
Crocodile RCS Ltd