Dear Benny, Thanks for your quick response and suggestion. I think there are pretty similar between null_port.c and mem_player.c. Now, I set local device to null snd device and connect to a wifi phone(mic/speaker work well). 1: I try to record PCM data to a file where I put my record code in clock_callback(master_port.c). I want to record PCM data after the pjsip get frame from downstream port. But the PCM data I recorded seems not correct voice stream data from wifi phone. 2: I also record frame->buf to the file after read_port() in the get_frame() conference.c . I can get the correct PCM data which is the voice stream from remote device(wifi phone). I confused about why I can record voice stream data from remote device after read_port() in get_frame() conference.c But I save frame->buf out of second for loop which "Get frames from all ports, and "mix" the signal to mix_buf of all listeners of the port." I save lot of garbage data in the file and I cannot open it by stream editor software on WinXP. I don't understand why get_frame() pass the data of frame->buf which get from read_port() back to frame (pjmedia_port_get_frame(m->d_port, &frame);) fail after it get out of the second for loop in get_frame() conference.c Sorry for my poor English. Thanks for your HELP!!!!!!! You are so cool!!! BR, Duncan -----Original Message----- From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of Benny Prijono Sent: Tuesday, January 12, 2010 10:37 PM To: pjsip list Subject: Re: NULL device audio question On Tue, Jan 12, 2010 at 7:13 AM, Duncan.Lee <Duncan.Lee at tw.fujitsu.com> wrote: > Dear All & Benny, > > I am using simple_pjsua to do the call test. There is no sound > device on my board. I set the sound device to null sound device. > > But now I try to play a PCM file and make remote client can heard the PCM > data. > > My question is as below > > 1: Should I put the PCM file reader code in null_put_frame() (in > null_port.c) and send PCM data to conference bridge? Is that a correct way? > > 2: How can I send PCM data to conference bridge and make put_frame() (in > conference.c) can put the data to do the decode/encode > The best way is to create a PCM file player, then connect it to the bridge as usual to play with it. You can use memory player port as a starting point, see mem_port.h/c. Or if you just want to try out your board, why don't you just convert the PCM file to WAV and use existing WAV player. Cheers Benny _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org