[Home]

Summary:ASTERISK-24853: Documentation claims chan_sip outbound registrations support WS or WSS as valid transports (not true)
Reporter:PSDK (psdk)Labels:
Date Opened:2015-03-08 00:45:19.000-0600Date Closed:2015-07-20 18:31:36
Priority:MinorRegression?
Status:Closed/CompleteComponents:Documentation
Versions:11.16.0 13.2.0 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Attachments:
Description:Hi,
In sip.conf, is mentioned to:
{noformat}
" The 'transport' part defaults to 'udp' but may also be 'tcp', 'tls', 'ws', or 'wss'."
{noformat}
Then when we can register users, over ws to the any server that support SIP over websocket.

I defined something like this: register => ws://100:pass100@192.168.2.220:5060/601.
but I received this error : 'ws' is not a valid transport type on line 70 of sip.conf. defaulting to udp.

I found that in sip/config_parser.c there isn't any line for WS or WSS transport protocols.
{code}
/* set transport type */
if (!pre2.transport) {
transport = AST_TRANSPORT_UDP;
} else if (!strncasecmp(pre2.transport, "tcp", 3)) {
transport = AST_TRANSPORT_TCP;
} else if (!strncasecmp(pre2.transport, "tls", 3)) {
transport = AST_TRANSPORT_TLS;
} else if (!strncasecmp(pre2.transport, "udp", 3)) {
transport = AST_TRANSPORT_UDP;
} else {
transport = AST_TRANSPORT_UDP;
ast_log(LOG_NOTICE, "'%.3s' is not a valid transport type on line %d of sip.conf. defaulting to udp.\n", pre2.transport, lineno);
}
{code}

So how can I patch this issue? plz help me.

Regards,
H.Yavari
Comments:By: David Woolley (davidw) 2015-03-08 07:09:18.068-0500

Although I'm expecting this to be treated as a documentation error, some background is on http://forums.asterisk.org/viewtopic.php?f=1&t=92682

By: Rusty Newton (rnewton) 2015-03-12 08:05:31.856-0500

Yup, documentation issue. WS/WSS is not supported for outbound registrations with chan_sip.