Hi, It seems to be G.723.1 (G.723 is different codec). For bitrate 6.3kbps, the attributes must be: attr->info.avg_bps = 6400; // integer calculation in stream may cause truncation, bigger value is safer, and it won't affect the real bitrate. attr->info.pcm_bits_per_sample = 16; // as it should be (the rest is fine) Moreover, as you said your reference is GSM wrapper, there are hardcoded values you need to modify in your G.723.1 wrapper: bytes per frame: 320 -> 240 encoded bytes per frame: 33 -> 24 samples per frame: 160 -> 120 Good luck! nanang 2008/6/6 sre kdkjf <kk_kksri at yahoo.com>: > > Hi All, > > > i am making a sample application using pjsip stack. in the pjsip stack i am trying to include audio codec G723. > > i had added G723 codec in the same way of GSM Codec, as it is added in the existing pjsip stack. > whenever i made a call from A to B, once the call is in connected state, G723 rtp data is flowing from one end to other end. > > the problem is, the audio is choppy, in the rtp data G723 data is flowing from A to B. But the no.of frames flowing from one end to other end is coming less than 24. > > And the bitrate i am using here is 6.3kbps. even then the bitrate coming is 5.3 kbps. > > whenever i am using microphone to talk, the bit rate i am getting is 5.3 kbps. > > > when the no.of frames are getting less than the actual frame rate i am getting error. > > PJMEDIA_CODEC_EFRMTOOSHORT > > so whenever the no. of frames per packet is less than the actual size, the output buffer is also less than the actual rate. > > at that time i am getting an error like > > PJMEDIA_CODEC_EPCMTOOSHORT. > > the attribute values i am using for G723 codec are as given below. > > pj_bzero(attr, > sizeof(pjmedia_codec_param)); > attr->info.clock_rate = 8000; > attr->info.channel_cnt = 1; > attr->info.avg_bps = 6300; > attr->info.pcm_bits_per_sample = 24; > attr->info.frm_ptime = 30; > attr->info.pt = PJMEDIA_RTP_PT_G723; > attr->setting.frm_per_pkt = 1; > attr->setting.vad = 1; > > even i had changed the bits per samples to 16. even then the same problem i am getting. > > > so any body please help me out, to how to solve the audio issues by using G723 codec. > > waiting for valuable reply. > > Thankyou. > > _______________________________________________ > 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 >