--- channels/chan_sip.c.orig 2010-11-11 16:58:25.000000000 -0500 +++ channels/chan_sip.c 2011-01-11 00:50:19.000000000 -0500 @@ -4546,6 +4546,8 @@ return NULL; } + if (peer->type == 0) peer->type = SIP_TYPE_PEER; + ast_debug(3, "-REALTIME- loading peer from database to memory. Name: %s. Peer objects: %d\n", peer->name, rpeerobjs); if (ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS) && !devstate_only) {