Mukesh- > On 2g device sound call back latency is very low. > For this we need to use sound buffer. > Sound buffer size is calculated on the basis of PJMEDIA_SND_DEFAULT_PLAY_LATENCY. > which is define in pjmedia/include/pjmedia/config.h > > #ifndef PJMEDIA_SOUND_BUFFER_COUNT > # define PJMEDIA_SOUND_BUFFER_COUNT ((PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20) > #endif > > this setting work for me on pjsip 1.5. > on pjsip 1.3 do this > define this to 1 > #define PJMEDIA_SOUND_USE_DELAYBUF 1 > > #ifndef PJMEDIA_SOUND_BUFFER_COUNT > # define PJMEDIA_SOUND_BUFFER_COUNT 30 > #endif Ok I understand now... this is an iPhone 2nd-gen issue, not 2G network issue. Yes I can believe that larger sound buffers are needed on iPhone 2nd-gen -- phone CPU and software are slower so more buffering could help. Thanks. -Jeff > On 13-May-2010, at 11:21 AM, Jeff Brower wrote: > >> Mukesh- >> >>> on 2g I have observed two problem one is latency >>> issue and another is some time voice quality is very bad. >>> For latency issues i have increased latency >> >> When you say that you "increased latency" do you mean that you increased the jitter buffer depth, increased the >> packet >> time, or both? >> >>> and for other audio related problems i have wrote audio >>> files for iphone and simulator. >>> You can check these files in spokn/lib github >>> repository in pjsipcompilation folder . File names are >>> pa_mac_core_iphone.c and pa_mac_core_iphonesimulator.c . >>> I have use speex codec and not used G729 . >> >> With speex, what packet time are you using? 20 msec? 40 msec? >> >> -Jeff >> >>> On 12-May-2010, at 6:35 PM, Re Mo wrote: >>> >>>> That's great, thank you, I will dive into the code. >>>> Can you provide some details on how you resolved these issues? >>>> >>>> On Wed, May 12, 2010 at 3:50 PM, Mukesh Sharma <mukesh.s at geodesic.com> wrote: >>>> hi, >>>> we have sorted out 2g Distorted voice issue. >>>> u can checkout code on spokn on git hub. >>>> pjsip compilation and changes is in this folder lib/pjsipcompilation. >>>> u can check spokn which is available on app store. >>>> >>>> Regards >>>> Mukesh >>>> On 12-May-2010, at 5:29 PM, Re Mo wrote: >>>> >>>>> Dear Jeff >>>>> >>>>> 1) The example below indeed shows PCMU. I have used this for debugging purposes. Sorry for not mentioning this. >>>>> 2) Regarding the bandwidth - since the app calls over WiFi and not data, I think this should not be an issue. >>>>> What >>>>> do you think? >>>>> >>>>> Thx >>>>> Remo >>>>> >>>>> On Wed, May 12, 2010 at 2:24 AM, Jeff Brower <jbrower at signalogic.com> wrote: >>>>> Remo- >>>>> >>>>>> The bad call quality on the 2G iPhone is a combination of static noise (not >>>>>> too loud), 'robotic' speech and some short missing bits. >>>>>> >>>>>> I gathered some info provided by PJSIP, regarding a single call I made in >>>>>> case it's helpful: >>>>>> >>>>>> Call time: 00h:01m:16s >>>>>> 1st res in 3667 ms >>>>>> conn in 14909ms >>>>>> SRTP status: Not active >>>>>> Crypto-suite: (null)\n #0 PCMU @8KHz >>>>>> , sendrecv, >>>>>> RX pt=0 >>>>>> >>>>>> stat last update: 00h:00m:01.497s ago >>>>>> total 4.3Kpkt 698.8KB (873.6KB IP hdr) @avg=63.4Kbps/79.3Kbps >>>>>> *pkt loss=26 (0.6%)* >>>>>> discrd=0 (0.0%) >>>>>> dup=0 (0.0%) >>>>>> reord=0 (0.0%) (msec) min avg max last dev >>>>>> *loss period: 20.000 20.000 20.000 20.000 0.000* >>>>>> jitter : 0.000 4.626 194.625 24.125 5.505 >>>>>> TX pt=0 >>>>>> ptime=20ms >>>>> >>>>> One thing that seems to jump out is the call is not actually using G729, as you had mentioned. Instead it's >>>>> using >>>>> G711 uLaw. The aggregate bitrate (including IP/UDP/RTP headers) is almost 80 kbps, which would be correct for 20 >>>>> msec >>>>> G711. However, 80 kbps is too high for your 2G network max bandwidth, at least according to the bandwidth >>>>> figures >>>>> you >>>>> gave previously. >>>>> >>>>> -Jeff >>>>> >>>>>> On Mon, May 10, 2010 at 4:09 PM, Jeff Brower <jbrower at signalogic.com> wrote: >>>>>> >>>>>>> Remo- >>>>>>> >>>>>>>> My iPhone app uses the PJSIP iPhone Audio driver. >>>>>>>> It works well on 3G & 3GS iPhones, but I am having some voice quality >>>>>>> issues >>>>>>>> on 2G iPhones. >>>>>>>> When making a call with a 2G iPhone, the voice is distorted and it is >>>>>>>> impossible to have a conversation. >>>>>>>> >>>>>>>> Did anyone experince the same issue or has any advise? this can be >>>>>>> related >>>>>>>> to PJSIP/PJSIP audio driver or the 2G iPHone CPU. >>>>>>> >>>>>>> 2nd-gen iPhones don't have as much CPU horsepower, but that's probably not >>>>>>> the whole issue. What does the distortion >>>>>>> sound like? Missing packets? Static? "Cyborg voice"? >>>>>>> >>>>>>> -Jeff >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>>> Regards, >>>>> >>>>> Mukesh Sharma >>>>> Head - Principal Technologist | Spokn >>>>> Geodesic Limited | www.geodesic.com >>>>> Tel: +91 22 40315859 >>>>> >>>>> Mobile: +919892029162 >> > >> Regards, >> >> Mukesh Sharma >> Head - Principal Technologist | Spokn >> Geodesic Limited | www.geodesic.com >> Tel: +91 22 40315859 >> >> Mobile: +919892029162 > > > > >