[asterisk-dev] [Code Review] disallow tcp/tls transport in peers when tcpenable=no

wdoekes reviewboard at asterisk.org
Sun Nov 13 07:37:42 CST 2011

This is an automatically generated e-mail. To reply, visit:

Review request for Asterisk Developers.


When tcpenable=no, the sip_tcp_desc.local_address is set to null and no
listening socket is opened. Nevertheless peers are allowed to have tcp
and/or tls transport. The ast_sip_ouraddrfor() returns NULL for those
cases, and the SIP packets come out with "(null)" where the local
address should be.

The fix: when tcpenable=no, no attempt should be made to use tcp/tls
transports. I've added a warning and removed the invalid transports.
Note that the devices will fall back to the only other option: UDP

Three fixes:
(1) If tcpenable=no, then the [general] transports will be set to 'udp'.
(2) If tcpenable=no, peer transports will default to the [general]
(3) If an invalid peer transport is encountered, the message will state
    that it uses *the* *defaults* (it said 'udp', but that was incorrect).

This addresses bug ASTERISK-18837.


  /branches/1.8/channels/chan_sip.c 344952 

Diff: https://reviewboard.asterisk.org/r/1585/diff


Set the [general] and peer flags and checked that they're still correct if tcpenabled=yes and that they're set to udp when tcpenabled=no.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111113/57f5de62/attachment.htm>

More information about the asterisk-dev mailing list