summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMichael L. Young <elgueromexicano@gmail.com>2013-08-05 20:20:41 +0000
committerMichael L. Young <elgueromexicano@gmail.com>2013-08-05 20:20:41 +0000
commitc0f302e1e109a640ad4a1e1b308bb8732f85989d (patch)
tree84234e83545fd4943c9be81df6c1fbc041b71b37 /channels
parent3797639e84a319671ff167306f371394ba9b629a (diff)
Fix Registration Failure When A Peer And TLS Are Used
If a peer is used in a register line and TLS is defined as the transport, the registration fails since the transport on the dialog is never set properly resulting in UDP being used instead of TLS. This patch sets the dialog's transport based on the transport that was defined in the register line. If the register line does not specify a transport, the parsing function for the register line always defaults back to UDP. (closes issue ASTERISK-21964) Reported by: Doug Bailey Tested by: Doug Bailey Patches: asterisk-21964-set-reg-dialog-transport.diff by Michael L. Young (license 5026) ........ Merged revisions 396240 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 396248 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 736c15005..c02f022ef 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15272,6 +15272,8 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char *
append_history(p, "RegistryInit", "Account: %s@%s", r->username, r->hostname);
}
+ p->socket.type = r->transport;
+
/* Use port number specified if no SRV record was found */
if (!ast_sockaddr_isnull(&r->us)) {
if (!ast_sockaddr_port(&r->us) && r->portno) {