[asterisk-bugs] [JIRA] (ASTERISK-24853) WS as a transport protocol for registration not recognized

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Mar 9 11:15:34 CDT 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett updated ASTERISK-24853:
---------------------------------------

    Description: 
Hi,
In sip.conf, is mentioned to: " The 'transport' part defaults to 'udp' but may also be 'tcp', 'tls', 'ws', or 'wss'." 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

  was:
Hi,
In sip.conf, is mentioned to: " The 'transport' part defaults to 'udp' but may also be 'tcp', 'tls', 'ws', or 'wss'." 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.

/* 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);
}

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

Regards,
H.Yavari


> WS as a transport protocol for registration not recognized
> ----------------------------------------------------------
>
>                 Key: ASTERISK-24853
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24853
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 11.16.0, 13.2.0
>            Reporter: PSDK
>            Severity: Critical
>
> Hi,
> In sip.conf, is mentioned to: " The 'transport' part defaults to 'udp' but may also be 'tcp', 'tls', 'ws', or 'wss'." 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



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list