Module: sip-router Branch: master Commit: 1c74725dc14fc40d9b553950e212241821351878 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c74725d...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Oct 1 23:18:07 2013 +0200
core: don't attempt srv lookup for proto ws or wss
---
dns_cache.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c index 917b43e..2d7278c 100644 --- a/dns_cache.c +++ b/dns_cache.c @@ -2670,6 +2670,10 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port, }else{ srv_proto=PROTO_UDP; } + if(srv_proto==PROTO_WS || srv_proto==PROTO_WS) { + /* no srv records for web sockets */ + return 0; + } /* try SRV if no port specified (draft-ietf-sip-srv-06) */ if ((port)&&(*port==0)){ *port=(srv_proto==PROTO_TLS)?SIPS_PORT:SIP_PORT; /* just in case we
Isn't NAPTR/SRV lookups specified for websockets?
On 01.10.2013 23:18, Daniel-Constantin Mierla wrote:
Module: sip-router Branch: master Commit: 1c74725dc14fc40d9b553950e212241821351878 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c74725d...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Oct 1 23:18:07 2013 +0200
core: don't attempt srv lookup for proto ws or wss
dns_cache.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c index 917b43e..2d7278c 100644 --- a/dns_cache.c +++ b/dns_cache.c @@ -2670,6 +2670,10 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port, }else{ srv_proto=PROTO_UDP; }
- if(srv_proto==PROTO_WS || srv_proto==PROTO_WS) {
/* no srv records for web sockets */
return 0;
- } /* try SRV if no port specified (draft-ietf-sip-srv-06) */ if ((port)&&(*port==0)){ *port=(srv_proto==PROTO_TLS)?SIPS_PORT:SIP_PORT; /* just in case we
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
E.g. when connection from one Kamailio to another Kamailio via Websockets.
klaus
On 02.10.2013 13:27, Klaus Darilion wrote:
Isn't NAPTR/SRV lookups specified for websockets?
On 01.10.2013 23:18, Daniel-Constantin Mierla wrote:
Module: sip-router Branch: master Commit: 1c74725dc14fc40d9b553950e212241821351878 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c74725d...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Oct 1 23:18:07 2013 +0200
core: don't attempt srv lookup for proto ws or wss
dns_cache.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c index 917b43e..2d7278c 100644 --- a/dns_cache.c +++ b/dns_cache.c @@ -2670,6 +2670,10 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port, }else{ srv_proto=PROTO_UDP; }
- if(srv_proto==PROTO_WS || srv_proto==PROTO_WS) {
/* no srv records for web sockets */
return 0;
- } /* try SRV if no port specified (draft-ietf-sip-srv-06) */ if ((port)&&(*port==0)){ *port=(srv_proto==PROTO_TLS)?SIPS_PORT:SIP_PORT; /* just in
case we
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
WebSocket's is an asynchronous protocol. The current Kamailio implementation is the server-side only.
Because of the asynchronous nature of WebSockets, plus some other limitations imposed by the transport, it wouldn't really make sense for Kamailio to contain a WebSocket client (in my opinion anyway - it adds complexity and "breaks" things without giving any benefit over TCP/TLS/SCTP between servers).
On 2 October 2013 12:27, Klaus Darilion klaus.mailinglists@pernau.atwrote:
E.g. when connection from one Kamailio to another Kamailio via Websockets.
klaus
On 02.10.2013 13:27, Klaus Darilion wrote:
Isn't NAPTR/SRV lookups specified for websockets?
On 01.10.2013 23:18, Daniel-Constantin Mierla wrote:
Module: sip-router Branch: master Commit: 1c74725dc14fc40d9b553950e21224**1821351878 URL: http://git.sip-router.org/cgi-**bin/gitweb.cgi/sip-router/?a=**commit;h= **1c74725dc14fc40d9b553950e21224**1821351878http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c74725dc14fc40d9b553950e212241821351878
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Oct 1 23:18:07 2013 +0200
core: don't attempt srv lookup for proto ws or wss
dns_cache.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c index 917b43e..2d7278c 100644 --- a/dns_cache.c +++ b/dns_cache.c @@ -2670,6 +2670,10 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port, }else{ srv_proto=PROTO_UDP; }
- if(srv_proto==PROTO_WS || srv_proto==PROTO_WS) {
/* no srv records for web sockets */
return 0;
- } /* try SRV if no port specified (draft-ietf-sip-srv-06) */ if ((port)&&(*port==0)){ *port=(srv_proto==PROTO_TLS)?**SIPS_PORT:SIP_PORT; /* just in
case we
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Sounds reasonable for Kamailio.
For clients it would be nice to detect the websocket URL automatically from DNS. I see that draft-ietf-sipcore-sip-websocket-09 include some text for NAPTR and SRV, but I think this is not usefull, as the SRV only provides host and port, but the WS URL may be complexer (e.g. contain a path)
regards klaus
On 02.10.2013 13:33, Peter Dunkley wrote:
WebSocket's is an asynchronous protocol. The current Kamailio implementation is the server-side only.
Because of the asynchronous nature of WebSockets, plus some other limitations imposed by the transport, it wouldn't really make sense for Kamailio to contain a WebSocket client (in my opinion anyway - it adds complexity and "breaks" things without giving any benefit over TCP/TLS/SCTP between servers).
On 2 October 2013 12:27, Klaus Darilion <klaus.mailinglists@pernau.at mailto:klaus.mailinglists@pernau.at> wrote:
E.g. when connection from one Kamailio to another Kamailio via Websockets. klaus On 02.10.2013 13:27, Klaus Darilion wrote: Isn't NAPTR/SRV lookups specified for websockets? On 01.10.2013 23:18, Daniel-Constantin Mierla wrote: Module: sip-router Branch: master Commit: 1c74725dc14fc40d9b553950e21224__1821351878 URL: http://git.sip-router.org/cgi-__bin/gitweb.cgi/sip-router/?a=__commit;h=__1c74725dc14fc40d9b553950e21224__1821351878 <http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c74725dc14fc40d9b553950e212241821351878> Author: Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> Committer: Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> Date: Tue Oct 1 23:18:07 2013 +0200 core: don't attempt srv lookup for proto ws or wss --- dns_cache.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dns_cache.c b/dns_cache.c index 917b43e..2d7278c 100644 --- a/dns_cache.c +++ b/dns_cache.c @@ -2670,6 +2670,10 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port, }else{ srv_proto=PROTO_UDP; } + if(srv_proto==PROTO_WS || srv_proto==PROTO_WS) { + /* no srv records for web sockets */ + return 0; + } /* try SRV if no port specified (draft-ietf-sip-srv-06) */ if ((port)&&(*port==0)){ *port=(srv_proto==PROTO_TLS)?__SIPS_PORT:SIP_PORT; /* just in case we _________________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__dev <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev> _________________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__dev <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev> _________________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__dev <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev>
-- Peter Dunkley Technical Director Crocodile RCS Ltd
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev