]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
use sips: or sip: depending on the transport in use when building reply digest
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 7 Jul 2011 15:28:25 +0000 (15:28 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 7 Jul 2011 15:28:25 +0000 (15:28 +0000)
URIs

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@326683 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ff0d18d2a7fa8f487f11fd41606ce022e72aeb85..44f2a536e6fa41d0bb296c6ab08c326b7afceba3 100644 (file)
@@ -18639,7 +18639,7 @@ static int build_reply_digest(struct sip_pvt *p, int method, char* digest, int d
        else if (!ast_strlen_zero(p->uri))
                ast_copy_string(uri, p->uri, sizeof(uri));
        else
-               snprintf(uri, sizeof(uri), "sip:%s@%s", p->username, ast_sockaddr_stringify_host_remote(&p->sa));
+               snprintf(uri, sizeof(uri), "%s:%s@%s", p->socket.type == SIP_TRANSPORT_TLS ? "sips" : "sip", p->username, ast_sockaddr_stringify_host_remote(&p->sa));
 
        snprintf(cnonce, sizeof(cnonce), "%08lx", ast_random());