Set the type for the peer structure to be a peer as the default.
authorJoshua Colp <jcolp@digium.com>
Tue, 10 Feb 2009 17:48:29 +0000 (17:48 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 10 Feb 2009 17:48:29 +0000 (17:48 +0000)
(closes issue #14447)
Reported by: triccyx

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

channels/chan_sip.c

index 8d2b8ba..d932dff 100644 (file)
@@ -22304,6 +22304,7 @@ static void set_peer_defaults(struct sip_peer *peer)
                peer->socket.type = SIP_TRANSPORT_UDP;
                peer->socket.fd = -1;
        }
                peer->socket.type = SIP_TRANSPORT_UDP;
                peer->socket.fd = -1;
        }
+       peer->type = SIP_TYPE_PEER;
        ast_copy_flags(&peer->flags[0], &global_flags[0], SIP_FLAGS_TO_COPY);
        ast_copy_flags(&peer->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY);
        ast_string_field_set(peer, context, sip_cfg.default_context);
        ast_copy_flags(&peer->flags[0], &global_flags[0], SIP_FLAGS_TO_COPY);
        ast_copy_flags(&peer->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY);
        ast_string_field_set(peer, context, sip_cfg.default_context);