[asterisk-bugs] [JIRA] (ASTERISK-21964) SIP TLS Register statement fails if sip.conf register directive uses peer name.

Matt Jordan (JIRA) noreply at issues.asterisk.org
Mon Oct 21 12:56:08 CDT 2013


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

Matt Jordan updated ASTERISK-21964:
-----------------------------------

    Target Release Version/s: 1.8.24.0
    
> SIP TLS Register statement fails if sip.conf register directive uses peer name. 
> --------------------------------------------------------------------------------
>
>                 Key: ASTERISK-21964
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21964
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Registration
>    Affects Versions: 1.8.22.0, 11.5.0
>            Reporter: Doug Bailey
>            Assignee: Michael L. Young
>      Target Release: 1.8.24.0
>
>         Attachments: asterisk-21964-set-reg-dialog-transport.diff
>
>
> I am using 1.8.15-cert2 and have been testing some TLS functionality.  When I set a register statement that specifies TLS and uses the peer name as the target address in the register statement, I get an error and the register request never goes out.
> The problem occurs due to a create_addr failing in transmit_register due to an allocated dialog's socket being set to UDP while the sip_registry indicates only TLS transport.
> The register statement works if I explicitly specify the IP address in the sip.conf register statement.
> From sip.conf
> {noformat}
> register => tls://dbt:1234@dbt
> [dbt]
> type=peer
> host=192.168.88.44
> username=dbt
> defaultuser=dbt
> secret=1234
> transport=tls
> context=doug
> disallow=all
> allow=ulaw
> directmedia=no
> {noformat}
> Error encountered:
> {noformat}
> [Jun 26 10:43:47] ERROR[9054]: chan_sip.c:5342 create_addr_from_peer: 'UDP' is not a valid transport for 'dbt'. we only use 'TLS'! ending call.
> [Jun 26 10:43:47] WARNING[9054]: chan_sip.c:13524 transmit_register: Probably a DNS error for registration to dbt at dbt, trying REGISTER again (after 20 seconds)
> {noformat}
> If I make the following change, the register statement succeeds:
> {noformat}
> --- channels/chan_sip.c	(revision 392897)
> +++ channels/chan_sip.c	(working copy)
> @@ -13484,7 +13484,11 @@
>  			ast_log(LOG_WARNING, "Unable to allocate registration transaction (memory or socket error)\n");
>  			return 0;
>  		}
> -
> +		if (SIP_TRANSPORT_TLS == r->transport || SIP_TRANSPORT_TCP == r->transport ) {
> +			p->socket.type = r->transport;
> +		}
> +
> {noformat}
> This occurs both in 1.8.15-cert2 and in the tip of the 1.8 branch. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list