[asterisk-dev] [Code Review] SIP TCP/TLS: ensure that the contact header properly supports TLS/improved support for PAT/port redirection

David Vossel dvossel at digium.com
Tue Oct 6 10:02:07 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/392/#review1143
-----------------------------------------------------------



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/392/#comment2630>

    You can check for an invalid port string by setting the second argument in port_str2int to 0.  This way if the string fails to produce a valid port, port_str2int will just return 0.


- David


On 2009-10-05 14:04:42, ebroad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/392/
> -----------------------------------------------------------
> 
> (Updated 2009-10-05 14:04:42)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> https://issues.asterisk.org/view.php?id=15880
> 
> This patch adds support for TCP/TLS in the Contact header when using NAT, specifically externip or externhost. The original issue was that Asterisk sent 5060 as the port in the contact header whether TLS was used or not. Additionally, this patch adds 2 config options to sip.conf, specifically externtcpport and externtlsport. This allows a user to specify different external ports for TCP and TLS other than those used internally, this is especially useful in in a PAT/port redirection setup. 
> 
> 
> This addresses bug 15880.
>     https://issues.asterisk.org/view.php?id=15880
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 222106 
>   /trunk/configs/sip.conf.sample 222106 
>   /trunk/include/asterisk/tcptls.h 222106 
> 
> Diff: https://reviewboard.asterisk.org/r/392/diff
> 
> 
> Testing
> -------
> 
> Tested both inbound and outbound calls using Counterpath's Bria softphone, with Asterisk behind a NAT firewall(Cisco ASA), and with the appropriate ports redirected. The client was behind a NAT firewall(Cisco PIX), using STUN. 
> 
> 
> Thanks,
> 
> ebroad
> 
>




More information about the asterisk-dev mailing list