Hi guys,
Maybe I'm missing something, but when I have a stateless lb with websockets enabled, and I don't have mhomed set (meaning that I need to set $fs manually), how would I set $du and $fs correctly, if $ru is for example this:
sip:bo87fffs@h7h3rerhg50k.invalid;transport=ws
I tried all kinds of variants and now starting with the simplest approach possible, doing this for sending out the request to the websocket client:
$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?
I'm using kamailio 4.0.2.
Any help is greatly appreciated! Andreas
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
Hi,
Any feedback on that? Looks like the patch below does its job, can someone please confirm this is fine and actually as expected?
Andreas
On 06/27/2013 02:03 PM, Andreas Granig 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:
#ifdef USE_TCP case PROTO_TCP: #endifcase PROTO_WSS:
#-
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
Hello,
I guess many people were traveling last week (e.g., Peter was at WebRTC conference in US), thus rather no interaction on this topic.
Anyhow, patch looks ok from my point of view, you can commit, Peter can review later as well if needed.
Cheers, Danile
On 7/1/13 10:15 AM, Andreas Granig wrote:
Hi,
Any feedback on that? Looks like the patch below does its job, can someone please confirm this is fine and actually as expected?
Andreas
On 06/27/2013 02:03 PM, Andreas Granig 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:
#ifdef USE_TCP case PROTO_TCP: #endifcase PROTO_WSS:
#-
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
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
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-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users