Voice over IP (VoIP) call has become our common choice of communication with each other. Compared with traditional steganographic covers such as texts and images, VoIP data flow has better imperceptibility and larger space for secret message embedding. Thus, VoIP steganography has received increasing attention in recent years. So far, the research mainly revolves around the designing of embedding and extracting process. However, the detection resistance of existing methods still needs to be strengthened. And they are lacking in the guidance of steganographic security theory. This paper firstly analyzes time sequence characteristics of speech frames, then defines the steganographic security in the form of relative entropy based on Bayesian network model. By analysing the speech encoding process, a specific Bayesian network model for fixed codebook parameters is established and the parameters are divided into binary cover elements and ternary cover elements. To minimize the change number in the embedding process, matrix embedding is used to determine the change positions in the cover vector. To reduce embedding impacts on the statistical properties of the cover, change directions of the ternary cover elements are determined by minimizing the security measure. Experimental results show that under the premise of limited computational complexity, the novel VoIP steganography method leads to good perceptual transparency and outperforms prior methods in resisting blind steganalysis.